extendingperiodiceventscheduling ... · motivation possibleextensions newapproach(sat) 15000nodes,...

20
Faculty of Traffic Sciences Chair of Traffic Flow Science Extending Periodic Event Scheduling by Decisional Flow Transportation Networks Peter Großmann, Jens Opitz, Reyk Weiß, Michael Kümmling [email protected] Glasgow, 07/14/2015

Upload: others

Post on 25-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Faculty of Traffic Sciences Chair of Traffic Flow Science

Extending Periodic Event Schedulingby Decisional Flow TransportationNetworksPeter Großmann, Jens Opitz, Reyk Weiß, Michael Kü[email protected]

Glasgow, 07/14/2015

Page 2: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Outline

1 Motivation

2 Periodic Event Scheduling

3 Flow Decision Periodic Event Scheduling

4 Periodic Rail Freight Planning

5 Conclusion

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 2

Page 3: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

MotivationIntroduction

• timetabling of public transport railway networks (e. g., PESP) is difficult tobe calculated automatically (NP-complete)→ no existence of “default” software

• SAT solvers are universally applicable to real world problems• best approach:

PESP instance→ PESP ≤p SAT→ SAT solver→ SAT solution→ PESP schedule

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 3

Page 4: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

MotivationProblem Sizes with Same Computation Time

manual effort

max: 20 nodes, 40 constraints

previous state-of-the-art solver

600 nodes, 3 000 constraints

new approach (SAT)

15 000 nodes, 80 000 constraints(up to 1 000 000 constraints)

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 4

Page 5: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

MotivationPossible Extensions

new approach (SAT)

15 000 nodes,80 000 constraints(up to 1 000 000constraints)

• extracting and resolving infeasible periodic event networks(local conflicts)

• flow and decision periodic event scheduling (FDPESP)– non-connected flow graphs (track allocation)– distinct chain paths (integration of routing and

timetabling)– duplicated chain paths (periodic rail freight train paths)

• SAT-based optimization (e. g., MaxSAT, MCS)– minimization of weighted slacks– optimization in FDPESP

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 5

Page 6: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Periodic Event NetworksPeriodic Event Scheduling Problem (PESP)

n

m

p

[15, 15]60 [2, 4]60

[15, 17]60

• period T = 60• (periodic) events (nodes) n, m, p ∈ V

– schedule Π : V → [0, T − 1] ⊆ N– potential Π(n), Π(m), Π(p)

• constraints resp. activities (edges) E• e. g., (n, m) with [15, 15]60

– constraint holds iff Π(m)−Π(n) ∈ [15, 15]60– e. g., Π(n) = 2, Π(m) = 17 or Π(n) = 50, Π(m) = 5

• tuple N = (V, E, T ) is called periodic event network

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 6

Page 7: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Periodic Event NetworksDefinition PESP

• let N = (V, E, T ) be a periodic event network

Definition (Valid Schedule)A schedule Π is valid for N , iff for all e = (n, m) ∈ E with [l, u]T it holds

Π(m)−Π(n) ∈ [l, u]T .

Definition (Periodic Event Scheduling Problem (PESP))Is the decision problem whether it exists a valid schedule for N .

• PESP is NP-complete

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 7

Page 8: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Flow Decision PESPFlow Graphs

A1

A2

B1

C1

C2

D1

E1

E2

e1

e2

e3

e4

e5

e6

e7

• extending PESP by further structures:– decision nodes and decision edges– transport networks (flow graphs)

• goal: path of a source to a destination node maintaining feasibility

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 8

Page 9: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Flow Decision PESPDuplicating Flow Graphs

A11

A12

B11

C11

C12

D11

E11

E12

e11

e12

e13

e14

e15

e16

e17

A31

A32

B31

C31

C32

D31

E31

E32

e31

e32

e33

e34

e35

e36

e37

A21

A22

B21

C21

C22

D21

E21

E22

e21

e22

e23

e24

e25

e26

e27

A41

A42

B41

C41

C42

D41

E41

E42

e41

e42

e43

e44

e45

e46

e47

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 9

Page 10: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Flow Decision PESPFlow Decision Periodic Event Network

A1

A2

B1

C1

C2

D1

E1

E2

e1

e2

e3

e4

e5

e6

e7

• N = (V, E, T ) . . . periodic event network• S . . . set of flow graphs• H . . . set of decision nodes (H ⊆ V)• bijective mapping of flow edges ei (i ∈ {1, . . . , 7}) and periodic events via

label function l(ei) = ni (ni ∈ H)• D = (V, E, T,H) is flow decision periodic event network for S• node, edge sets of S not necessarily disjoint (currently no application)

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 10

Page 11: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Flow Decision PESPFlow Decision Periodic Event Network (2)

A1

A2

B1

C1

C2

D1

E1

E2

e1

e2

e3

e4

e5

e6

e7

• D = (V, E, T,H) . . . flow decision periodic event network for flow graph set S• V ′ . . . set of periodic events (V ′ ⊆ V), e. g., V ′ = {n2, n4, n7, n8}• Π . . . schedule for V ′

Definition (Valid Schedule – extended)Π is valid for D under S, iff

• exists exactly one path for all flow graphs in S via l−1 for nodes in V ′

• for all e = (n, m) ∈ E: n, m ∈ V ′ ⇒ e holds under Π

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 11

