diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h --- a/lemon/network_simplex.h +++ b/lemon/network_simplex.h @@ -1147,6 +1147,7 @@ // Run Circulation to check if a feasible solution exists typedef ConstMap ConstArcMap; + ConstArcMap zero_arc_map(0), inf_arc_map(inf_cap); FlowNodeMap *csup = NULL; bool local_csup = false; if (_psupply) { @@ -1167,17 +1168,17 @@ circ_result = circ.run(); } else { Circulation - circ(_graph, *_plower, ConstArcMap(inf_cap), *csup); + circ(_graph, *_plower, inf_arc_map, *csup); circ_result = circ.run(); } } else { if (_pupper) { Circulation - circ(_graph, ConstArcMap(0), *_pupper, *csup); + circ(_graph, zero_arc_map, *_pupper, *csup); circ_result = circ.run(); } else { Circulation - circ(_graph, ConstArcMap(0), ConstArcMap(inf_cap), *csup); + circ(_graph, zero_arc_map, inf_arc_map, *csup); circ_result = circ.run(); } } @@ -1194,17 +1195,17 @@ circ_result = circ.run(); } else { Circulation - circ(rgraph, *_plower, ConstArcMap(inf_cap), neg_csup); + circ(rgraph, *_plower, inf_arc_map, neg_csup); circ_result = circ.run(); } } else { if (_pupper) { Circulation - circ(rgraph, ConstArcMap(0), *_pupper, neg_csup); + circ(rgraph, zero_arc_map, *_pupper, neg_csup); circ_result = circ.run(); } else { Circulation - circ(rgraph, ConstArcMap(0), ConstArcMap(inf_cap), neg_csup); + circ(rgraph, zero_arc_map, inf_arc_map, neg_csup); circ_result = circ.run(); } }