Scilab function

min_lcost_cflow - minimum linear cost constrained flow

Calling Sequence

[c,phi,v,flag] = min_lcost_cflow(i,j,cv,g)

Parameters

Description

min_lcost_cflow computes the minimum cost flow in the network g, with the value of the flow from source node i to sink node j constrained to be equal to cv.

min_lcost_cflow returns the total cost of the flows on the arcs c, the row vector of the flows on the arcs phi and the value of the flow v on the virtual arc from sink to source. If v is less than cv, a message is issued, but the computation is done: in this case flag is equal to 0, otherwise it is equal to 1.

The bounds of the flows are given by the elements edge_min_cap and edge_max_cap of the graph list. The value of the minimum capacity must be equal to zero, and the value of the maximum capacity must be non negative and must be integer numbers. If the value of edge_min_cap or edge_max_cap is not given (empty row vector []), it is assumed to be equal to 0 on each edge.

The costs on the edges are given by the element edge_cost of the graph list. The costs must be non negative. If the value of edge_cost is not given (empty row vector []), it is assumed to be equal to 0 on each edge.

The demands, element node_demand of the graph list, must be equal to zero.

This function uses the algorithm of Busacker and Goven.

Examples

See Also