protocol
min_cost_flow_protocol
Minimum cost flow protocol.
logtalk_load(flow_networks(loader))staticPublic predicates
min_cost_flow/4
Computes a minimum cost flow satisfying the given supplies and demands, including arc lower bounds. Supplies is a list of Vertex-Amount pairs where a positive amount is a supply and a negative amount is a demand; vertices not listed are transshipment vertices. Duplicate vertices are added. Fails if there is no feasible flow. Negative arc costs (including negative cost cycles) are supported. Flow is a list of flow(ArcId, From, To, Amount) terms with a positive amount, one per arc carrying flow, in the order of the network arcs. ArcId is the one-based position of the arc in the input list used to construct the network.
staticmin_cost_flow(Network,Supplies,Cost,Flow)min_cost_flow(+compound,+list(pair),-integer,-list(compound)) - zero_or_one_or_errorSupplies is a partial list or contains a variable vertex:instantiation_errorSupplies is not a list of Vertex-Amount pairs:type_error(list(pair),Supplies)type_error(integer,Amount)Supplies is not a vertex of the network:existence_error(vertex,Vertex)domain_error(balanced_supplies,Supplies)min_cost_flow/5
As min_cost_flow/4, also returning the final vertex potentials as Vertex-Potential pairs in vertex order. The potentials certify non-negative reduced costs on the residual arcs.
staticmin_cost_flow(Network,Supplies,Cost,Flow,Potentials)min_cost_flow(+compound,+list(pair),-integer,-list(compound),-list(pair)) - zero_or_one_or_errorSupplies is a partial list or contains a variable vertex:instantiation_errorSupplies is not a list of Vertex-Amount pairs:type_error(list(pair),Supplies)type_error(integer,Amount)Supplies is not a vertex of the network:existence_error(vertex,Vertex)domain_error(balanced_supplies,Supplies)min_cost_max_flow/6
Computes a minimum cost flow among the maximum flows from Source to Sink. Always succeeds for valid terminals. Currently requires zero lower bounds.
staticmin_cost_max_flow(Network,Source,Sink,Value,Cost,Flow)min_cost_max_flow(+compound,+ground,+ground,-integer,-integer,-list(compound)) - one_or_errorSource or Sink is not ground:instantiation_errorSource or Sink is not a vertex of the network:existence_error(vertex,Vertex)Source and Sink are the same vertex:consistency_error(distinct_vertices,Source,Sink)domain_error(zero_lower_bounds,Network)min_cost_max_flow/7
As min_cost_max_flow/6, also returning final vertex potentials as Vertex-Potential pairs in vertex order.
staticmin_cost_max_flow(Network,Source,Sink,Value,Cost,Flow,Potentials)min_cost_max_flow(+compound,+ground,+ground,-integer,-integer,-list(compound),-list(pair)) - one_or_errorSource or Sink is not ground:instantiation_errorSource or Sink is not a vertex of the network:existence_error(vertex,Vertex)Source and Sink are the same vertex:consistency_error(distinct_vertices,Source,Sink)domain_error(zero_lower_bounds,Network)Protected predicates
(none)
Private predicates
(none)
Operators
(none)