Sei sulla pagina 1di 13

Equilibrium Solution Methods

CE 392C
Stephen D. Boyles
Fall 2013
1 Introduction
Thus far in the course, weve learned what the principle of user equilibrium is, some basic optimization
techniques, and derived the Beckmann formulation which allows you to nd user equilibrium link ows by
solving an optimization problem. Now, well talk about how you actually solve this problem, especially on
large networks. We could just use the trial-and-error method described in earlier notes, but that isnt the
most ecient way, and as well soon see, when it comes to large-scale transportation networks, nding an
ecient algorithm is of the utmost importance.
Briey reviewing, user equilibrium link demands can also be represented as the optimal solution to the
program
min
x,h

(i,j)A

xij
0
t
ij
(x)dx (1)
s.t. x
ij
=

ij
(i, j) A (2)

rs
h

= d
rs
(r, s) Z
2
(3)
h

0 (4)
where x
ij
is the travel demand on a link, t
ij
() the link performance function mapping link demand to travel
time, h

is the number of people choosing path , d


rs
the total number of people traveling from origin r
to destination s,

ij
is an indicator variable (one if link (i, j) is part of path k, and zero otherwise), and A
and Z are the sets of all links and zones. Substituting constraint (2) into the objective function, writing
the optimality conditions, reversing the substitution (2), and simplifying further with some algebra, these
conditions include
C


rs
(r, s) Z
2
,
rs
(5)
h

(C

rs
) = 0

(r,s)Z
2

rs
(6)
h

0 (7)
where C

is the total travel time on path . Condition (5) states that the travel time on each path is at
least equal to the minimum travel time
rs
among all paths connecting OD pair (r, s) must share. To satisfy
the complementarity condition (6), we either must have C

=
rs
(path is a shortest path between r and
s) or h

