Changeset 1005:c5990f454032 in lemon-main for tools
- Timestamp:
- 03/28/12 19:39:56 (13 years ago)
- Branch:
- default
- Children:
- 1006:764826c6e2b4, 1007:7e368d9b67f7
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/dimacs-solver.cc
r644 r1005 118 118 if (report) std::cerr << "Read the file: " << ti << '\n'; 119 119 120 ti.restart(); 121 NetworkSimplex<Digraph, Value> ns(g); 120 typedef NetworkSimplex<Digraph, Value> MCF; 121 ti.restart(); 122 MCF ns(g); 122 123 ns.lowerMap(lower).upperMap(cap).costMap(cost).supplyMap(sup); 123 124 if (sum_sup > 0) ns.supplyType(ns.LEQ); 124 125 if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n'; 125 126 ti.restart(); 126 boolres = ns.run();127 typename MCF::ProblemType res = ns.run(); 127 128 if (report) { 128 129 std::cerr << "Run NetworkSimplex: " << ti << "\n\n"; 129 std::cerr << "Feasible flow: " << (res ? "found" : "not found") << '\n';130 std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : "not found") << '\n'; 130 131 if (res) std::cerr << "Min flow cost: " << ns.totalCost() << '\n'; 131 132 } … … 187 188 188 189 int main(int argc, const char *argv[]) { 189 typedef SmartDigraph Digraph;190 191 typedef Digraph::Arc Arc;192 190 193 191 std::string inputName;
Note: See TracChangeset
for help on using the changeset viewer.