Changes in / [1168:b78a46fe8002:1158:8d2e55fac752] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/dimacs-solver.cc
r1168 r1081 118 118 if (report) std::cerr << "Read the file: " << ti << '\n'; 119 119 120 typedef NetworkSimplex<Digraph, Value> MCF; 121 ti.restart(); 122 MCF ns(g); 120 ti.restart(); 121 NetworkSimplex<Digraph, Value> ns(g); 123 122 ns.lowerMap(lower).upperMap(cap).costMap(cost).supplyMap(sup); 124 123 if (sum_sup > 0) ns.supplyType(ns.LEQ); 125 124 if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n'; 126 125 ti.restart(); 127 typename MCF::ProblemTyperes = ns.run();126 bool res = ns.run(); 128 127 if (report) { 129 128 std::cerr << "Run NetworkSimplex: " << ti << "\n\n"; 130 std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL? "found" : "not found") << '\n';129 std::cerr << "Feasible flow: " << (res ? "found" : "not found") << '\n'; 131 130 if (res) std::cerr << "Min flow cost: " << ns.totalCost() << '\n'; 132 131 } … … 188 187 189 188 int main(int argc, const char *argv[]) { 189 typedef SmartDigraph Digraph; 190 191 typedef Digraph::Arc Arc; 190 192 191 193 std::string inputName;
Note: See TracChangeset
for help on using the changeset viewer.