bus scheduling and multicommodity flows...2015/07/28  · bus scheduling and multicommodity flows |...

69
Freie Universität Berlin Bus Scheduling and Multicommodity Flows Ralf Borndörfer 2015 Workshop on Combinatorial Optimization with Applications in Transportation and Logistics Beijing, 28.07.2015 1 Bus Scheduling and Multicommodity Flows | COTL 2015

Upload: others

Post on 28-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows

Ralf Borndörfer

2015 Workshop on Combinatorial Optimization with Applications in

Transportation and Logistics

Beijing, 28.07.2015

1 Bus Scheduling and Multicommodity Flows | CO∈TL 2015

Page 2: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Outline

Optimal Assignments

Single Depot Vehicle Scheduling

Multiple Depot Vehicle Scheduling

Lagrangean Relaxation

Multicriteria Optimization

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 2

Page 3: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 3

The Assignment Problem

The Problem

Input: 3 sources, 3 destinations, costs

Output: cost minimal assignment

1 2 3

3 4

3 3

7 6 7

8 10

1 2 3

solution cost = 20

Page 4: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 4

solution cost = 17

A Heuristic

The Greedy Heuristic

heuretikos (gr.): inventive

heuriskein (gr.): to find

1 2 3

3 4

3 3

7 6 7

8 10

1 2 3

Page 5: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 5

A Heuristic

The Greedy Heuristic

heuretikos (gr.): inventive

heuriskein (gr.): to find

1 2 3

3 4

3 3

7 6 7

8 10

1 2 3

solution cost = 16

Page 6: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 6

A Lower Bound

A "Relaxation"

1 2 3

3 4

3 3

7 6 7

8 10

1 2 3

11 12 13 14 15 16 17 18 19 20 21 22

upper bound (solution) lower bound duality gap

bound cost = 13 solution

cost = 17 guarantee 4/17=23% 4/13=30%

Page 7: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 7

optimum cost = 15

A Proof of Optimality

The "primal problem"

Minimum cost assignment

The "dual problem"

Maximum profit sales

5 4 0

3 4

3 3

7 6 7

8 10

7 8 9

Page 8: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 8

0 0 0

3 3

4 4 3

3

3 3 7

7

6 6

7 7 8

8 10 10

0 0 0

An Exact Algorithm

The "successive shortest path" algorithm

Page 9: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 9

0 0 0

3 3

4 4 3

3

3 3 7

7

6 6

7 7 8

8 10 10

0 0 0

Bound Costs: 0

Partial Sol. Costs: 0

0 0 0 0

0 0 0

An Exact Algorithm

The "successive shortest path" algorithm

Page 10: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 10

0 0 0

3 0

4 0 3

0

3 0 7

4

6 2

7 4 8

5 10 6

0 0 0

Bound Costs: 10 Partial Sol. Costs: 3

0 0 0 0

0 0 0

+3 +4 +3

+0 +0 +0

An Exact Algorithm

The "successive shortest path" algorithm

Page 11: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 11

An Exact Algorithm

0 0 0

3 0

4 0 -3

0

3 0 7

4

6 2

7 4 8

5 10 6

3 3 4

Bound Costs: 10 Partial Sol. Costs: 3

0 0 0 0

0 0 0

The "successive shortest path" algorithm

Page 12: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 12

An Exact Algorithm

0 0 0

3 0

4 0 -3

0

3 0 7

4

6 2

7 4 8

5 10 6

3 3 4

Bound Costs: 10 Partial Sol. Costs: 6

0 0 0 0

0 0 0

+0 +0 +0

+0 +0 +0

The "successive shortest path" algorithm

Page 13: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 13

An Exact Algorithm

0 0 0

-3 0

4 0 3

0

-3 0 7

4

6 2

7 4 8

5 10 6

3 3 4

Bound Costs: 10 Partial Sol. Costs: 6

0 0 0 0

0 0 0

The "successive shortest path" algorithm

Page 14: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 14

An Exact Algorithm

0 0 0

-3 0

4 0 3

0

-3 0 7

4

6 2

7 4 8

5 10 6

3 3 4

Bound Costs: 15 Partial Sol. Costs: 15

