Optimization: principles and algorithms, by Michel Bierlaire
runCirculationDecomposition.m
Go to the documentation of this file.
1 %> \file
2 %> Run the circulation decomposition algorithm on the example represented in Figure 21.15 of \cite Bier15-book
3 %>
4 %> @note Calls \ref circulationDecomposition
5 %>
6 %> @ingroup Running
7 %> @author Michel Bierlaire
8 %> @date Sun Mar 29 17:18:22 2015
9 %> @ingroup chap21
10 
11 modA = [0 1 0 0 0 0 0 0 0;
12  0 0 2 3 0 0 0 0 0;
13  4 0 0 0 5 0 0 0 0;
14  0 6 0 0 7 0 0 0 0;
15  0 0 0 8 0 0 0 0 0;
16  0 0 0 0 0 0 9 0 0;
17  0 0 0 0 0 10 0 0 0;
18  0 0 0 0 0 0 0 0 0;
19  11 0 12 13 14 15 16 0 0] ;
20 
21 
22 circ = [ 4 ; # (1,2)
23  0 ; # (2,3)
24  1.5 ; # (2,4)
25  1 ; # (3,1)
26  0 ; # (3,5)
27  -2.5 ; # (4,2)
28  4 ; # (4,5)
29  1 ; # (5,4)
30  2 ; # (6,7)
31  0 ; # (7,6)
32  3 ; # (A,1)
33  1 ; # (A,3)
34  -1 ; # (A,4)
35  -3 ; # (A,5)
36  2 ; # (A,6)
37  -2 ; # (A,7)
38  ];
39 
40 simpleCycleFlows = circulationDecomposition(modA,circ)
function circulationDecomposition(in adj, in circ)
Decompose a circulation into simple cycle flows.
Copyright 2015-2018 Michel Bierlaire