Fixed the mip error (mipstatus was incorrect).
2 //#include <lemon/ilp_glpk.h>
18 Col x1 = ilp.addCol();
19 Col x2 = ilp.addCol();
20 Col x3 = ilp.addCol();
26 ilp.addRow(x1+x2+x3 <=100);
27 ilp.addRow(10*x1+4*x2+5*x3<=600);
28 ilp.addRow(2*x1+2*x2+6*x3<=300);
30 ilp.colLowerBound(x1, 0);
31 ilp.colLowerBound(x2, 0);
32 ilp.colLowerBound(x3, 0);
34 ilp.setObj(10*x1+6*x2+4*x3);
36 //Call the routine of the underlying LP solver
40 if (ilp.primalStatus()==LpSolverBase::OPTIMAL){
41 std::cout<<"Optimal solution found!"<<std::endl;
42 printf("optimum value = %g; x1 = %g; x2 = %g; x3 = %g\n",
44 ilp.primal(x1), ilp.primal(x2), ilp.primal(x3));
47 std::cout<<"Optimal solution not found!"<<std::endl;