diff -r e54392395480 -r b2a79aaa6867 demo/lp_demo.cc --- a/demo/lp_demo.cc Fri Jun 24 18:16:12 2005 +0000 +++ b/demo/lp_demo.cc Fri Jun 24 21:02:47 2005 +0000 @@ -26,9 +26,12 @@ LpDefault lp; typedef LpDefault::Row Row; typedef LpDefault::Col Col; + + //This will be a maximization lp.max(); + //We add coloumns (variables) to our problem Col x1 = lp.addCol(); Col x2 = lp.addCol(); Col x3 = lp.addCol(); @@ -53,8 +56,10 @@ //Objective function lp.setObj(10*x1+6*x2+4*x3); + //Call the routine of the underlying LP solver lp.solve(); + //Print results if (lp.primalStatus()==LpSolverBase::OPTIMAL){ printf("Z = %g; x1 = %g; x2 = %g; x3 = %g\n", lp.primalValue(),