Changeset 1513:b2a79aaa6867 in lemon-0.x for demo
- Timestamp:
- 06/24/05 23:02:47 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1997
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/lp_demo.cc
r1435 r1513 27 27 typedef LpDefault::Row Row; 28 28 typedef LpDefault::Col Col; 29 29 30 31 //This will be a maximization 30 32 lp.max(); 31 33 34 //We add coloumns (variables) to our problem 32 35 Col x1 = lp.addCol(); 33 36 Col x2 = lp.addCol(); … … 54 57 lp.setObj(10*x1+6*x2+4*x3); 55 58 59 //Call the routine of the underlying LP solver 56 60 lp.solve(); 57 61 62 //Print results 58 63 if (lp.primalStatus()==LpSolverBase::OPTIMAL){ 59 64 printf("Z = %g; x1 = %g; x2 = %g; x3 = %g\n",
Note: See TracChangeset
for help on using the changeset viewer.