Vehicle Circulation & Hungarian Method

Download Report

Transcript Vehicle Circulation & Hungarian Method

Vehicle Circulation and
the Hungarian Method
Martin Grötschel
joint work with
Ralf Borndörfer
Andreas Löbel
Celebration Day of the 50th Anniversary
of the Hungarian Method
Budapest, October 31, 2005
Martin Grötschel
 Institute of Mathematics, Technische Universität Berlin (TUB)
 DFG-Research Center “Mathematics for key technologies” (MATHEON)
 Konrad-Zuse-Zentrum für Informationstechnik Berlin (ZIB)
[email protected]
http://www.zib.de/groetschel
2
About the assignment problem
 The assignment problem is a mathematical
problem. Mathematicians have spent an awful lot
of time to create “real-life interpretations” that
look like applications to “prove” that it is useful.
And hence, the Hungarian Method is of no
practical value.
 The “truth”, in fact is the other way around.
Practitioners have “tuned” their applied problems
in order to be able to employ the Hungarian
Method.
Martin
Grötschel
3
Contents
1. What is vehicle circulation/scheduling?
2. Single depot vehicle scheduling
3. Multiple depot vehicle scheduling
4. Extensions
Martin
Grötschel
4
Contents
1. What is vehicle circulation/scheduling?
2. Single depot vehicle scheduling
3. Multiple depot vehicle scheduling
4. Extensions
Martin
Grötschel
5
Planning Public Transportation
Martin
Grötschel
Phase:
Planning
Scheduling
Dispatching
Horizon:
Long Term
Medium term
(very) Short term
Timetable Period
Day of Operation
online planning
Objective: Service Level
Cost Reduction
Get it done
Steps:
Vehicle Scheduling
Duty Scheduling
Duty Rostering
Crew Assignment
Delay Management
Failure Management
Network Design
Line Planning
Timetabling
6
The ZIB Transportation Team,
including former members:
Public Transport:
Online Transportation:
Ralf Borndörfer
Fridolin Klostermeier
Christian Küttner
Andreas Löbel
Sascha Lukac
Marc Pfetsch
Thomas Schlechte
Steffen Weider
Norbert Ascheuer
Philipp Friese
Sven O. Krumke
Diana Poensgen
Jörg Rambau
Luis Miguel Torres
Andreas Tuchscherer
Tjark Vredeveld
plus several master students
Martin
Grötschel
7
Planning in Public Transport
(Product, Project, Planned)
Cost Recovery
Fares
Construction Costs
Network Topology
Velocities
Lines
Service Level
Frequencies
Connections
Timetable
Sensitivity
Rotations
Relief Points
Duties
Duty Mix
Rostering
Fairness
Crew Assignment
Disruptions
Operations Control
IS-OPT
Martin
Grötschel
APD
VS-OPT2
DS-OPT VS-OPT BS-OPT
AN-OPT
B15
B1
B3
B1
multidepartmental
Departments
multidepotwise
Depots
multiple line groups
Line Groups
multiple lines
Lines
multiple rotations
Rotations
8
Martin
Grötschel
The ZIB Transportation Team
spin-off companies
Intranetz:
LBW:
Fridolin Klostermeier
Ralf Borndörfer
Christian Küttner
Andreas Löbel
Norbert Ascheuer
Steffen Weider
9
What is vehicle circulation/scheduling?
 We are given a transportation system in a region.
 It is subdivided by carrier/vehicle types (busses, trams,
subways, planes, ships…).
 For each carrier type, a (daily, weekly, or monthly,..)
timetable (the scheduled/timetabled trips) is given.
 Task: Assign the available vehicles to the scheduled trips
of the timetable such that some objective function is
optimized and a (usually large) system of side constraints
is satisfied.
Martin
Grötschel
10
What is vehicle circulation/scheduling?
Somewhat more precise:
 Each vehicle (usually) has a home base. In colloquial
language this is called its depot. Transportation
professionals have to be more precise. A depot consists
of all indistinguishable vehicles that have their home
base in the same physical location.
 In most cases, a vehicle leaves its depot in the “morning”
and returns to its depot in the “evening” of the planning
period. Thus, every vehicle “circulates” along a tour of
the region.
 The vehicle circulation problem is hence the task to find,
for each available vehicle and for the given planning
horizon, a tour such that all scheduled/timetabled trips
are covered by exactly one tour and some objective is
optimized and certain side constraints respected.
Martin
Grötschel
11
What is vehicle circulation/scheduling?
The objective function
 Minimize the number of vehicles that are
