6 - Introduction To Optimization
6 - Introduction To Optimization
225J
1.225J (ESD 205) Transportation Flow Systems
Lecture 6
Introduction to Optimization
Lecture 6 Outline
If some, but not all, variables are constrained to take integer values: a
linear program is called a mixed integer program
1.225, 11/19/02 Lecture 6, Page 4
1 2
2
4
1
1 1 8 1 4
4
5
4
3 2 6
3
1
All-
All-to-
to-One Shortest Path Problem As An LP
Formulation:
min 4 x12 + 3 x13 + x24 + 2 x25 +
8 x32 + 2 x34 + 6 x35 + 4 x45
s.t. x12 + x13 = 1
x24 + x25 − x12 − x32 = 1
x32 + x34 + x35 − x13 = 1
x45 − x24 − x34 = 1
− x25 − x35 − x45 = −4
xij ≥ 0, (i, j ) ∈ A
Note: constraints “the decision variables must be integers” should
have been added. However, it is known theoretically that the above
LP possesses an integer solution, and tools exist to it.
1.225, 11/19/02 Lecture 6, Page 8
One-
One-to-
to-One Shortest Path Problem As An LP
Formulation:
min 4 x12 + 3 x13 + x24 + 2 x25 +
8 x32 + 2 x34 + 6 x35 + 4 x45
s.t. x12 + x13 = 1
x24 + x25 − x12 − x32 = 0
x32 + x34 + x35 − x13 = 0
x45 − x24 − x34 = 0
− x25 − x35 − x45 = −1
xij ≥ 0, (i, j ) ∈ A
Note: we could have added the fact that the decision variables are
either 0 or 1. However, it is known theoretically that the above LP
possesses a 0-1 solution, and tools exist that provide such solution
1.225, 11/19/02 Lecture 6, Page 9
x1 = f1ac + f 2bc
x2 = f1bc Definition of link flows
x3 = f 2
bc
x1 x2 x3
min x1t1 ( x1 ) + x2t 2 (x2 ) + x3t3 (x3 ) = min ∫ m1 (x1 )dx1 + ∫ m2 ( x2 )dx2 + ∫ m3 (x3 )dx3
0 0 0
Link 2, x2 t 2 ( x2 ) = 1 + 2 x2
5 O D 5
t1 ( x1 ) = 2 + x1
Link 1, x1
t1 t2
t2 ( x2 )
Minimum of ( ∫ t1 ( w) dw + ∫ t 2 ( w) dw)
x1 x2
0 0
t1 ( x1 )
5 4 3 2 1 0
x2 x1
0 1 2 3 4 5
1.225, 11/19/02 Lecture 6, Page 11
min ∫ t1(x1 )dx1 + ∫ t2 (x2 )dx2 + ∫ t3 (x3 )dx3 min ∫ m1 ( x1 )dx1 + ∫ m2 ( x2 )dx2 + ∫ m3 (x3 )dx3
0 0 0 0 0 0
s.t. f 1
ac
= qac s.t. f1
ac
= qac
f +f
1
bc
2
bc
= qbc f 1
bc
+ f 2bc = qbc
U.O.: All used paths have, between S.O.: All used paths have,
any O-D pair, equal and minimum between any O-D pair, equal and
travel time
minimum marginal travel times
1.225, 11/19/02 Lecture 6, Page 12
Link 2, x2 t 2 ( x2 ) = 1 + 2 x2
5 O D 5
t1 ( x1 ) = 2 + x1
Link 1, x1
1 t1 ( x1 ) = 10 + x1
a c
t 2 (x2 ) = 90 + x2
t3 ( x3 ) = 0
3
2
(qac , qbc ) = (80,10)
b
Link 2, x2 t2 ( x2 ) = 1 + 2 x2
q O D q
t1 ( x1 ) = 2 + x1
Link 1, x1
+f 2
bc
= qbc
x1 = f1ac + f 2bc
x2 = f1 bc Definition of link flows
x3 = f 2
bc
(
S.O. solution: x1 , x2 , x3 = (80,10,0x )
* * *
) 1 x 2 x 3
min x1t1 ( x1 ) + x2t 2 (x2 ) + x3t3 (x3 ) = min ∫ m1 (x1 )dx1 + ∫ m2 ( x2 )dx2 + ∫ m3 (x3 )dx3
0 0 0
Lecture 6 Outline