Professional Documents
Culture Documents
Workshop Week 7
User Equilibrium Solution Methods:
Method of Successive Averages (MSA)
and The Franke-Wolfe Method
Milad Ghasri
Sisi Jian
Neeraj Saxeena
Kasun Wijayaratna
Question 1 - MSA
Consider
the following problem:
s.t.
MSA Iteration 1
Step 1: Choose starting place x0 = 0
Step 2: Evaluate gradient at x0
constraints
Step 4: Set x1 according to average rule
MSA Iteration 2
Step 1: Evaluate gradient at x1
Step 3: Set x2
MSA Iteration 3
Step 1: Evaluate gradient at x2
Step 3: Set x3
MSA Iteration 4
Step 1: Evaluate gradient at x3
Step 3: Set x4
MSA
And so on and so forth...
SLOW TO CONVERGE
We know optimal solution is -2, but
even after 1100 iterations, this
algorithm is still varying- (see
iterations 1130-1140)
Good for difficult objective functions
but simple derivative/gradients
2.0062
1.9912
1.9982
2.0053
1.9901
1.9974
2.0044
1.9894
1.9965
2.0035
1.9886
Consider
the following problem:
s.t.
and
Optimal!
UE Mathematical Programming
Formulation and Optimality Conditions
subject to
means for
each
This is the
objective
function
2+x24
3+x12
1+2x23
2+3x54
1+2x13
3
1+3x35
MSA Iteration 1
Substituting zero flows into the cost functions and look for
shortest paths
Short
est
Path
for 1
to 4
Short
est
Path
for 1
to 5
MSA Iteration 1
2
3
1
Short
est
Path
for 1
to 5
Short
est
Path
for 1
to 4
1
3
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
X*
Xn+1
MSA Iteration 1
2
3
1
Short
est
Path
for 1
to 5
Short
est
Path
for 1
to 4
1
3
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
X*
Xn+1
MSA Iteration 1
2
3
1
Short
est
Path
for 1
to 5
Short
est
Path
for 1
to 4
1
3
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
X*
Xn+1
0
0
0
0
7
4
2
5
0
10
10
0
0
10
10
0
MSA Iteration 2
2
2+x24
3+x12
1+2x23
2+3x54
1+2x13
1+3x35
3
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
0
0
10
10
0
X*
Xn+1
MSA Iteration 2
Shortest
Path for
1 to 4
1
Shortest
Path for
1 to 5
32
41
3
61
5
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
X*
97
10
134
10
102
65
Xn+1
MSA Iteration 2
Shortest
Path for
1 to 4
Assign flow to SP
1
Shortest
Path for
1 to 5
32
41
3
61
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
X*
Xn+1
10
97
10
134
10
102
MSA Iteration 2
Shortest
Path for
1 to 4
Adjust flow
1
Shortest
Path for
1 to 5
32
41
3
61
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
X*
Xn+1
10
0
10
10
0
97
134
102
65
0
0
0
10
0
5
5
5
MSA Iteration 3
2
2+x24
3+x12
1+2x23
2+3x54
1+2x13
1+3x35
3
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
5
0
5
5
X*
Xn+1
MSA Iteration 3
Shortest
Path for
1 to 4
13
1
Short
est
Path
for 1
to 5
11
17
21
3
46
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
5
20
87
84
67
X*
Xn+1
MSA Iteration 3
Shortest
Path for
1 to 4
13
Assign flow to SP
1
Short
est
Path
for 1
to 5
11
17
21
3
46
Path
1-2-4
1-2-35-4
1-3-5-4
1-3-5
1-2-3-5
Xn
Cn
X*
Xn+1
20
10
87
84
67
10
MSA Iteration 3
Shortest
Path for
1 to 4
13
Adjust flow
1
Short
est
Path
for 1
to 5
11
17
21
3
46
Path
1-2-4
1-2-35-4
1-3-5-4
Xn
Cn
X*
Xn+1
20
10
87
84
67
10
1-3-5
6.666666
67
0
3.333333
33
6.666666
67
MSA Iteration 4
2
2+x24
3+x12
1+2x23
2+3x54
1+2x13
1+3x35
3
Path
1-2-4
1-2-3-5-4
1-3-5-4
1-3-5
Xn
6.666666
67
0
3.333333
33
6.666666
67
Cn
X*
Xn+1
MSA Iteration 4
Assign flow to SP
Path
1-2-4
1-2-3-5-4
1-3-5-4
1-3-5
Xn
Cn
6.666666
21.66667
67
0 73.66667
3.333333
74
33
6.666666
62
67
X*
Xn+1
MSA Iteration 4
Shortest
Path for
1 to 4
Assign flow to SP
Shortest
Path for
1 to 5
Path
1-2-4
1-2-3-5-4
1-3-5-4
1-3-5
Xn
Cn
6.666666
21.66667 10
67
0 73.66667 0
3.333333
74
0
33
6.666666
62
0
67
X*
Xn+1
MSA Iteration 4
Shortest
Path for
1 to 4
Recalculate xi
Shortest
Path for
1 to 5
Path
1-2-4
1-2-3-5-4
1-3-5-4
1-3-5
1-2-3-5
Xn
6.666666
67
0
3.333333
33
6.666666
67
3.333333
And we continue to do
this procedure until
convergence. The
convergence of the
algorithm will be seen
when the change
between solution "n" and
solution
"n+1" is small
Cn
X*
Xn+1
enough.
21.66667 10
7.5
73.66667 0
74
2.5
62
Frank Wolfe
2
2+x24
3+x12
1
1+2x23
2+3x54
1+2x13
1+3x35
Approach to using Frank Wolfe:
3
5
1
Begin. Set X = 0 , n = 1
While (error > convergence)
Update link costs Cn using link flows Xn
Find shortest path for each OD pair and assign auxiliary flow vector X*
Determine optimal by solving sub problem
Update link flows Xn+1 according to the rule and increment iteration
counter n
Costs
Cn
Fbar
1-2-4
1-2-35-4
1-3-5-4
Link
1-3-5
1-2
1-2-3-5
1-3
2-3
2-4
3-5
5-4
Xn
Cn
X*
Xn+1
Path
Costs
Cn
Fbar
1-2-4
1-2-35-4
1-3-5-4
Link
1-3-5
1-2
1-2-3-5
1-3
2-3
2-4
3-5
5-4
Xn
Cn
X*
Xn+1
3
Costs
Cn
1-2-4
Fbar
1-3-5-4
1+2x23
Link
1-3-5
1-2
1-2-3-5
C
3
1-3
X 2
0 5
0
2-3
2-4
3-5
5-4
X*
n+1
2+x24
3+x12
1+2x13
1-2-35-4
n
1+3x35
2+3x54
Increment counter so
n=2
Costs
Cn
5
Fbar
0
7
4
2
Xn 5
0
0
0
0
0
0
Cn
3
1
1
2
1
2
1+2x23
Xn+1
0
20
0
0
20
10
2+x24
3+x12
1+2x13
0
10
10
0 X*
0
20
0
0
20
10
1+3x35
2+3x54
Increment counter so
n=2
Path
Costs
Cn
1-2-4
1+2x23
1+2x13
1-2-35-4
1-3-5-4
Link
1-3-5
1-2
1-2-3-5
Xn
0
1-3
20
2-3
2-4
3-5
20
5-4
10
Cn
X*
Xn+1
3+x12
Fbar
2+x24
1+3x35
2+3x54
Costs
Cn
5
Fbar
10
97
1+2x23
134
102
Xn65
0
0
0
Cn 10 X*
3
20
1-3
20
41
2-3
10
2-4
10
3-5
20
61
10
5-4
10
32
3+x12
1+2x13
2+x24
Xn+1
Now find
1+3x35
2+3x54
Solving
the
subprobl
em
Remember
we are
considering the sum of
the integrations of all
the cost functions for
example considering
the link from 1 to 2:
To minimise our
objective
function
where
Costs
Cn
5
Fbar
1+2x23
1+2x13
134
102
65
Xn
0
0
10
Cn
X*
1-2
20
1-3
20
41
2-3
10
2-4
10
3+x12
10
97
2+x24
1+3x35
2+3x54
Xn+1
15.8095
2
4.19047
6
7.90476
2
7.90476
2
12.0952
= 0.79048
Increment counter so
n=3
Costs
Cn
Fbar
1-2-35-4
1-3-5-4
1-2
1-2-3-5
1-3
2-3
2-4
1+2x23
1+2x13
Xn
15.8095
2
4.19047
6
7.90476
2
7.90476
2
12.0952
Cn
X*
3+x12
1-2-4
Link
1-3-5
2+x24
Xn+1
1+3x35
2+3x54
Costs
Cn
28.7142
9
81.1904
8
54.9523
8n
X
46.6666
15.8095
7
2
72.9047
4.19047
6
6
7.90476
2
7.90476
2
12.0952
Fbar
1+2x23
18.8095
2
9.38095
2
16.8095
2
9.90476
2
37.2857
X*
3+x12
1+2x13
Cn
2+x24
Xn+1
1+3x35
2+3x54
Costs
Cn
28.7142
9
81.1904
8
54.9523
8n
X
46.6666
15.8095
7
2
72.9047
4.19047
6
6
7.90476
2
7.90476
2
12.0952
Fbar
2
9.38095
0
2
16.8095
2
9.90476
2
37.2857
1+2x23
1+2x13
X*
10
10
0
10
3+x12
10
0
Cn
18.8095
10
2+x24
Xn+1
1+3x35
2+3x54
Link
1-2
1-3
2 -3
2-4
3-5
5-4
X*
lamda
1-lamda
lamda
(1-lamda)2 2*X*X**B
> 1, so set = 1
as this indicates Xn
solution was no
where near
equilibrium so just
use the new all or
nothing
assignment of
Costs
Cn
28.7142
9
81.1904
8
54.9523
8n
X
46.6666
15.8095
7
2
72.9047
4.19047
6
6
7.90476
2
7.90476
2
12.0952
1+2x23
1+2x13
10
2
9.38095
0
2
16.8095
2
9.90476
2
37.2857
3+x12
Fbar
0
Cn
18.8095
10
2+x24
X*
Xn+1
10
10
10
10
10
10
10
1+3x35
2+3x54
=1
Increment counter so
n=4
Costs
Cn
Fbar
1+2x23
1+2x13
1-2-35-4
1-3-5-4
Xn
1-3
10
2-3
2-4
10
3-5
10
5-4
10
Cn
X*
3+x12
1-2-4
Link
1-3-5
1-2
1-2-3-5
2+x24
Xn+1
1+3x35
2+3x54
Costs
Cn
25
Fbar
1+2x23
1+2x13
54
52
45
Xn
0
0
10
Cn
X*
10
13
20
1-3
10
21
2-3
10
2-4
10
12
10
3-5
10
31
10
5-4
3+x12
10
47
2+x24
Xn+1
1+3x35
2+3x54
Costs
Cn
25
10
0
54
52
45
Xn
0
0
10
Cn
10
13
1-3
10
21
2-3
2-4
10
12
3-5
10
31
5-4
1+2x23
1+2x13
3
X*
20
0
10
10
10
0
3+x12
Fbar
47
2+x24
Xn+1
11.4
8.6
1+3x35
2+3x54
=0.1
4
1.4
10
10
0
Increment counter so
n=5
How do we prove
equilibrium conditions?
Cost
Flow
1-2-4
26.4
10
1-2-3-5-4
51.2
1-3-5-4
51.2
1-3-5
49.2
1.4
1-2-3-5
49.2
8.6
Paths to
Node 4
Paths to
Node 5