Changeset 1081:c0ad2673b11f in lemon0.x for src/work/marci/lp/min_cost_gen_flow.h
 Timestamp:
 01/14/05 14:17:16 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1477
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/lp/min_cost_gen_flow.h
r1074 r1081 22 22 class PrimalMap { 23 23 protected: 24 LP SolverWrapper* lp;24 LPGLPK* lp; 25 25 EdgeIndexMap* edge_index_map; 26 26 public: 27 PrimalMap(LP SolverWrapper& _lp, EdgeIndexMap& _edge_index_map) :27 PrimalMap(LPGLPK& _lp, EdgeIndexMap& _edge_index_map) : 28 28 lp(&_lp), edge_index_map(&_edge_index_map) { } 29 29 double operator[](Edge e) const { … … 212 212 } 213 213 void runByLP() { 214 typedef LP SolverWrapperLPSolver;214 typedef LPGLPK LPSolver; 215 215 LPSolver lp; 216 216 lp.setMinimize(); … … 224 224 edge_index_map.set(e, col_it); 225 225 if (lcapacity[e]==capacity[e]) 226 lp.setColBounds(col_it, LP X_FX, lcapacity[e], capacity[e]);226 lp.setColBounds(col_it, LPSolver::FIXED, lcapacity[e], capacity[e]); 227 227 else 228 lp.setColBounds(col_it, LP X_DB, lcapacity[e], capacity[e]);228 lp.setColBounds(col_it, LPSolver::DOUBLE, lcapacity[e], capacity[e]); 229 229 lp.setObjCoef(col_it, cost[e]); 230 230 } … … 233 233 lp.col_iter_map.valid(col_it); 234 234 lp.col_iter_map.next(col_it)) { 235 std::cout << "ize " << lp.col_iter_map[col_it] << std::endl;235 // std::cout << "ize " << lp.col_iter_map[col_it] << std::endl; 236 236 } 237 237 for (typename Graph::NodeIt n(g); n!=INVALID; ++n) { … … 251 251 } 252 252 //std::cout << std::endl; 253 std::cout << " " << g.id(n) << " " << row.size() << std::endl;253 //std::cout << " " << g.id(n) << " " << row.size() << std::endl; 254 254 lp.setRowCoeffs(row_it, row.begin(), row.end()); 255 lp.setRowBounds(row_it, LP X_FX, 0.0, 0.0);255 lp.setRowBounds(row_it, LPSolver::FIXED, 0.0, 0.0); 256 256 } 257 257 lp.solveSimplex();
Note: See TracChangeset
for help on using the changeset viewer.