Changeset 1110:ba28dfbea5f2 in lemon0.x for src/work/marci/lp/max_flow_expression.cc
 Timestamp:
 01/31/05 18:00:12 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1509
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/lp/max_flow_expression.cc
r1104 r1110 50 50 typedef Graph::EdgeMap<ColIt> EdgeIndexMap; 51 51 EdgeIndexMap edge_index_map(g); 52 PrimalMap<Edge, EdgeIndexMap> lp_flow(lp, edge_index_map);52 PrimalMap<Edge, EdgeIndexMap> flow(lp, edge_index_map); 53 53 54 54 // capacity function … … 56 56 ColIt col_it=lp.addCol(); 57 57 edge_index_map.set(e, col_it); 58 if (cap[e]==0) 59 lp.setColBounds(col_it, LPSolver::FIXED, 0, cap[e]); 60 else 61 lp.setColBounds(col_it, LPSolver::DOUBLE, 0, cap[e]); 58 // interesting property in GLPK: 59 // if you change the order of the following two lines, the 60 // two runs of GLPK are extremely different 61 lp.setColUpperBound(col_it, cap[e]); 62 lp.setColLowerBound(col_it, 0); 62 63 } 63 64 … … 80 81 } 81 82 lp.solveSimplex(); 82 //std::cout << lp.colNum() << std::endl; 83 //std::cout << lp.rowNum() << std::endl; 84 //std::cout << "flow value: "<< lp.getObjVal() << std::endl; 85 for (Graph::EdgeIt e(g); e!=INVALID; ++e) 86 flow.set(e, lp_flow[e]); 83 cout << "elapsed time: " << ts << endl; 87 84 }
Note: See TracChangeset
for help on using the changeset viewer.