[Lemon-commits] [lemon_svn] athos: r1997 - hugo/trunk/demo

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:49:22 CET 2006


Author: athos
Date: Fri Jun 24 23:02:47 2005
New Revision: 1997

Modified:
   hugo/trunk/demo/lp_demo.cc

Log:
Minor changes

Modified: hugo/trunk/demo/lp_demo.cc
==============================================================================
--- hugo/trunk/demo/lp_demo.cc	(original)
+++ hugo/trunk/demo/lp_demo.cc	Fri Jun 24 23:02:47 2005
@@ -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(), 



More information about the Lemon-commits mailing list