necessary to cover all scheduled trips.
 Minimize the cost of the deadhead trips.
(Deadhead trips are moves of a vehicle without passengers; a move can
be just a break where the vehicle keeps waiting in a parking lot.)
 A combination of these two.
 Interlining
 Turns
 Pull-in pull-out trips
Martin
Grötschel
12
Leuthardt Survey
(Leuthardt 1998, Kostenstrukturen von Stadt-, Überland- und Reisebussen, DER NAHVERKEHR 6/98, pp. 19-23.)
annual cost: 150 – 250 thousand US dollars per bus
bus costs (DM)
urban
%
regional
%
349,600
73.5
195,000
67.5
depreciation
35,400
7.4
30,000
10.4
calc. interest
15,300
3.2
12,900
4.5
materials
14,000
2.9
10,000
3.5
fuel
22,200
4.7
18,000
6.2
5,000
1.0
5,000
1.7
other
34,000
7.1
18,000
7.2
total
475,500
100.0
288,900
100.0
crew
repairs
Martin
Grötschel
13
Vehicle Scheduling in Berlin
The transportation research group at ZIB has
produced software with which the
 busses
 street cars, and
 subways
in Berlin have been scheduled.
A film shows some of the problems of bus
scheduling:
Martin
Grötschel
14
Vihicle Circulation Film
Martin
Grötschel
15
Some Users
VS-OPT (vehicles)
DS-OPT (drivers)
ATC/Terni (I)
ATC/Terni (I)
Athen (U) (GR)
Berlin (D)
Berlin (D)
Bonn (D)
Bonn (D)
Connex (D)
Connex (D)
DB Regio (D)
DB Regio (D)
Geilenkirchen (D)
Ennepetal (D)
Martin
Grötschel
Genua (I)
Genua (I)
Mailand (U) (I)
Mailand (U) (I)
München (S) (D)
München (S) (D)
Norgesbus (N)
Norgesbus (N)
Rhein-Neckar (S) (D)
Rhein-Neckar (S) (D)
Wiesbaden (D)
Wiesbaden (D)
16
Contents
1. What is vehicle circulation/scheduling?
2. Single depot vehicle scheduling
3. Multiple depot vehicle scheduling
4. Extensions
Martin
Grötschel
17
Single Depot Vehicle Scheduling
(Assignment Model)
D
1
depot (in the morning)
2
with starting time and location
timetabled
trip
1
2
with ending time and location
4 timetabled trips
Martin
Grötschel
3
4
3
4
D
depot (in the evening)
A single depot:
 one location
 one bus type
18
Single Depot Vehicle Scheduling
(Assignment Model)
4 timetabled trips plus
D
1
2
1 blue and 1 red
bus circulation
2 depot nodes for
each available bus
D
D
1
2
3
4
D
1
2
3
4
1
2
3
4
D
4
The assignment model of the
single depot
vehicle circulation problem
3
Martin
Grötschel
12 deadhead trips
D
19
But
 In the seventies the available computers were
not able to solve large size assignment problems
due to time and space problems.
 The Hungarian method was the algorithm of
choice. There was nothing better.
Martin
Grötschel
20
Problem Specific Size Reduction:
HOT = Hamburger OptimierungsTechnik
HOT only looked at
peak times (about 7 a.m)
and made heuristic
(manual = interactive) choices to
reduce the problem size.
~ 1975 beginning of code development
~ 2003 last installations replaced
Martin
Grötschel
21
All other companies did basically the same;
but it is hard to find out what they really did.
Martin
Grötschel
22
Surprise
 Due to expertise and practical experience, the
HOT specialists were able to come up with very
good (and often almost optimal) solutions when
“number of busses” was the major objective.
Martin
Grötschel
23
Single Depot Vehicle Scheduling
1
3
1
2
4
3
3
7
3
6
7
8 10
2
3
 The Assignment Problem
 Input: 3 Buses, 3 trips, costs
 Output: cost minimal assignment
Martin
Grötschel
Buses
Solution
Cost = 20
Trips
24
Single Depot Vehicle Scheduling
1
3
1
2
4
3
3
7
3
6
2
 The Greedy-Heuristik
 heuretikos (gr.): inventive
heuriskein (gr.): to find
Martin
Grötschel
7
8 10
3
Buses
Solution
Cost = 17
Trips
25
Single Depot Vehicle Scheduling
1
3
1
2
4
3
3
7
3
6
2
 The Greedy-Heuristik
 heuretikos (gr.): inventive