= 0 (the path is unused). This is exactly the denition of user equilibrium ows.
Well now describe a few methods to solve this formulation, keeping in mind applicability to large networks.
Well start with two simple methods (the method of successive averages and Frank-Wolfe), then move on to
some other topics of importance. Later in the course, well return to this original problem and cover more
advanced solution methods. Eventually, well see all of these algorithms:
1
Method of Successive Averages (MSA) No longer a practical method, but the simplest to understand
and illustrates the basic concepts. Advantage: requires very little computer memory; disadvantage:
convergence to the equilibrium solution is glacially slow.
Frank-Wolfe (FW) For many decades, the most commonly used by transportation planners and software
programs. Advantage: requires no more memory than MSA, but a good deal faster; disadvantage:
convergence is still far too slow on large networks.
Gradient Projection (GP) Developed in the mid-1990s, with a resurgence in the past few years. This
is the quintessential path-based algorithm. Advantage: can nd much more accurate solutions than
MSA and FW, and much faster; disadvantage: can require a huge amount of computer memory.
Algorithm B Developed in 2006 by Bob Dial, this method is fast, intuitive, and relatively easy to imple-
ment. Not yet included in these notes.
Trac Assignment by Paired Alternative Segments (TAPAS) One of the most recent algorithms
(published in 2010), developed by Hillel Bar-Gera, seems to oer performance superior to any of the
above. Not yet included in these notes.
The importance of selecting a good algorithm is shown by considering the progress of these ve algorithms on
the Chicago Regional network, which is commonly used as a realistic large-scale network for testing purposes.
This network has 12,982 nodes; 39,018 links; and 2,297,945 OD pairs
1
Current wisdom is that a relative gap
of 10
6
is small enough for practical purposes; TAPAS can reach this level of precision in about 20 minutes,
gradient projection and Algorithm B in roughly 2 hours. Frank-Wolfe would require approximately 42 days,
and the method of successive averages over 100 years! For the sake of stress-testing, lets say we want
to run each algorithm until the gap is reduced below the precision of standard data types in the computer
(roughly 10
15
). TAPAS would require about an hour to reach this level, gradient projection about 10 hours,
and Algorithm B a few days. Such precision with FW and MSA is frankly impossible: extrapolating their
convergence rate, FW needs 80,000 years to reach this level, and MSA over 10
16
years nearly a billion
times longer than the age of the universe. The moral of the story: even though each of these algorithms
works in the sense that they will eventually get to the right answer, for large-scale practical problems it is
hugely important to pick a good one. The good news is that all examples and homework problems in this
class will be small enough that any of them can be usefully applied.
2 History
The earliest methods used for trac assignment were heuristic in nature, and not guaranteed to nd an exact
equilibrium solution, or even to converge towards one. Examples include simply assigning all vehicles to the
shortest paths using free-ow travel times, or incremental assignment methods, where a certain number
of vehicles was assigned to free-ow shortest paths; travel times were recomputed; an additional number of
vehicles assigned to the new shortest paths; travel times recalculated again; more vehicles assigned; and so
forth.
The rst exact method to achieve popularity in practice, and one of the longest-lasting, was the Frank-Wolfe
method, rst applied to transportation problems in the late 1960s and 1970s. It was acceptably fast given
the network sizes being used and standards of the day, more accurate than incremental assignment, and
most importantly, required very little computer memory in a day when RAM was a scarce and expensive
1
Please dont try to solve this one by hand.
2
commodity. Furthermore, the algorithm had an appealing intuitive interpretation which was easily under-
stood. Faster and more accurate methods were developed in the 1980s and 1990s, but these all failed to
reach the same ubiquity in practice that Frank-Wolfe did. Some of these techniques, including path-based
algorithms such as gradient projection, were developed during this time, but computers had yet to reach the
point where increased speed could justify the extravagance of higher memory consumption.
A seminal development in the history of algorithms for the trac assignment problem is the concept of
a bush, which well return to later in this course. Bush-based methods were independently developed by
several researchers. The rst approach to gain wide attention for trac assignment was the origin-based
assignment algorithm developed by Hillel Bar-Gera in his doctoral dissertation, around the turn of the
millennium. This method was substantially faster than link-based methods such as Frank-Wolfe, yet did not
have the exorbitant memory requirements that path-based algorithms require. Bushes also proved highly
useful in other network-related problems, and improved bush-based methods have been developed since that
time. Much of the commercially-available planning software in use today uses a bush-based method.
3 Framework
As the above discussion might suggest, none of these solution methods get to the right answer immediately.
That is, there isnt any step one, step two, step three, and then were done recipe for solving large-scale
equilibrium problems
2
. Instead, an iterative approach is used where we start with some assignment of drivers
to paths and links, and move closer and closer to the equilibrium solution as you repeat a certain set of steps
over and over, until youre close enough to quit and call it good.
3
Broadly speaking, all equilibrium solution algorithms repeat the following three steps:
1. Find the fastest path between each origin and each destination.
2. Shift travelers from slower paths to faster ones.
3. Recalculate link demands and travel times after the shift, and return to step one unless weve close
enough to equilibrium.
Well soon talk about how to nd the fastest paths (the rst step) in a systematic way. The good news is
that this can be done quickly and eciently even in large networks; for now we can spot the fastest paths
by inspection. The third step is even more straightforward, and is nothing more than re-evaluating the link
performance functions on each link with the new volumes. The second step requires the most care; the
danger here is shifting either too few travelers onto faster paths, or shifting too many. If we shift too few,
then it will take a long time to get to the equilibrium solution. On the other hand, systematically shifting too
many can be even more dangerous, because it creates the possibility of innite cycling and never nding
the true equilibrium.
Recall the simple example in Figure 1, where the equilibrium is for thirty travelers to choose the top route,
and twenty to choose the bottom route, with an equal travel time of 40 minutes on both paths. Solving
this example using the above process, initially (i.e., with nobody on the network) the fastest path is the
top one (step one), so lets assign all 50 travelers onto the top path (step two). Performing the third step,
we recalculate the travel times as 60 minutes on the top link, and 20 on the bottom. This is not at all
2
If you can think of one, please let me know. Youll win the Nobel prize in economics. Im not exaggerating.
3
One iterative algorithm you probably saw in calculus was Newtons method for nding zeroes of a function. Repeat the
same step over and over until the function is suciently close to zero.
3
1 2
10 + x
1
20 + x
2
50 vehicles
traveling
from 1 to 2
Figure 1: Two-link example for demonstration.
an equilibrium, so we go back to the rst step, and see that the bottom path is now faster, so we have to
shift some people from the top to the bottom. If we wanted, we could shift travelers one at a time, that is,
assigning 49 to the top route and 1 to the bottom, seeing that we still havent found equilibrium, so trying
48 and 2, then 48 and 7, and so forth, until nally reaching the equilibrium with 30 and 20. Clearly this is
not ecient, and is an example of shifting too few travelers at a time.
At the other extreme, lets say we shift everybody onto the fastest path in the second step. That is, we go
from assigning 50 to the top route and 0 to the bottom, to assigning 0 to the top and 50 to the bottom.
Recalculating link travel times, the top route now has a travel time of 10 minutes, and the bottom a travel
time of 70. This is even worse!
4
Repeating the process, we try to x this by shifting everybody back (50 on
top, 0 on bottom), but now were just back in the original situation. If we kept up this process, wed keep
bouncing back and forth between these solutions. This is even worse than shifting too few, because we never
reach the equilibrium no matter how long we work! You might think its obvious to detect if something like
this is happening. With this small example, it might be. Trying to train a computer to detect this, or trying
to detect cycles with over 2 million OD pairs (as in Chicago), is much much harder.
At this point, its worth using the Beckmann formulation to show that this intuitive approach has math-
ematical justication. If x represents the current set of link demands, and x

