Changeset 1111:88ade201ffc6 in lemon-0.x for src/work/marci/lp/max_flow_expression.cc
- Timestamp:
- 02/01/05 13:53:30 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1510
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/lp/max_flow_expression.cc
r1110 r1111 7 7 #include <lemon/dimacs.h> 8 8 #include <lemon/time_measure.h> 9 #include <lp_solver_ wrapper_3.h>9 #include <lp_solver_base.h> 10 10 11 11 using std::cout; … … 52 52 PrimalMap<Edge, EdgeIndexMap> flow(lp, edge_index_map); 53 53 54 // capacity function54 // nonnegativity of flow and capacity function 55 55 for (Graph::EdgeIt e(g); e!=INVALID; ++e) { 56 56 ColIt col_it=lp.addCol(); … … 59 59 // if you change the order of the following two lines, the 60 60 // two runs of GLPK are extremely different 61 lp.setColLowerBound(col_it, 0); 61 62 lp.setColUpperBound(col_it, cap[e]); 62 lp.setColLowerBound(col_it, 0);63 63 } 64 64 … … 73 73 lp.setObjCoeffs(expr); 74 74 } 75 // flow conservation 75 // flow conservation constraints 76 76 if ((n!=s) && (n!=t)) { 77 77 RowIt row_it=lp.addRow(); 78 78 lp.setRowCoeffs(row_it, expr); 79 lp.setRowBounds(row_it, LPSolver::FIXED, 0.0, 0.0); 79 lp.setRowLowerBound(row_it, 0.0); 80 lp.setRowUpperBound(row_it, 0.0); 80 81 } 81 82 }
Note: See TracChangeset
for help on using the changeset viewer.