heuriskein (gr.): to find
Martin
Grötschel
7
8 10
3
Busses
Solution
Cost = 16
Trips
26
Single Depot Vehicle Scheduling
5
3
4
4
3
7
3
7
0
6
8
 The "Primal Problem"
Martin
Grötschel
7
8 10
9
Buses
Optimum
Cost = 15
Trips
 The "Dual Problem"
 Minimum Cost
 Maximum Sales Revenues
 Assignment
 "Shadow Prices"
27
Mathematical Models
(Assignment Problem)
3x11
3x21
7 x31
s.t.
x11
x21
x31
3x12
7 x22
8 x32
 x12
 x22
 x32
4 x13
6 x23
10 x33
 x13
 x23
 x33
1
1
1
x11
x12
 x21
 x22
 x31
 x32
1
1
x13
 x23
 x33
1
x11
x11
,
,
min
2
1
3
1
4
3
3
7
3
6
2
 Graph Theoretic Model
Martin
Grötschel
7
8 10
3
,
,
x33
0
x33  {0,1}
 Integer Programming
Model
 Linear Programming
28
Single Depot Vehicle Scheduling
0
4
3
3
4
3
3
0
0
3
6
3 7 6
7
0
0
7
7 8 10
8 10
0
 The „Successive Shortest Path“ Algorithm
Martin
Grötschel
29
Single Depot Vehicle Scheduling
0
4
3
3
4
3
3
0
0
0
0
00
0
3
6
3 7 6
7
0
0
0
0
7
7 8 10
8 10
0
Buses
Bound
cost = 15
Partial sol.
cost = 0
Trips
 The „Successive Shortest Path“-Algorithm
Martin
Grötschel
30
Single Depot Vehicle Scheduling
0
0
0 +0
4
3
3
0
0
0
0 +3
0
00
0 +0
3
6
0 7 2
4
0 +3
0
0
0 +0
7
4 8 10
5 6
Buses
Bound
cost = 10
Partial sol.
cost = 3
0 +4
Trips
 The „Successive Shortest Path“ Algorithm
Martin
Grötschel
31
Single Depot Vehicle Scheduling
0
4
3
-3
0
0
0
3
0
0
0
00
0
3
6
0 7 2
4
3
0
0
0
7
4 8 10
5 6
4
Buses
Bound
cost = 10
Partial sol.
cost = 3
Trips
 The „Successive Shortest Path“ Algorithm
Martin
Grötschel
32
Single Depot Vehicle Scheduling
0
0
0 +0
4
3
-3
0
0
0
3 +0
0
00
0 +0
3
6
0 7 2
4
3 +0
0
0
0 +0
7
4 8 10
5 6
Buses
Bound
cost = 10
Partial sol.
cost = 6
4 +0
Trips
 The „Successive Shortest Path“ Algorithm
Martin
Grötschel
33
Single Depot Vehicle Scheduling
0
4
-3
3
0
0
0
3
0
0
0
00
0
-3
6
0 7 2
4
3
0
0
0
7
4 8 10
5 6
4
Buses
Bound
cost = 10
Partial sol.
cost = 6
Trips
 The „Successive Shortest Path“ Algorithm
Martin
Grötschel
34
Single Depot Vehicle Scheduling
0
0
0 +5
4
-3
3
0
0
0
3 +4
0
00
0 +4
-3
6
0 7 2
4
3 +5
0
0
0 +0
7
4 8 10
5 6
Buses
Bound
cost = 15
Partial sol.
cost = 15
4 +5
Trips
 The „Successive Shortest Path“ Algorithm
Martin
Grötschel
35
Single Depot Vehicle Scheduling
5
-4
3
3 0
0
1
7
0
0
0
00
4
-3
6
0 7 1
3
8
0
0
0
7
0 -8 10
0 1
9
Buses
Bound
cost = 15
Partial sol.
cost = 15
Trips
 The „Successive Shortest Path“ Algorithm
Martin
Grötschel
36
Single Depot Vehicle Scheduling
5
4
3
3
0
0
1
7
4
3
6
0 7 1
3
8
0
7
0 8 10
0 1
9
Buses
Bound
cost = 15
Solution
cost = 15
Trips
 The „Successive Shortest Path“ Algorithm
 Path Search
 Solution + Proof
Martin
Grötschel
 Efficient
37
SPEC
Andreas Löbel
Martin
Grötschel
38
Contents
1. What is vehicle circulation/scheduling?
2. Single depot vehicle scheduling
3. Multiple depot vehicle scheduling
4. Extensions
Martin
Grötschel
39
Martin
Grötschel
40
Martin
Grötschel
41
Vehicle Scheduling
 Input