the set of link demands if


everybody was loaded on the shortest paths using the current travel times t(x), shifting travelers onto
shortest path corresponds to moving from x in the direction of the vector x

x, to some new solution


x

= x +(x

x) = (1 )x +x

where represents the size of the step taken in this direction = 0


corresponds to no shift at all, while = 1 corresponds to shifting everybody onto the current shortest paths.
As a result of this shift, the Beckmann function will be changed from f(x) to f(x
1
), and we want to show
that its possible to choose in some way to guarantee f(x

) f(x). That is, we want to show that we can


reduce the Beckmann function (and thus move closer to the equilibrium solution) by taking a (correctly-
sized) step in the direction x

x. Dene f(x()) = f((1 )x + x

) to be the Beckmann function after


taking a step of size . Using the multivariate chain rule, the derivative of f() is
df
d
=

(i,j)A
f
x
ij
dx
ij
d
=

(i,j)A
t
ij
((1 )x
ij
+ x

ij
)(x

ij
x
ij
)
Evaluating this derivative at = 0 gives
d
d
(0) =

(i,j)A
t
ij
(x
ij
)(x

ij
x
ij
)
Now, x

was specically chosen to put all vehicles on the shortest paths at travel times t(x), and so

(i,j)A
x

ij
t
ij
(x
ij
)

(i,j)A
x
ij
t
ij
(x
ij
), and therefore
df
d
(0) 0. Furthermore, if we are not at the equi-
librium solution already,

(i,j)A
x

ij
t
ij
(x
ij
) is strictly less than

(i,j)A
x
ij
t
ij
(x
ij
). This implies
df
d
(0) < 0
4
By worse I mean farther from equilibrium.
4
or, equivalently, we can decrease the Beckmann function if we take a small enough step in the direction
x

x, by shifting people from longer paths onto shorter ones.


The question of exactly how large a step we ought to take will be taken up in subsequent sections, and is
the main step in which algorithms dier.
3.1 Stopping Criteria
A general issue is how one chooses to stop the iterative process, that is, how one knows when a solution is
good enough or close enough to equilibrium. This is called a convergence criterion. Many convergence
criteria have been proposed over the years; perhaps the most common is the relative gap, which is dened
here. Remembering that the multiplier
rs
represents the time spent on the fastest path between origin r
and destination s, the relative gap is commonly dened as follows:
=

(i,j)A
t
ij
x
ij

(r,s)Z
2
rs
d
rs
1 =
t x
d
1 (8)
Notice that the numerator of the fraction is the total system travel time (TSTT). The relative gap is always
nonnegative, and it is equal to zero if and only if the ows x
a
satisfy the principle of user equilibrium.
5
It is
these properties which make the relative gap a useful convergence criterion: once it is close enough to zero,
our solution is close enough to equilibrium. For most practical purposes, a relative gap of 10
6
is small
enough.
One drawback of the relative gap is that it is unitless and does not have an intuitive meaning. Furthermore,
there are several slightly dierent variations of the relative gap which are currently used, and while they
all retain the above avor, the exact denitions may vary. A more recently proposed metric is the average
excess cost, dened as
AEC =

(i,j)A
t
ij
x
ij

(r,s)Z
2
rs
d
rs

(r,s)Z
2 d
rs
=
t x d
d 1
(9)
This quantity represents the average dierence between the travel time on each travelers actual path, and
the travel time on the shortest path available to him or her. Unlike the relative gap, AEC has units of time,
and is thus easier to interpret.
4 Method of Successive Averages
Although the method of successive averages (MSA) is not competitive with other equilibrium solution algo-
rithms, its simplicity and clarity in applying the three-step iterative process make it an ideal starting place.
One advantage of MSA is that you never need to work with the path ows h