0 0 0 0

0 0 0

+5 +5 +4

+5 +4 +0

The "successive shortest path" algorithm

Page 15: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 15

An Exact Algorithm

5 4 0

3 0

-4 0 3

1

-3 0 7

3

6 1

7 0 -8

0 10 1

7 8 9

Bound Costs: 15 Partial Sol. Costs: 15

0 0 0 0

0 0 0

The "successive shortest path" algorithm

Page 16: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 16

An Exact Algorithm

5 4 0

3 0

4 0 3

1

3 0 7

3

6 1

7 0 8

0 10 1

7 8 9

Bound Costs: 15 Solution Costs: 15

Guaranty: 0% (Optimal)

The "successive shortest path" algorithm

computes a shortest path for every source node,

i.e., does n shortest path calculations.

Page 17: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 17

An Exact Algorithm

5 4 0

3 0

4 0 3

1

3 0 7

3

6 1

7 0 8

0 10 1

7 8 9

Bound Costs: 15 Solution Costs: 15

Guaranty: 0% (Optimal)

Theorem: The assignment problem can be

solved in polynomial time of O(n3).

Page 18: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 19

Algebraic Model

Graphen theoretic model Algebraic Model "Integer Program"

1 2 3

3 4

3 3

7 6 7

8 10

1 2

11 12 13

21 22 23

31 32 33

11 12 13

21 22 23

31 32 33

11 21 31

12 22 32

13 23 33

11 33

11 33

min 3 3 4

3 7 6

7 8 10

s.t. 1

1

1

1

1

1

, , 0

, , {0,1}

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x

x x

3

Page 19: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 20

LP-Relaxation

Integer Program Linear Program

"LP-Relaxation" (here: integer)

11 12 13

21 22 23

31 32 33

11 12 13

21 22 23

31 32 33

11 21 31

12 22 32

13 23 33

11 33

11 33

min 3 3 4

3 7 6

7 8 10

s.t. 1

1

1

1

1

1

, , 0

, , 1

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x

x x

11 12 13

21 22 23

31 32 33

11 12 13

21 22 23

31 32 33

11 21 31

12 22 32

13 23 33

11 33

11 33

min 3 3 4

3 7 6

7 8 10

s.t. 1

1

1

1

1

1

, , 0

, , {0,1}

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x

x x

Page 20: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 21

LP-Relaxation

Linear Program

"LP-Relaxation"

Eliminate x11

Eliminate x12, x13, x21, x31

11 12 13

21 22 23

31 32 33

11 12 13

21 22 23

31 32 33

11 21 31

12 22 32

13 23 33

11 33

11 33

min 3 3 4

3 7 6

7 8 10

s.t. 1

1

1

1

1

1

, , 0

, , 1

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x x

x x

x x

12 13 12 13

21 22 23

31 32 33

12 13 11

21 22 23

31 32 33

12 13 21 31

12 22 32

13 23 33

12 13 33

12 13 33

min 3(1 ) 3 4

3 7 6

7 8 10

s.t. 1

1

1

1 1

1

1

1 , , 0

1 , , 1

x x x x

x x x

x x x

x x x

x x x

x x x

x x x x

x x x

x x x

x x x

x x x

Page 21: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 22

LP-Relaxation

Linear Program "LP-Relaxation"

"Polyhedron"

22 23 32 33

22 23 32 33

22 23

32 33

22 23 32 33

min 4 2 1 2 14

s.t. 1

1

1

, , , 0

x x x x

x x x x

x x

x x

x x x x

x22+x23

x32+x33

Page 22: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 23

Mathematical Models

x32=1 x21=1 x13=1

"Polyhedron"

1 2 3

3 4

3 3

7 6 7

8 10

1 2 3 x22+x23

x32+x33

1 2 3

3 4

3 3

7 6 7

8 10

1 2 3

Page 23: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 24

Linear Programming

Min x1 + 2x2

x1 + x2 2

x1 - x2 ≤ 1

x2 ≤ 3

x1 0

x2 0

x1

x2

Polyhedron

Simplex Algorithm

