src/work/marci/lp/max_flow_by_lp.cc
changeset 1151 b217fc69f913
parent 1025 3b1ad8bc21da
equal deleted inserted replaced
6:1866759d5e13 7:6dd744414175
     8 #include <lemon/time_measure.h>
     8 #include <lemon/time_measure.h>
     9 //#include <graph_wrapper.h>
     9 //#include <graph_wrapper.h>
    10 #include <lemon/preflow.h>
    10 #include <lemon/preflow.h>
    11 #include <augmenting_flow.h>
    11 #include <augmenting_flow.h>
    12 //#include <preflow_res.h>
    12 //#include <preflow_res.h>
    13 #include <lp_solver_wrapper.h>
    13 //#include <lp_solver_wrapper_2.h>
    14 #include <min_cost_gen_flow.h>
    14 #include <min_cost_gen_flow.h>
    15 
    15 
    16 // Use a DIMACS max flow file as stdin.
    16 // Use a DIMACS max flow file as stdin.
    17 // max_flow_demo < dimacs_max_flow_file
    17 // max_flow_demo < dimacs_max_flow_file
    18 
    18 
   177   LCap lcap(0);
   177   LCap lcap(0);
   178 
   178 
   179   MinCostGenFlow<Graph, int, Excess, LCap> 
   179   MinCostGenFlow<Graph, int, Excess, LCap> 
   180     min_cost(g, excess, lcap, cap, flow, cost); 
   180     min_cost(g, excess, lcap, cap, flow, cost); 
   181   min_cost.feasible();
   181   min_cost.feasible();
   182   min_cost.run();
   182   min_cost.runByLP();
   183 
   183 
   184   std::cout << "elapsed time: " << ts << std::endl;
   184   std::cout << "elapsed time: " << ts << std::endl;
   185   std::cout << "flow value: "<< flow[e] << std::endl;
   185   std::cout << "flow value: "<< flow[e] << std::endl;
   186 }
   186 }