this algorithm operates


entirely in the space of link ows x
ij
. In large networks, there are many, many more used paths than links
(93,026,894 used paths vs. 39,018 links in the Chicago Regional network), so this is important.
The rst and third steps of MSA operate the same as in all other equilibrium algorithms, so this section
and all following ones focus only on step two: once youve found the shortest paths, how do you decide how
many travelers to shift onto these, and how many stay on their current paths? As shown above, there are
5
If this is not apparent to you, it is worthwhile studying this equation closely until you understand why.
5
problems if you shift too few travelers, and potentially even bigger problems if you shift too many. MSA
adopts a reasonable middle ground: initially, we shift a lot of travelers, but as the algorithim progresses, we
shift fewer and fewer until we settle down on the average. The hope is that this avoids both the problems of
shifting too few (at rst, were taking big steps, so hopefully we get somewhere close to equilibrium quickly)
and of shifting too many (eventually, well only be moving small amounts of ow so there is no worry of
innite cycling).
Specically, on the i-th iteration, MSA shifts 1/i of the travelers onto the shortest paths. So, the rst time
through the three steps, everybody is assigned to shortest paths. The second time through, half of the people
stay on their current paths and half shift to the new shortest paths. On the third iteration, a third of the
people shift to new paths, and two thirds stay on their old paths, and so forth. A complete description of
MSA is as follows; in these steps, x
i
is the vector of link ows after the i-th iteration of MSA.
1. Set the iteration counter i = 1.
2. Find the shortest path between each origin and destination, and calculate the relative gap (unless it is
the rst iteration). If the relative gap is suciently small, stop.
3. Shift travelers onto shortest paths:
(a) Find the link ows if everybody were traveling on the shortest paths found in step 1, store these
in x

.
(b) If this is the rst iteration, x
1
= x

. Otherwise, x
i
= (1/i)x

+ (1 1/i)x
i1
.
4. Calculate the new link travel times and the relative gap. Increase the iteration counter i by one and
return to step 1.
4.1 Small network example
Here we solve the small example of Figure 1 by MSA, using the relative gap to measure how close we are to
equilibrium.
Initialization. Set i = 1.
Iteration 1. Find the shortest paths: with no travelers on the network, the top link has a travel time
of 10, and the bottom link has a travel time of 20. Therefore the top link is the shortest path, so
x

50 0

. Since is the rst iteration, we simply set x


1
= x

50 0

. Recalculating the travel


times, we have t
1
= 10 + x
1
= 60 and t
2
= 20 + x
2
= 20 (or, in vector form, t
1
=

60 20

). We set
i = 2 and return to step 1.
Iteration 2. With the new travel times, the shortest path is now the bottom link, so u = 20 and the relative
gap is
=
t x
u q
1 =
50 60 + 0 20
20 50
1 = 2
This is far too big, so we continue with the second iteration. If everyone were to take the new shortest
path, the ows would be x

0 50

. Because this is iteration 2, we shift 1/2 of the travelers onto


this path, so x
2
= (1/2)x

+ (1/2)x
1
=

0 25

25 0

25 25

. The new travel times are thus


t
2
=

35 45

. We set i = 3 and return to step 1.


6
1
2
3
4
5 6
1
2
1
4
3
5 6
7
3 4
1 5,000 0
2 0 10,000
Figure 2: Larger example with two OD pairs. (Link numbers shown.)
Iteration 3. With the new travel times, the shortest path is now the top link, so u = 35 and the relative
gap is
=
t x
u q
1 =
25 35 + 25 45
35 50
1 = 0.143
This is still too big, so we continue with the third iteration. If everyone were to take the new shortest
path, the ows would be x

50 0

. Because this is iteration 3, we shift 1/3 of the travelers onto


this path, so x
3
= (1/3)x

+ (2/3)x
2
=

50/3 0

50/3 50/3

100/3 50/3

. The new travel


times are thus t
3
=

43.33 36.67

. Set i = 4 and return to step 1.


Iteration 4. With the new travel times, the shortest path is now the bottom link, so u = 36.67 and
the relative gap is = 0.121. A bit better, but still too big, so we carry on. Here x

