# Changeset 1473:876c7b7f4dae in lemon-0.x

Ignore:
Timestamp:
06/10/05 14:50:43 (14 years ago)
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1953
Message:

Some tests have been developed, bugs got fixed.

Files:
3 edited

Unmodified
Added
Removed
• ## lemon/lp_cplex.cc

 r1460 //FIXME error } } LpCplex::ProblemTypes LpCplex::_getProblemType() { //FIXME error } } void LpCplex::_setMax()
• ## lemon/lp_glpk.cc

 r1466 #include //#include namespace lemon { LpGlpk::SolutionStatus LpGlpk::_getDualStatus() { //     std::cout<<"Itt megy: "<
• ## test/lp_test.cc

 r1445 #include #include "test_tools.h" #ifdef HAVE_CONFIG_H } void aTest(LpSolverBase & lp) { typedef LpSolverBase LP; //The following example is taken from the book by Gáspár and Temesi, page 39. typedef LpSolverBase::Row Row; typedef LpSolverBase::Col Col; Col x1 = lp.addCol(); Col x2 = lp.addCol(); //Constraints lp.addRow(3*x1+2*x2 >=6); lp.addRow(-1*x1+x2<=4); lp.addRow(5*x1+8*x2<=40); lp.addRow(x1-2*x2<=4); //Nonnegativity of the variables lp.colLowerBound(x1, 0); lp.colLowerBound(x2, 0); //Objective function lp.setObj(2*x1+x2); lp.max(); lp.solve(); if (lp.primalStatus()==LpSolverBase::OPTIMAL){ printf("Z = %g; x1 = %g; x2 = %g\n", lp.primalValue(), lp.primal(x1), lp.primal(x2)); } else{ std::cout<<"Optimal solution not found!"<
Note: See TracChangeset for help on using the changeset viewer.