Page 12: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Encoding to SATConjunctive Normal Form – Notations

F = ¬p ∧ (q ∨ r)

• literal: L = p or L = ¬p (variable or its negation), p ∈ R• clause c: disjunction of literals• formula F in conjunctive normal form (CNF): conjunction of clauses• interpretation I : R→ {0 , 1}• F is satisfiable (F I = 1 ) iff for all clauses at least one literal LI = 1• e. g., pI = 0 , qI = 1 and rI = 0 implies F I = 1• F unsatisfiable if no such I exists

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 12

Page 13: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Encoding to SATencoding flow graphs

A1

A2

B1

C1

C2

D1

E1

E2

e1

e2

e3

e4

e5

e6

e7

F = (q1 ∨ q2 ∨ q3) ∧ (¬q1 ∨ ¬q2) ∧ (¬q1 ∨ ¬q3) ∧ (¬q2 ∨ ¬q3)∧ (q6 ∨ q7) ∧ (¬q6 ∨ ¬q7)∧ (¬q6 ∨ ¬q7)∧ (¬q1 ∨ ¬q2) ∧ (¬q4 ∨ ¬q5)∧ (¬q1 ∨ q4) ∧ (¬q2 ∨ q4) ∧ (¬q4 ∨ q6 ∨ q7) . . .

• qi . . . propositional variable if flow edge (node) ei is active (in path)• exactly one source (at-least-one, at-most-one)• exactly one destination (at-least-one, at-most-one)• flow conservation

– at-most-one outgoing flow edge per flow node– at-most-one incoming flow edge per flow node– at-least-one successor flow edge active if incoming active

• qI2 = 1 , qI

4 = 1 , qI7 = 1 (remaining = 0 ) ⇒ path (e2, e4, e7)

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 13

Page 14: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Encoding to SATencoding Flow Decision PESP constraints

• D = (V, E, T,H) . . . flow decision periodic event network for flow graph set S• encode constraint (edge) e = (ni, nj) for a periodic event network with

mapping encodeEdge (developed in 2011)• M = {qk ∈ R | k ∈ {i, j} : nk ∈ H}• encoding for constraints

encodeEdgeM (e) =∨

q∈M

(¬q) ∨ encodeEdge(e)

final encoding:– encode flow graphs– encode periodic events– encode constraints via encodeEdgeM

and connect all structures conjunctively

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 14

Page 15: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Periodic Rail Freight PlanningProblem

FMB

RKR

• input data:– feasible periodic event network– relation of the to be inserted train paths (e. g., Mainz → Karlsruhe,

Germany)Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 15

Page 16: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Periodic Rail Freight PlanningProblem (2)

Tim

e[h

h:m

m]

Timing points

10:00

09:30

09:00

08:30

08:00

DP DZWDLI

DNMDRC

DHNDJA

DJZDSY

DSBDGO

DGFDSPH

DNZUDLIM

DRUGDMEH

DRTHD945W

D8215D8214

D8741

• goal: insertion (path+timetable) of rail freight train paths based on short subpaths (e. g., Gutenfürst → Zwickau, Germany)

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 16

Page 17: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Periodic Rail Freight PlanningResult

Tim

e[h

h:m

m]

Timing points

10:00

09:30

09:00

08:30

08:00

DP DZWDLI

DNMDRC

DHNDJA

DJZDSY

DSBDGO

DGFDSPH

DNZUDLIM

DRUGDMEH

DRTHD945W

D8215D8214

D8741

• newly inserted rail freight train paths (blue) on given relation (Gutenfürst →Zwickau, Germany)

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 17

Page 18: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Periodic Rail Freight PlanningResult (2)

• Mannheim (Germany) → Basel (Switzerland)• 200 flow edges per flow graph, 12 duplicated flow graphs

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 18

Page 19: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Conclusion

• automated timetabling of large and complex periodic event networks ispossible

• reasonable extension of PESP by flow graphs:– track allocation– integration of routing and timetabling– periodic rail freight train paths

• outlook:– more efficient encoding for even better computational time– solver parallelization with appropriate preprocesses

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 19

Page 20: ExtendingPeriodicEventScheduling ... · Motivation PossibleExtensions newapproach(SAT) 15000nodes, 80000constraints (upto1000000 constraints) extractingandresolvinginfeasibleperiodiceventnetworks

Sources

A. Biere, M. Heule, H. van Maaren, and T. Walsh, editors.Handbook of Satisfiability.IOS Press, 2009.

Peter Großmann, Steffen Hölldobler, Norbert Manthey, Karl Nachtigall, JensOpitz, and Peter Steinke.Solving periodic event scheduling problems with SAT.In IEA/AIE, volume 7345 of LNAI, pages 166–175. Springer, 2012.

Karl Nachtigall.Periodic Network Optimization and Fixed Interval Timetable.Habilitation thesis, University Hildesheim, 1998.

Paolo Serafini and Walter Ukovich.A mathematical model for periodic scheduling problems.SIAM J. Discrete Math., 2(4):550–581, 1989.

Tomoya Tanjo, Naoyuki Tamura, and Mutsunori Banbara.A compact and efficient SAT-encoding of finite domain CSP.In SAT, pages 375–376, 2011.

Glasgow, 07/14/2015 Periodic Event Scheduling with Flows slide 20