0 50

,
x
4
= (1/4)x

+(3/4)x
3
=

0 50/4

25 50/4

25 25

. The new travel times are t


4
=

35 45

.
Set i = 5 and return to step 1. Note that we have returned to the same solution found in Iteration 2.
Dont despair; this just means the last shift was too big. Next time well shift fewer vehicles (because
1/i is smaller).
Iteration 5. With the new travel times, the shortest path is now the top link, so u = 35 and the relative
gap is = 0.143. This is the same as in Iteration 3, but take courage and carry on. x

50 0

,
x
5
= (1/5)x

+ (4/5)x
4
=

30 20

. The new travel times are t


5
=

40 40

. Set i = 6 and return to


step 1. We can tell this is the equilibrium by inspection, but for the sake of rigor well continue until
the algorithm formally ends.
Iteration 6. With the new travel times, the shortest path is the top link, so u = 30 and the relative gap is
= 0, so we stop. In fact, either path could have been chosen for the shortest path. Whenever there is
a tie between shortest paths, you are free to choose among them.
So, for the small example it took MSA six iterations to nd the right solution.
4.2 Larger network example
Here we apply MSA to a slightly larger network with two OD pairs, shown in Figure 2, where each link has
the link performance function t(x) = 10 + x/100.
There are four paths in this network; for OD pair (1,3) these are denoted [1, 3] and [1, 5, 6, 3] according to
their link numbers, and for OD pair (2,4) these are [2, 5, 6, 4] and [2, 4]. In this example, well calculate the
average excess cost, rather than the relative gap.
7
Initialization. Set i = 1.
Iteration 1. Find the shortest paths: with no travelers on the network, paths [1, 3], [1, 5, 6, 3], [2, 5, 6, 4],
and [2, 4] respectively have travel times of 10, 30, 30, and 10. Therefore [1, 3] is shortest for OD pair
(1,3), and [2, 4] is shortest for OD pair (2,4), so x

5000 0 0 0 0 0 10000

.
6
Since is the
rst iteration, we simply set
x
1
= x

5000 0 0 0 0 0 10000

Recalculating the travel times, we have


t
1
=

60 10 10 10 10 10 110

We set i = 2 and return to step 1.


Iteration 2. With the new travel times, the shortest path for (1,3) is now [1, 5, 6, 3], with a travel time of
30, so
13
= 30. Likewise, the new shortest path for (2,4) is [2, 5, 6, 4], so
24
= 30 and the average
excess cost is
AEC =
t x q
d 1
=
5000 60 + 10000 110 30 5000 30 10000
5000 + 10000
= 63.33
This is far too big and suggests that the average trip is 63 minutes faster than the shortest paths
available! We are nowhere near equilibrium, so we continue with the second iteration. If everyone were
to take the new shortest paths, the ows would be
x

0 5000 15000 5000 10000 10000 0

(Be sure you understand how we calculated this.) Because this is iteration 2, we shift 1/2 of the
travelers onto this path, so
x
2
= (1/2)x

+ (1/2)x
1
=

2500 2500 7500 2500 5000 5000 5000

The new travel times are thus


t
2
=

35 35 85 35 60 60 60

We set i = 3 and return to step 1.


Iteration 3. With the new travel times, the shortest path for (1,3) is now [1, 3], with u
13
= 35. The new
shortest path for (2,4) is [2, 4], so
24
= 60 and the average excess cost is
AEC =
2500 35 + 2500 35 + 7500 85 + 2500 35 + 5000 60 + 5000 60 + 5000 60 35 5000 60 10000
15000
= 68.33
This is still big (and in fact worse), but we persistently continue with the second iteration. If everyone
were to take the new shortest paths, the ows would be
x

5000 0 0 0 0 0 10000

so
x
3
= (1/3)x

+ (2/3)x
2
=

3333 1667 5000 1667 3333 3333 6667

The new travel times are


t
3
=

43.3 26.7 60 26.7 43.3 43.3 76.7

We set i = 4 and return to step 1.


6
For each OD pair, we add the total demand from the OD matrix onto each link in the shortest path.
8
Iteration 4. With the new travel times, the shortest path for (1,3) is still [1, 3], with
13
= 43.3, and
the shortest path for (2,4) is still [2, 4] with
24
= 76.7 and the average excess cost is AEC = 23.6.
Continuing the fourth iteration, as before
x

5000 0 0 0 0 0 10000