Timetabled and deadhead trips
Vehicle types and depot capacities
Vehicle costs (fixed and variable)
 Output
Vehicle rotations
vehicle
circulations
rotations
blocks
schedules
 Problem
Compute rotations to cover all timetabled trips
Martin
Grötschel
 Goals
Minimize number of vehicles
Minimize operation costs
Minimize line hopping etc.
42
Graph Theoretic Model
pull-out trips
Martin
Grötschel
deadhead trips
timetabled trips
pull-in trips
43
Example: Regensburg
Map deleted
Martin
Grötschel
44
Vehicle Scheduling
Depot
Fleet
No line
Peaks:
minimum:
capacities:
Turning:
changes:
pull-in/pull-out
pull-in
turns
soft
interlining
upper
tripstrips
limits
trips
 Definition + cost of deadhead trips




Martin
Grötschel
Precise control at point, time, or trip
Changes of vehicles, lines, modes, turning, etc.
Automatic generation of pull-in/pull-out trips
Maintencance of all possible deadhead trips
 Depot capacities (soft)
45
Timelines
d
Needs Fow model
assignment model will be too large
Martin
Grötschel
d
46
Integer Programming Model
(Multicommodity Flow Problem)
min
d d
c
 ij xij
d
ij
d
d
x

x
 ij  jk
d
d
x

x
 ij  jk
i
d
x
 ij
d
 j, d
Vehicle flow
 0
j
Aggregated flow
 1
j
Timetabled trips
 d
d
Depot capacities
k
i
d
 0
d
k
i
d
x
 0j
j
xijd
Martin
Grötschel
 {0,1}  ij , d
Deadhead trips
47
Theoretical Results
 Observation: The LP relaxation of the
Multicommodity Flow Problem does in general
not produce integeral solutions.
 Theorem: The Multicommodity Flow Problem is
NP-hard.
 Theorem (Tardos et. al.): There are pseudopolynomial time approximation algorithms to
solve the LP-relaxation of Multicommodity Flow
Problems which are faster than general LP
methods.
Martin
Grötschel
48
Lagrangean Relaxation

min cT x
 max

Ax
 b
Bx
 d
x
 0
f ( )

max min cT x   (b  Ax)

P(A,b)P(B,d)
f1
Martin
Grötschel
 d
x
 0
max min cT xi   (b  Axi )

i
f3
f2
Bx
x2
x1
f
f4
P(A,b)
x4
x3
49
Bundle Method
(Kiwiel [1990], Helmberg [2000])
 Max
f ( ) : min c T x   T (b  Ax )
xX
X polyhedral (piecewise linear)
f ( )  c T x   T (b  Ax  )
fˆ
f1
fˆk ( ) : min f ( )
Jk
f
2
Martin
Grötschel
3
1

uk
ˆ
k 1  argmax fk ( ) 
  ˆk
2

2
50
Primal Approximation
1
ˆ
k 1  k     (b  Ax )
u J
k
xk 1 
   x
Jk
fk ( )  cT xk  (b  Axk )
z
fk 1
fˆk
f
 Theorem
b  Axk  0 (k  )
k 1

 ( xk )kN converges to a point x x : Ax  b, x  X
Martin
Grötschel
51
Quadratic Subproblem
(1) max fˆk ( )  uk   ˆk
2
2

(2)
2
uk
k
ˆ
max v 
 
2
s.t. v  f ( ), for all   Jk
2

(3)
max

Jk
s.t.
  f (ˆ ) 
   1
1
2uk
   (b  Ax )
Jk
Jk
0     1,
Martin
Grötschel
for all   Jk
52
Bundle Method
(IVU41 838,500 x 3,570, 10.5 NNEs per column)
450
400
350
300
250
20
0
15
0
bundle
volume
barrier
cascent
10
0
50
Martin
Grötschel
20
40
60
80
100
120
140
sec
53
Lagrangean Relaxation I
min
d d
c
 ij xij
d
ij
d
d
x

x
 ij  jk
d
d
x

x
 ij  jk
i
d
x
 ij
d
 j, d
Vehicle flow
 0
j
Aggregated flow
 1
j
Timetabled trips
 d
d
Depot capacities
k
i
d
 0
d
k
i
d
x
 0j
j
xijd
Martin
Grötschel
 {0,1}  ij , d
Deadhead trips
54
Lagrangean Relaxation I
max min

 c x
 
