2 %> Algorithm 21.2: circulation decomposition. Implementation of algorithm 21.2 of \cite Bier15-book
4 %> @note Tested with \ref runCirculationDecomposition.m
8 %> @author Michel Bierlaire
9 %> @date Sun Mar 29 17:16:14 2015
10 %> @ingroup Algorithms
13 %> Decompose a circulation into simple cycle flows
14 %> @param adj the adjacency matrix of the network. It is a \f$m \times m\f$ matrix, such that the element at row i and column j corresponds to the
id of the arc (i,j). The numbering should be from 1 to n.
15 %> @param circ the circulation flow
16 %> @
return simpleCycleFlows a matrix with as many columns as arcs, and as many rows as simple cycles in the decomposition
18 simpleCycleFlows = zeros(0,0) ;
20 while any(workingcirc)
22 simpleCycleFlows(end+1,:) = theCycleFlow
' ; 23 workingcirc -= theCycleFlow ; function flowDecomposition(in adj, in flow)
Decompose a flow vector into simple path flows.
function circulationDecomposition(in adj, in circ)
Decompose a circulation into simple cycle flows.
function simpleCycle(in adj, in circ, in printlevel)
Extract a simple cycle flow from a circulation.