so
x
4
= (1/4)x

+ (3/4)x
3
=

3750 1250 3750 1250 2500 2500 7500

The new travel times are


t
4
=

47.5 22.5 47.5 22.5 35 35 85

We set i = 5 and return to step 1.


Iteration 5. With the new travel times, the shortest path for (1,3) is still [1, 3], with
13
= 47.5, and
the shortest path for (2,4) is still [2, 4] with
24
= 85 and the average excess cost is AEC = 9.42.
Continuing the fth iteration, as before
x

5000 0 0 0 0 0 10000

so
x
5
= (1/5)x

+ (4/5)x
4
=

4000 1000 3000 1000 2000 2000 8000

The new travel times are


t
5
=

50 20 40 20 30 30 90

We set i = 6 and return to step 1.


Iteration 6. With the new travel times, the shortest path for (1,3) is still [1, 3], with
13
= 50, and the
shortest path for (2,4) is still [2, 4] with
24
= 90 and the average excess cost is AEC = 3.07. Note
that the shortest paths have stayed the same over the last three iterations. This means that we really
could have shifted more ow than we actually did. The Frank-Wolfe algorithm, described in the next
section, xes this problem. We have
x

5000 0 0 0 0 0 10000

so
x
6
= (1/6)x

+ (5/6)x
5
=

4167 833 2500 833 1667 1667 8333

The new travel times are


t
6
=

51.7 18.3 35 18.3 26.7 26.7 93.3

We set i = 7 and return to step 1.


Iteration 7. With the new travel times, the shortest path for (1,3) is still [1, 3], with
13
= 51.7, but the
shortest path for (2,4) is now [2, 5, 6, 4] with
24
= 88.3. The average excess cost is AEC = 3.80. Note
that the OD pairs are no longer behaving symmetrically, the shortest path for (1,3) stayed the same,
but the shortest path for (2,4) has changed. We have
x

5000 0 10000 0 10000 10000 0

so
x
7
= (1/7)x

+ (6/7)x
6
=

4286 714 3571 714 2857 2857 7142

The new travel times are


t
7
=

52.9 17.1 45.7 17.1 38.6 38.6 81.4

We set i = 8 and return to step 1.


9
This process continues over and over until the average excess cost is suciently small. Even with such a
small network, MSA requires a very long time to converge. An average excess cost of 1 is obtained after
twelve iterations, 0.1 after sixty-four iterations, 0.01 after three hundred thirty-three, and Im not patient
enough to go further.
5 Frank-Wolfe
One of the biggest drawbacks with MSA is that it has a xed step size (or, more informally, a dumb step
size). Iteration i moves exactly 1/i of the travelers onto the new shortest paths, no matter how close or far
away we are from the equilibrium. Essentially, MSA decides its course of action before it even gets started,
then sticks stubbornly to the plan of moving 1/i travelers each iteration. The Frank-Wolfe (FW) algorithm
xes this problem by using an adaptive step size. At each iteration, FW calculates exactly the right amount
of ow to shift to get as close to equilibrium as possible.
So, at each iteration we calculate the new ows with the equation x
i
= x

+ (1 )x
i1
. With MSA we
always chose = 1/i, but with FW is chosen adaptively. The extreme values = 0 and = 1 mean we
keep everybody on the current path, or shift everybody to the shortest path, respectively. We want to pick
in this range in such a way that x
i
is as close to equilibrium is possible. We might try to do this by picking
to minimize the relative gap or average excess cost, but this turns out to be harder to compute. Instead,
we pick to minimize the Beckmann function.
Recall the discussion above, where we wrote the function () = z((1 )x
0
+ x

) to be the value of the


Beckmann function after taking a step of size , and furthermore found the derivative of to be
d
d
=

(i,j)A
t
ij
((1 )x
0
ij
+ x

ij
)(x

ij
x
0
ij
) (10)
It is not dicult to show that is a convex function, so we can nd its minimum by setting the derivative
equal to zero, which occurs if the condition

(i,j)A
x

ij
t
ij
((1 )x
0
ij
+ x

ij
) =

(i,j)A
x
0
ij
t
ij
((1 )x
0
ij
+ x

ij
) (11)
is satised. Study this equation carefully: the coecients x
0
ij
and x

ij
are constants and do not change with ;
the only part of this condition which is aected by are the travel times. You can interpret this equation as
trying to nd a balance between x
0
and x

