74 //over the triangle with vertices (0,0),(4/5,2/5),(0,2) |
74 //over the triangle with vertices (0,0),(4/5,2/5),(0,2) |
75 double expected_opt=4.0/5.0; |
75 double expected_opt=4.0/5.0; |
76 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); |
76 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); |
77 |
77 |
78 //Restrict x2 to integer |
78 //Restrict x2 to integer |
79 mip.colType(x2,MipSolverBase::LEMON_INTEGER); |
79 mip.colType(x2,MipSolverBase::INT); |
80 expected_opt=1.0/2.0; |
80 expected_opt=1.0/2.0; |
81 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); |
81 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); |
82 |
82 |
83 |
83 |
84 //Restrict both to integer |
84 //Restrict both to integer |
85 mip.colType(x1,MipSolverBase::LEMON_INTEGER); |
85 mip.colType(x1,MipSolverBase::INT); |
86 expected_opt=0; |
86 expected_opt=0; |
87 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); |
87 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); |
88 |
88 |
89 |
89 |
90 |
90 |