Page 24: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Linear Programming 1987-2000 (Bixby, Solving Real-World Linear Programs: A Decade and More of Progress. Oper. Res. 50(1) 3-15, 2002)

Hardware

Software

"A Model that might have taken a year to solve 10 years ago, can now solve in less

than 10 seconds."

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25

Old Computer New Computer Speedup

Sun 3/50 Pentium 4, 1.7 GHz 800

Sun 3/50 Compaq Server ES 40, 667 MHz 900

Intel 386, 25 MHz Compaq Server ES 40, 667 MHz 400

IBM 3090/108S Compaq Server ES 40, 667 MHz 45

Old Code New Code Estimated Speedup

XMP Cplex 1.0 4.7

Cplex 1.0 Cplex 5.0 22,0

Cplex 5.0 Cplex 7.1 3.7

XMP Cplex 7.1 960

Page 25: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 26

Linear Programming

Min x1 + 2x2

x1 + x2 2

x1 - x2 ≤ 1

x2 ≤ 3

x1 0

x2 0

x1

x2

Polyhedron

Simplex Algorithm

Page 26: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 27

Integer Programming

Min x1 + 2x2

x1 + x2 2

x1 - x2 ≤ 1

x2 ≤ 3

x1 0

x2 0

x1, x2 integer

x1

x2

Branch-and-Bound

x1 ≤ 1 x1 2

Polyhedron

Page 27: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 28

Integer Programming

Min x1 + 2x2

x1 + x2 2

x1 - x2 ≤ 1

x2 ≤ 3

x1 0

x2 0

x1

x2

Cutting Planes

Polyhedron

Page 28: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

MIP-Speedup 1991-2010 (Bixby, Lecture on Mixed-Integer Programming, TU Berlin, 20.01.2010)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 29

1

10

100

1000

10000

100000

0

1

2

3

4

5

6

7

8

9

10

1.2→2.1 2.1→3 3→4 4→5 5→6 6→6.5 6.5→7.1 7.1→8 8→9 9→10 10→11

Cu

mu

lati

ve

Sp

ee

du

p

Ve

rsio

n-t

o-V

ers

ion

Sp

ee

du

p

CPLEX Version-to-Version Pairs

V-V Speedup Cumulative Speedup

Mature Dual Simplex: 1994

Mined Theoretical Backlog: 1998 29530x

Page 29: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Sea Freight (Koopmans [1965], 7 sources, 7 sinks, all sea links)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 30

Page 30: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Optimal Allocation of Scarce Resources (Nobel Price in Economics 1975)

Leonid V. Kantorovich

Tjalling C. Koopmans

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 31

Page 31: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin LP Solution via Shadow Prices

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 32

Page 32: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Planning Problems in Public Transit

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 33

Service Design

Operational Planning

Operations Control

Page 33: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Vehicle Scheduling

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 34

too short to turn too long to wait

best choice

Page 34: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin "Camel Curve"

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 35

68

Page 35: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

"Camel Curve" (Ario, Böhring & Mojsilovic [1980])

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 36

Page 36: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Assignment Approach (Single Depot Vehicle Scheduling)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 37

1

3

4

6

5 5

2 5

D D

4

6

1

3

5 2

Page 37: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Assignment Approach (Single Depot Vehicle Scheduling)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 38

4

6

1

3

5 2

1

3

4

6

5 5

2 5

D D

Page 38: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Single Depot Vehicle Scheduling (Assignment Approach)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 39

D D 1 2 3

D D 1 2 3

4

4

D D 1 2 3

D D 1 2 3

4

4

1

1

2

2

3

3

D

D

4

4

1

1

2

2

3

3

D

D

4

4

Page 39: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Vehicle Scheduling Problem

Input

Timetabled and deadhead trips

Vehicle types and depot capacities

Vehicle costs (fixed and variable)

Output

Vehicle rotations

Problem

Compute rotations to cover all timetabled trips

Goals

Minimize number of vehicles

Minimize operation costs

Minimize line hopping etc.

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 40

Page 40: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Multicommodity Flow Model

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 42

Page 41: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Vehicle Scheduling (VS-OPT)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 43 43

Page 42: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