in the following sense: dierent values of correspond to shifting


a dierent number of travelers from their current paths to shortest paths, which will result in dierent travel
times on all the links. You want to pick so that, after you make the switch, both the old paths x
0
and the
old shortest paths x

are equally attractive in terms of their travel times. (If you dont nd this intuitive
justication convincing, then you can focus on the mathematical one: this condition entails choosing the
value minimizing the Beckmann function.)
More practically, you might ask how to solve the equation (11) for , since the link performance functions
are typically nonlinear. General techniques such as Newtons Method or an equation solver can be used;
but its not too dicult to use an enlighted trial-and-error method such as a binary search or bisection
because is convex, its derivative is increasing, and typically d/d 0 for = 0 and d/d 0 for = 1.
Pick = 1/2 and calculate d/d. If its negative, you know the zero occurs in the interval [1/2, 1], and you
can try = 3/4 next. Alternatively, if the derivative is positive at = 1/2, the zero occurs in the interval
[0, 1/2], and you can try = 1/4 next. Depending on the sign here, you can eliminated half of the remaining
10
search space as well, and continue until youve found with zero with as much precision as desired. This is
relatively easy to set up in a spreadsheet, and would be a useful exercise.
This is the only dierence between MSA and FW, but it is a signicant one, as seen in the following examples.
5.1 Small network example
Here we solve the small example of Figure 1 by FW. Some steps are similar to MSA, and therefore omitted.
Here, when we do the bisection method, we do ve interval reductions (so we are within 1/2
5
= 1/32 of the
correct

value. When solving by computer, you would usually perform more steps than this, because the
bisection calculations are very fast.)
Iteration 1. As before, we load everybody on the initial shortest path, so x
1
= x

50 0

and t
1
=

60 20

Iteration 2. As before, the relative gap is = 2. With the new shortest paths, x

0 50

. Begin the
bisection method.
Bisection Iteration 1. Initially

[0, 1]. Calculate dz

/d(1/2) = (050) (10+25) +(500)


(20 + 25) = 500 > 0 so we discard the upper half.
Bisection Iteration 2. Now we know

[0, 1/2]. Calculate dz

/d(1/4) = (0 50) (10 +37.5) +


(50 0) (20 + 12.5) = 750 < 0 so we discard the lower half.
Bisection Iteration 3. Now we know

[1/4, 1/2]. Calculate dz

/d(3/8) = (0 50) (10 +


18.75) + (50 0) (20 + 18.75) = 125 < 0 so we discard the lower half.
Bisection Iteration 4. Now we know

[3/8, 1/2]. Calculate dz

/d(7/16) = (0 50) (10 +


21.875) + (50 0) (20 + 21.875) = 187.5 > 0 so we discard the upper half.
Bisection Iteration 5. Now we know

[3/8, 7/16]. Calculate dz

/d(13/32) = (0 50) (10 +


20.3125) + (50 0) (20 + 20.3125) = 31.25 > 0 so we discard the upper half.
From here we take the midpoint of the last interval [3/8, 13/32] to estimate

25/64 = 0.390625, so
x
2
= 25/64x

+ 39/64x
1
=

30.47 19.53

and t
2
=

40.47 39.53

.
Iteration 3. The relative gap is calculated as = 0.014. (This is an order of magnitude smaller than
the relative gap MSA found by this point.) The shortest paths are still x

0 50

, and we begin
bisection.
Bisection Iteration 1. Initially

[0, 1]. Calculate dz

/d(1/2) = 900 > 0 so we discard the upper


half.
Bisection Iteration 2. Now we know

[0, 1/2]. Calculate dz

/d(1/4) = 435 > 0 so we discard


the upper half.
Bisection Iteration 3. Now we know

[0, 1/4]. Calculate dz

/d(1/8) = 203 > 0 so we discard


the upper half.
Bisection Iteration 4. Now we know

[0, 1/8]. Calculate dz

/d(1/16) = 87 > 0 so we discard


the upper half.
Bisection Iteration 5. Now we know

[0, 1/16]. Calculate dz

/d(1/32) = 29 > 0 so we discard


the upper half.
The midpoint of the nal interval is

1/64, so x
3
= 1/64x

+ 63/64x
2
=

29.99 20.01

and
t
3
=

39.99 40.01

.
11
Iteration 4. The relative gap is now = 0.00014, so we quit and claim we have found ows that are good
enough (the dierence in travel times between the routes is less than a second).
Alternately, using calculus, we could have identied

