Solving a Real-World Train Unit Assignment Problem

Solving a Real-World Train Unit Assignment
Problem
V. Cacchiani, A. Caprara, P. Toth
University of Bologna (Italy)
European Project ARRIVAL
V. Cacchiani, ATMOS 2007, Seville
1
Outline
• Problem description
• A Graph representation
• ILP models (arc formulation & path formulation)
• Strong inequalities for the Capacity Constraints
• Maintenance Constraints
• An LP-based heuristic algorithm
• Experimental Results
• Conclusions
V. Cacchiani, ATMOS 2007, Seville
2
Train Unit Assignment Problem (TUAP)
Input:
• timetabled train trips
• train unit types
Output:
Minimum Cost Assignment of the train units (TUs) to the trips
Constraints:
• required number of passenger seats for each trip (possibly combining TUs)
• maximum number of TUs that can be assigned to each trip (generally 2)
• maximum number of TUs available
• sequencing constraints between trips
• maintenance constraints
V. Cacchiani, ATMOS 2007, Seville
3
Input:
Output:
Trips
A
A
720
MI 389
SV 352
B
516
MI 356
C
C
D
E
A
MD 396
360
SA 437
D
BA 464
B
E
360
BA 540 DAT 552
E 876
BA 720 DAT 732
TUs
2
2
360
516
V. Cacchiani, ATMOS 2007, Seville
4
Graph Representation
n # of trips
G  (V , A)
p # of TU types
V node  trip
A
(and dummy nodes 0 and n+1)
A  A  ...  A
1
k
A
2
arc (i, j ) k  Ak
p
arcs for TUs of type k
iff a TU of type k can be assigned to i
and then to j within the same day
B
A
C
0
dummy
start node
D
E
n+1
dummy
end node
V. Cacchiani, ATMOS 2007, Seville
A1
A2
5
Arc Formulation
p
min
 c
k 1 a k ( 0 )
x
xa
number of times that arc a
is selected in the solution
a  A , k  1,..., p
k
a
min of the total cost of the paths
xa ,
x ,

a k ( j )
k
a
a k ( j )
flow constraints
k  1,..., p j  1,..., n,
max # of paths for TU of type k
k
x

d
 a ,
k  1,..., p,
a k ( 0 )
p

k
s
 xa  r j ,
capacity constraints
j  1,..., n,
k 1 a k ( j )
max # of TU for trip j
p
 x
k 1 a k ( j )
a
 uj,
j  1,..., n,
# of times that arc a is selected in the solution
k
xa  0, integer,
V. Cacchiani, ATMOS 2007, Seville
k  1,..., p, a  A .
6
Path Formulation
P
k
xP
collection of paths from 0
to n+1 in (V , Ak ) k  1,..., p
p
min

 c x
k 1 PP k
number of times that path
xP
P is selected in the solution PP k
P  P k , k  1,..., p
P P
k
subcollection of
paths in P k that
visit trip j,
k  1,..., p, j  1,..., n
,
max # of paths for TU of type k
d ,
k  1,..., p,
capacity constraints
p
 s x
k 1 PPjk
 x
P
 rj ,
j  1,..., n,
max # of TU for trip j
p
k 1 PPjk
P
k
k
k
j
min of the total cost of the paths
k
P
 uj,
j  1,..., n,
# of times that path P is selected in the solution
xP  0, integer,
V. Cacchiani, ATMOS 2007, Seville
k  1,..., p, P  P k .
7
“Strong” capacity constraints
An example
r j  1032
p 8
wkj 
u j  2, j  1,..., n
x
PPjk
P
number of TUs of type k assigned to a trip j
k  (1,..., p), j  (1,..., n)
1150w1j  1044w2j  786w3j  702w4j  543w5j  517w6j  515w7j  360w8j  1032
weak
2 w1j  2 w2j  w3j  w4j  w5j  w6j  w7j  w8j  2,
2 w1j  2 w2j  2 w3j  w4j  w5j  w6j  w7j  w8j  2,
2 w1j  2 w2j  2 w3j  2 w4j  w5j  w6j  w7j  2,
strong
2 w1j  2 w2j  2 w3j  2 w4j  2w5j  w6j  w7j  2,
2 w1j  2 w2j  2 w3j  2 w4j  2w5j  2 w6j  2
V. Cacchiani, ATMOS 2007, Seville
8
“Strong” capacity constraints
u j  2, j  1,..., n
The described capacity constraints are
the following: p
 s k wkj  rj , j  (1,..., n),
k 1
p
w
k 1
Assuming
k
j
 uj,
j  (1,..., n)
s1  s 2  ...  s p  s p 1  0
For a trip j define:
hj
such that
tj
such that
s j  rj , s
h
h j 1
2s j  rj , 2s
t
f j (k ) such that s k  s
f j (k )
f j (k )
l 1
l k
l
2
w
 j
 rj
t j 1
k 1
 rj
 rj , s k  s
l
w
 j  2,
j  1,..., n k  h j  1,..., t j  1
f j ( k ) 1
 rj
The derived strong inequalities describe the convex hull of the capacity constraints.
V. Cacchiani, ATMOS 2007, Seville
9
ILP Formulation
Qk  Pk
collection of maintenance
paths from 0 to n+1 in (V , Ak )
k  1,..., p
y
k
m
k
maintenance constraints
number of paths for a TU of
type k which contain a
maintenance arc k  1,..., p
maintenance
k
every m days
k  1,..., p
k
x

y
P ,
k  1,..., p,
PQ k
k k
x

m
 P y,
k  1,..., p,
PP k
y k  0, integer,
V. Cacchiani, ATMOS 2007, Seville
k  1,..., p.
10
An LP-based Heuristic Algorithm
0. initialize the current LP as the described model (“strong” capacity constraints,
a subset of variables)
1. solve the current LP (CPLEX)
2. constructive heuristic
z*
(based on the optimal dual solution)
3. refine the solution found
4. if there are dual constraints violated
else
add some of the corresponding
primal variables to the current
LP
fixing
5. if the current LP is infeasible
stop
*
if z  value of the incumbent solution
stop
else goto 1.
V. Cacchiani, ATMOS 2007, Seville
11
Methods implemented in C, computational tests
on a Pentium IV, 3.2 GHz, 1 Gb Ram, Cplex 9.0
Experimental Results on the Case Study
inst
Arc
LP
Arc LP
Time (sec)
Path LP
Path LP
Time (sec)
Strong Strong Arc Strong
Arc LP LP Time
Path LP
(sec)
Strong
Path LP
Time (sec)
A
57
624
57
136
62
1201
62
50
41
47242
41
174
53
26907
53
150
40
23841
40
179
53
27350
53
177
(528,8)
B
(662,10)
C
(660,10)
inst
Actual
Solution
LP
Maint
LP Maint
Time (sec)
Heur
Heur
Time (sec)
A
72
62
130
63
3544
76
56
196
59
5471
74
55
295
58
8875
(528,8)
B
(662,10)
C
(660,10)
V. Cacchiani, ATMOS 2007, Seville
12
Conclusions
• ILP formulations based on a Graph
representation of the TUAP
• LP-relaxation with “strong”
capacity constraints
Signifcant improvement
over the practitioners’
solution.
• LP-based Heuristic
Current Research (cooperation with Erasmus University Rotterdam)
• Build a “robust” solution based on the possibility of exchanging TUs in
case of delays
V. Cacchiani, ATMOS 2007, Seville
13