yIntegralit,}1,0{

Capacities

Trips1

Flow Aggregate0

Flow Vehicle,0

min

dijdijx

dd

j

ddjx

j

d

dijx

j

d d k

djkx

i

dijx

dj

i k

djkxd

ijx

d ij

dijx

dijc

Integer Programming Model (Multi-Commodity Flow Problem)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 44

Page 43: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Theoretical Results

Observation: The LP relaxation of the Multicommodity Flow Problem is in general not integer.

Theorem: The Multicommodity Flow Problem is NP-hard.

Theorem (Tardos et. al.): There are pseudo-polynomial time approximation algorithms to solve the LP-relaxation of Multicommodity Flow Problems which are faster than general LP methods.

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 45

Page 44: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

yIntegralit,}1,0{

Capacities

Trips1

Flow Aggregate0

Flow Vehicle,0

min

dijdijx

dd

j

ddjx

j

d

dijx

j

d d k

djkx

i

dijx

dj

i k

djkxd

ijx

d ij

dijx

dijc

Integer Programming Model (Multi-Commodity Flow Problem)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 47

Page 45: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Binary,}1,0{

Capacities

Trips1

Flow Agg.0

Lagrangeanminmax,

dijx

dx

jx

jxx

xxxc

d

ij

d

j

d

dj

d

d

ij

d d i

d

ji

i

d

ij

dj i i

d

ji

d

ij

d

j

d ij

d

ij

d

ij

Lagrangean Relaxation (Subproblem is a Min Cost Flow Problem)

Subproblem: Min-Cost Flow

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 48

Page 46: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Lagrangean Relaxation

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 49

min

0

T

b

Bx d

x

c x

Ax

min (

0

max )

Tb

d

x

c x Ax

Bx

(max min ) T

i ii

bc x Ax

( )max f

x1

x2

x3

x4

P(A,b)P(B,d)

f1

f2

f3

f4 f P(B,d)

Page 47: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

yIntegralit,}1,0{

Capacities

Trips1

Flow Aggregate0

Flow Vehicle,0

min

dijdijx

dd

j

ddjx

j

d

dijx

j

d d k

djkx

i

dijx

dj

i k

djkxd

ijx

d ij

dijx

dijc

Integer Programming Model (Multi-Commodity Flow Problem)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 50

Page 48: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Binary,}1,0{

Capacities

Trips1

Flow Agg.0

Lagrangeanminmax,

dijx

dx

jx

jxx

xxxc

d

ij

d

j

d

dj

d

d

ij

d d i

d

ji

i

d

ij

dj i i

d

ji

d

ij

d

j

d ij

d

ij

d

ij

Lagrangean Relaxation (Subproblem is a Min Cost Flow Problem)

Subproblem: Min-Cost Flow

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 51

Page 49: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Lagrangean Relaxation (Subproblem is a Min Cost Flow Problem)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 52

Page 50: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Lester Randolph Ford Jr.

Delbert Ray Fulkerson

Network Flows

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 53

Page 51: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Military Logistics (Ford & Fulkerson [1955], Schrijver [2002])

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 54

Page 52: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin MCF

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 55

Page 53: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin CINT 2006

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 56 Ralf Borndörfer

56

Page 54: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Lagrangean Pricing Algorithm (Löbel [1997])

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 57

Page 55: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Lagrangean Relaxation II

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 58

0

min

0 , Vehicle flow

0 Aggregated flow

1 Timetabled trips

Depot capacities

{0,1} , Deadhead trips

d d

ij ij

d ij

d d

ij jk

i k

d d

ij jk

d i d k

d

ij

d i

d

j d

j

d

ij

c x

x x j d

x x j

x j

x d

x ij d

Page 56: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Subproblem: Several independent Min-Cost-Flows (single-depot)

0

min

0 , Vehicle flow

0 Aggregated flow

Timetabled trips

Depot capacities

{0,1} , Deadhead trips

max 1

d d

ij ij

d ij

d d

ij jk

i k

d d

ij jk

d i d k

d

j d

j

d

ij

d

ij

d i

c x

x x j d

x x j

x d

x ij d

x

Lagrangean Relaxation II

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 59

Page 57: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin 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

Plus tabu search

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 60

Page 58: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

61

IVU.plan / IVU.crew / IVU.vehicle System Overview with Optimization Modules

IVU.crew

IVU.vehicle IVU.plan

timetable

stops routes

vehicle roster

duty roster

depot management

payroll accounting

vehicle dispatch

personnel dispatch

vehicle

workings

duties

BS-OPT VS-OPT

Integrated

Plan

nin

g

IS-OP

T

DS-OPT

R-OPT AFD

APD WS-OPT

Page 59: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin BVG (Berlin)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 62

Page 60: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Urban Scenarios

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 63

BVG HHA VHH

depots 10 14 10

vehicle types 44 40 19

timetabled trips 25 000 16 000 5 500

deadheads 70 000 000 15 100 000 10 000 000

cpu mins 200 50 28

Page 61: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

yIntegralit,}1,0{

Capacities

Trips1

Flow Aggregate0

Flow Vehicle,0

min

dijdijx

dd

j

ddjx

j

d

dijx

j

d d k

djkx

i

dijx

dj

i k

djkxd

ijx

d ij

dijx

dijc

Integer Programming Model (Multi-Commodity Flow Problem)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 64

Page 62: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Lagrangean Relaxation

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 65

min

0

T

b

Bx d

x

c x

Ax

min (

0

max )

Tb

d

x

c x Ax

Bx

(max min ) T

i ii

bc x Ax

( )max f

x1

x2

x3

x4

P(A,b)P(B,d)

f1

f2

f3

f4 f P(B,d)

Page 63: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Subgradient Method

max

𝑋 =conv 𝑥𝜇 polyhedral (piecewise linear)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 66

f

1

1f

2

3

T T( ) ( )f c x b Ax

ˆ ( ) : min ( )

k

kJ

f f

T T( ) : min ( )

x Xf c x b Ax

𝜆𝑘+1: = 𝜆𝑘 + 𝑢𝑘(𝑏 − 𝐴𝑥𝜇𝑘)

subgradient

Page 64: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bundle Method (Kiwiel [1990], Helmberg [2000])

max

𝑋 =conv 𝑥𝜇 polyhedral (piecewise linear)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 67

f

1

1f

2

3

T T( ) ( )f c x b Ax

2

1ˆ ˆargmax ( )

2k

k k k

uf

ˆ ( ) : min ( )

k

kJ

f f

T T( ) : min ( )

x Xf c x b Ax

Page 65: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Primal Approximation

Theorem:

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 68

( )k k Nx converges to a point : ,x x Ax b x X

T( ) ( )k k kf c x b Ax

ˆkf

z

f

1kf

1k

1

k

kJ

x x

1

1ˆ ( )

k

k kJ

b Axu

0 ( )kb Ax k

Page 66: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Quadratic Subproblem

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 69

2ˆ ˆmax ( )

2k

k k

uf (1)

2ˆmax

2

s.t. ( ), for all

kk

k

uv

v f J

(2)

2

1ˆmax ( ) ( )2

s.t. 1

0 1, for all

k k

k

kJ J

J

k

f b Axu

J

(3)

min

Page 67: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Bundle Method (IVU41 838,500 x 3,570, 10.5 NNEs per column)

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 70

50

100

150

200

250

300

350

400

20 40 60 80 100 120 140 sec

450

bundle volume barrier

cascent

0

0

Page 68: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin

Ralf Borndörfer 71

Heuristic Evaluation of f

f

f‘

4 1 2 3

4f̂

5f

Page 69: Bus Scheduling and Multicommodity Flows...2015/07/28  · Bus Scheduling and Multicommodity Flows | CO∈TL 2015 25 Old Computer New Computer Speedup Sun 3/50 Pentium 4, 1.7 GHz 800

Freie Universität Berlin Thank you for your attention

Ralf Borndörfer Freie Universität Berlin Zuse-Institute Berlin Takustr. 7 14195 Berlin-Dahlem Fon (+49 30) 84185-243 Fax (+49 30) 84185-269

[email protected] www.zib.de/borndoerfer

Bus Scheduling and Multicommodity Flows | CO∈TL 2015 94