during the second iteration as exactly 0.40, which


would have found the exact equilibrium after only one step.
5.2 Large network example
Here we apply FW to the network shown in Figure 2, using the same notation as in the MSA example.
Iteration 1. Path [1, 3] is shortest for OD pair (1,3), and path [2, 4] is shortest for OD pair (2,4), so
x

5000 0 0 0 0 0 10000

and
x
1
= x

5000 0 0 0 0 0 10000

Recalculating the travel times, we have


t
1
=

60 10 10 10 10 10 110

Iteration 2. With the new travel times, the shortest path for (1,3) is now [1, 5, 6, 3], and the new shortest
path for (2,4) is [2, 5, 6, 4], so AEC = 63.33 If everyone were to take the new shortest paths, the ows
would be
x

0 5000 15000 5000 10000 10000 0

Begin the bisection method to nd the right combination of x

and x
1
.
Bisection Iteration 1. Initially

[0, 1]. Calculate dz

/d(1/2) = (0 5000) (10 +2500/100) +


. . . + (0 10000) (10 + 5000/100) = 1025000 > 0 so we discard the upper half.
Bisection Iteration 2. Now we know

[0, 1/2]. Calculate dz

/d(1/4) = (0 5000) (10 +


3750/100) + . . . + (0 10000) (10 + 7500/100) = 137500 > 0 so we discard the upper half.
Bisection Iteration 3. Now we know

[0, 1/4]. Calculate dz

/d(1/8) = (0 5000) (10 +


4375/100) + (0 10000) (10 + 8750/100) = 25000 < 0 so we discard the lower half.
Bisection Iteration 4. Now we know

[1/8, 1/4]. Calculate dz

/d(3/16) = (0 5000) (10 +


4062/100) + (0 10000) (10 + 8125/100) = 32812 > 0 so we discard the upper half.
Bisection Iteration 5. Now we know

[1/8, 3/16]. Calculate dz

/d(5/32) = (0 5000) (10 +


4219/100) + (0 10000) (10 + 8437/100) = 1953 < 0 so we discard the lower half.
The nal interval is [5/32, 3/16], so the estimate is

= 11/64 and
x
2
= (11/64)x

+ (53/64)x
1
=

4141 859 2578 859 1719 1719 8281

The new travel times are thus


t
2
=

51.4 18.6 35.8 18.6 27.2 27.2 92.8

Iteration 3. With the new travel times, the shortest path for (1,3) is now [1, 3], but the shortest path for
(2,4) is still [2, 5, 6, 4]. The relative gap is AEC = 2.67 (roughly 30 times smaller than the corresopnding
point in the MSA algorithm!) We have
x

5000 0 10000 0 10000 10000 0

We begin the bisection method to nd the right combination of x

and x
1
.
12
Bisection Iteration 1. Initially

[0, 1]. Calculate dz

/d(1/2) = 637329 > 0 so we discard the


upper half.
Bisection Iteration 2. Now we know

[0, 1/2]. Calculate dz

/d(1/4) = 154266 > 0 so we


discard the upper half.
Bisection Iteration 3. Now we know

[0, 1/4]. Calculate dz

/d(1/8) = 36063 > 0 so we discard


the upper half.
Bisection Iteration 4. Now we know

[0, 1/8]. Calculate dz

/d(1/16) = 7741 > 0 so we discard


the upper half.
Bisection Iteration 5. Now we know

[0, 1/16]. Calculate dz

/d(1/32) = 1302 > 0 so we


discard the upper half.
The nal interval is [0, 1/32], so the estimate is

= 1/64 and
x
3
= (1/64)x

+ (63/64)x
2
=

4154 845 2694 845 1848 1848 8152

The new travel times are thus


t
3
=

51.5 18.5 36.9 18.5 28.5 28.5 91.5

At this point, the average excess cost is around 1.56 min; note that FW is able to decrease the relative
gap much faster than MSA. However, were still quite far from equilibrium if you compute the actual path
travel times. In this case, even though were allowing the step size to vary for each iteration, we are forcing
travelers from all OD pairs to shift in the same proportion. In reality, OD pairs farther from equilibrium
should see bigger ow shifts, and OD pairs closer to equilibium should see smaller ones. Well return to this
issue later in the semester, but rst well introduce some other network models.
13

Potrebbero piacerti anche