Scilab function

min_qcost_flow - minimum quadratic cost flow

Calling Sequence

[c,phi,flag] = min_qcost_flow(eps,g)

Parameters

Description

min_qcost_flow computes the minimum quadratic cost flow in the network g. It returns the total cost of the flows on the arcs c and the row vector of the flows on the arcs phi. eps is the precision of the iterative algorithm. If the problem is not feasible (impossible to find a compatible flow for instance), flag is equal to 0, otherwise it is equal to 1.

The bounds of the flow are given by the elements edge_min_cap and edge_max_cap of the graph list. The value of the maximum capacity must be greater than or equal to the value of the minimum capacity. 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 elements edge_q_orig and edge_q_weight of the graph list. The cost on arc u is given by:

(1/2)*edge_q_weight[u](phi[u]-edge_q_orig[u])^2

The costs must be non negative. If the value of edge_q_orig or edge_q_weight is not given (empty row vector []), it is assumed to be equal to 0 on each edge.

This function uses an algorithm due to M. Minoux.

Examples

See Also