d d
ij ij
d
ij
 
d
0

x
   ij
  i

 x  
k

d
jk
Vehicle flow
d
d
x

x
 ij  jk
d
i
d
x
 ij
d
d
 0
j
Aggregated flow
 1
j
Timetabled trips
 d
d
Depot capacities
k
i
d
x
 0j
j
xijd
 {0,1}  ij , d
Deadhead trips
 Subproblem: Min-Cost-Flow (single-depot)
Martin
Grötschel
55
Lagrangean Relaxation II
min
d d
c
 ij xij
d
ij
d
d
x

x
 ij  jk
d
d
x

x
 ij  jk
i
d
x
 ij
d
 j, d
Vehicle flow
 0
j
Aggregated flow
 1
j
Timetabled trips
 d
d
Depot capacities
k
i
d
 0
d
k
i
d
x
 0j
j
xijd
Martin
Grötschel
 {0,1}  ij , d
Deadhead trips
56
Lagrangean Relaxation II
max min

 c x
d d
ij ij
d
 0
 j, d
Vehicle flow
 0
j
Aggregated flow
ij
d
d
x

x
 ij  jk
i
k
d
d
x

x
 ij  jk
d
 

d 
1   xij 
d
i


i
d
k
Timetabled trips
d
x
 0j
 d
d
Depot capacities
j
xijd
 {0,1}  ij , d
Deadhead trips
 Subproblem: Several independent Min-CostFlows (single-depot)
Martin
Grötschel
57
Heuristics
 Cluster First – Schedule Second
 "Nearest-depot" heuristic
 Lagrange Relaxation II + tie breaker
 Schedule First – Cluster Second
 Lagrange relaxation I
 Schedule – Cluster – Reschedule
 Schedule: Lagrange relaxation I
 Cluster: Look at paths
 Solve a final min-cost flow
Martin
Grötschel
 Plus tabu search
58
Lagrangean Relaxation Algorithm
Martin
Grötschel
59
Computational Results
BVG
HHA
VHH
depots
10
14
10
vehicle types
44
40
19
25,000
16,000
5,500
70,000,000
15,100,000
10,000,000
200
50
28
timetabled trips
deadheads
cpu mins
Martin
Grötschel
60
Vehicle Utilization
Martin
Grötschel
61
"Camel Curve"
68
Martin
Grötschel
62
Interlining
too short to turn
too long to wait
best choice
Martin
Grötschel
63
Umlaufoptimierung mit MICROBUS 2
Umlaufoptimierung
Erzielte Einsparungen durch die
Umlaufoptimierung:
Im Busbereich wurden bei einer Gesamtzahl von knapp über
200 Fahrzeugen 5 Busse eingespart.
Im Bahnbereich wurden aufgrund der fehlenden Leerfahrtund Überholmöglichkeiten keine Fahrzeuge eingespart.
Slide of SWB
Martin
Heiko Klotzbücher
Grötschel
26.02.2002
4
64
Vehicle Scheduling at ZIB
Martin
Grötschel
65
Vehicle Scheduling at ZIB
 Ralf Borndörfer
 Andreas Löbel
Ramifications:
 Corinna Bönisch
 Ines Spenke
 Steffen Weider
Martin
Grötschel
66
BVG (Berlin)
Martin
Grötschel
67
Contents
1. What is vehicle circulation/scheduling?
2. Single depot vehicle scheduling
3. Multiple depot vehicle scheduling
4. Extensions
Martin
Grötschel
68
Discussion/Extensions
 Properties
 Exploiting all degrees of freedom
 Vehicle mix
 Extensions
 Trip shifting
 current work
 Multiperiod scheduling
 Periodic schedules
 Assimilation
 Balanced depot exchange
 Maintenance constraints
 Integration
 Vehicle and duty scheduling  current work
 Timetabling
Martin
Grötschel
 Line planning
69
Trip Shifting
Martin
Grötschel
Vehicle Circulation and
the Hungarian Method
The
END
joint work with
Martin Grötschel
Ralf Borndörfer
Andreas Löbel
Steffen Weider
A celebration day of the 50th anniversary
of the Hungarian Method
October
31, attention
2005
ThankBudapest,
you for
your
Martin Grötschel
 Institute of Mathematics, Technische Universität Berlin (TUB)
 DFG-Research Center “Mathematics for key technologies” (MATHEON)
 Konrad-Zuse-Zentrum für Informationstechnik Berlin (ZIB)
[email protected]
http://www.zib.de/groetschel