Changeset 2213:2c094dfa176d in lemon-0.x for test/mip_test.cc
- Timestamp:
- 09/08/06 17:51:32 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2941
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mip_test.cc
r2149 r2213 13 13 14 14 // itoa(stat,buf1, 10); 15 check(lp. primalStatus()==stat, buf.str());15 check(lp.mipStatus()==stat, buf.str()); 16 16 17 17 if (stat == LpSolverBase::OPTIMAL) { … … 36 36 37 37 38 39 40 41 //Objective function 42 mip.setObj(x1); 43 44 mip.max(); 45 46 47 //Unconstrained optimization 48 mip.solve(); 49 //Check it out! 50 38 51 //Constraints 39 52 mip.addRow(2*x1+x2 <=2); … … 45 58 46 59 47 //Objective function48 mip.setObj(x1);49 50 mip.max();51 52 53 60 //Maximization of x1 54 //over the triangle with vertices 61 //over the triangle with vertices 55 62 double expected_opt=4.0/5.0; 56 63 solveAndCheck(mip, Mip::OPTIMAL, expected_opt);
Note: See TracChangeset
for help on using the changeset viewer.