scheduling and timetabling lecture 3 han hoogeveen
play

Scheduling and Timetabling, Lecture 3 Han Hoogeveen, Utrecht - PowerPoint PPT Presentation

Scheduling and Timetabling, Lecture 3 Han Hoogeveen, Utrecht University 1 Lecture today Finding a timetable for the trains Routing trains through stations Dividing additional driving time Branch-and-bound (brush up) Is the first assignment


  1. Scheduling and Timetabling, Lecture 3 Han Hoogeveen, Utrecht University 1

  2. Lecture today Finding a timetable for the trains Routing trains through stations Dividing additional driving time Branch-and-bound (brush up) Is the first assignment clear? 2

  3. Finding a good train schedule See the paper ‘A cycle based optimization model for the cyclic railway timetabling problem’ by Leon Peeters and Leo Kroon (on the website). This approach is used by the Dutch Railways. They won the Edelman award for it (which is considered ‘the price’ for Operations Research). 3

  4. Problem description We are given: Data concerning the infrastructure How the trains should run (the trips from where to where) The frequency of each trip per hour We are asked to find a periodic schedule (period 60 minutes) for the trains; you must specify for each stop in each trip when the train will arrive and when it will depart. First: how to model this problem (assumptions, constraints, objective)? 4

  5. Model of the NS-problem Assumptions: all resources are at the right place at the desired time no disturbances routing the trains through the station is always possible Constraints Safety constraints: at least three minutes difference between trains Driving times ‘Marketing constraints’ like: smooth connections; if frequency ≥ 2, then evenly spread in time. Objectives: Penalties for deviations from optimal time-length connection Use of material needed for driving the time table 5

  6. Solution approach: ILP Define an event for each arrival/departure; we must decide on the time at which each event takes place measured in minutes. We want a cyclic solution with cycle duration T (60 minutes here): all events must take place at the same time each hour. Formulate the problem using Integer Linear Programming: Variables: Introduce a variable v i for each event i v i will specify the time at which event i takes place v i ∈ { 0 , 1 , 2 , . . . , 59 } 6

  7. ILP: Constraints Constraints are introduced to express the relation between two events in time (we only need constraints between two events) General form of a constraint of i on j : v j − v i ∈ [ l ij , u ij ] T This constraint indicates that the difference between the two events should be in between l ij and u ij minutes, taking the desired duration of T into account. For example: the difference between departure from A and arrival at B is 19 or 20 minutes. Then l ij = 19 and u ij = 20. Using T = 60 implies that v i = 55 and v j = 15 satisfy the constraint. The constraint is not linear; how to make it linear? 7

  8. Formulating it as an ILP Introduce a new variable: p ij . p ij indicates the difference in cycle events i and j v j − v i ∈ [ l ij , u ij ] T ⇐ ⇒ l ij ≤ v j − v i + Tp ij ≤ u ij Example: 19 ≤ v j − v i + Tp ij ≤ 20 v i = 15 and v j = 35 satisfies the constraint with p ij = 0; v i = 55 and v j = 15 satisfies the constraint with p ij = 1. p ij must be integral; negative values are possible. 8

  9. Reversing the constraint You sometimes do not know whether v i will take place after v j or the other way around. Suppose you formulate the constraint in terms of v j − v i : l ij ≤ v j − v i + Tp ij ≤ u ij You can reverse it to get v i − v j as follows: l ij ≤ v j − v i + Tp ij ≤ u ij − l ij ≥ − v j + v i − Tp ij ≥ − u ij − u ij ≤ v i − v j − Tp ij ≤ − l ij T − u ij ≤ v i − v j − Tp ij + T ≤ T − l ij l ji ≤ v i − v j + Tp ji ≤ u ji Hence, we must have that l ji = T − u ij ; u ji = T − l ij ; p ji = 1 − p ij . 9

  10. Feasible region The feasible region is described as the set X with � � � v j ∈ R l ij ≤ v j − v i + Tp ij ≤ u ij � X = � p ij ∈ Z 0 ≤ v i ≤ 59 � � Because of Total UniModularity (TUM) of the constraint matrix, an optimal solution will have integral v i values. 10

  11. Cycle representation (1) Define graph G = ( V , A ) with V is set of events ( i , j ) ∈ A if and only if there is a constraint of i on j of the form l ij ≤ v j − v i + Tp ij ≤ u ij Substitute x ij = ( v j − v i ) for each arc ( i , j ) ∈ A . For any cycle ( i , j )( j , k )( k , i ) ∈ A we have that x ij + x jk + x ki = ( v j − v i ) + ( v k − v j ) + ( v i − v k ) = 0 Observation: this holds for each cycle in G = ( V , A ); call this the cycle-constraint. 11

  12. Cycle representation (2) Another observation: x ij = − x ji . Use this to derive more general cycle constraints. Ignore (only now) the orientation of A (so E = A ). Suppose c is a cycle in the resulting graph. Fix an orientation for c . For any arc ( i , j ) ∈ A define  0 if { i , j } / ∈ c   γ c ij = 1 if ( i , j ) ∈ c  − 1 if ( j , i ) ∈ c  The feasible region is empty, unless � γ c ij x ij = 0 ∀ cycles c ( i , j ) ∈ A It is sufficient to consider the cycles in the cyclebase C . 12

  13. Example (1) 5 5 ✒ � ❅ ■ � ❅ � ❅ � ❅ � ❅ � ❅ 4 3 4 3 � ✲ ❅ � ❅ ✻ ✻ ✲ 1 2 1 2 Three cycles in the undirected graph: (1 , 2 , 3 , 4), (4 , 3 , 5) and (1 , 2 , 3 , 5 , 4). The first one yields the constraint x 12 + x 23 + x 34 + x 41 = 0 13

  14. Example (2) 5 5 � ✒ ■ ❅ � ❅ � ❅ � ❅ 4 3 4 3 � ✲ ❅ � ❅ ✻ ✻ ✲ 1 2 1 2 Since the arcs (3 , 4) and (4 , 1) do not exist, we use x 34 = − x 43 and x 41 = − x 14 . The constraint becomes x 12 + x 23 − x 43 − x 14 = 0 Similarly, x 43 + x 35 − x 45 = 0 Adding up the two constraints yields x 12 + x 23 + x 35 − x 45 − x 14 = 0 This is the constraint for cycle (1 , 2 , 3 , 5 , 4). 14

  15. Rewriting feasible region (1) � � � ( i , j ) ∈ A γ c � ij x ij = 0 ∀ c ∈ C x ij ∈ R � X = � p ij ∈ Z � l ij ≤ x ij + Tp ij ≤ u ij � Define y ij = x ij + Tp ij and substitute ( x ij = y ij − Tp ij ): � � � ( i , j ) ∈ A γ c ( i , j ) ∈ A γ c y ij ∈ R � ij y ij = T � ij p ij ∀ c ∈ C � X = � p ij ∈ Z l ij ≤ y ij ≤ u ij � � 15

  16. Rewriting feasible region (2) � � � ( i , j ) ∈ A γ c ( i , j ) ∈ A γ c � ij y ij = T � ∀ c ∈ C y ij ∈ R ij p ij � X = � p ij ∈ Z � l ij ≤ y ij ≤ u ij � ( i , j ) ∈ A γ c Define q c = � ij p ij : � � � ( i , j ) ∈ A γ c x ij ∈ R � ij y ij = Tq c ∀ c ∈ C � X = � q c ∈ Z l ij ≤ y ij ≤ u ij � � Tq c is equal to the time it takes to move along cycle c ! 16

  17. Rewriting feasible region (3) Since q c is integral, you can derive an lower and upper bound for each q c using the constraints l ij ≤ x ij + Tp ij ≤ u ij   � � ⌈ l ij −  / T ⌉ ≤ q c ≤ u ij    ( i , j ): γ c ( i , j ): γ c ij =1 ij = − 1   � � ⌊ u ij − l ij  / T ⌋    ( i , j ): γ c ( i , j ): γ c ij =1 ij = − 1 Add these bounds to the ILP and solve it. Given a value for the q c variables, you can determine a feasible solution for the x ij variables. 17

  18. Derivation of bound on q c (1) Consider cycle c = (1 , 2 , 3); assume this yields the constraint x 12 + x 23 − x 13 = 0 ( γ c 12 = 1, γ c 23 = 1, γ c 13 = − 1). We have that q c = p 12 + p 23 − p 13 The constraints are l 12 ≤ x 12 + Tp 12 ≤ u 12 , etc. Since we have − x 13 , we have to reverse the constraint l 13 ≤ x 13 + Tp 13 ≤ u 13 . Multiplying it by − 1 and rewriting gives − u 13 ≤ − x 13 − Tp 13 ≤ − l 13 . Now we have the following three constraints: l 12 ≤ x 12 + Tp 12 ≤ u 12 ≤ x 23 + Tp 23 ≤ l 23 u 23 − u 13 ≤ − x 13 − Tp 13 ≤ − l 13 18

  19. Derivation of bound on q c (2) Add up all three constraints; this yields l 12 + l 23 − u 13 ≤ x 12 + x 23 − x 13 + T ( p 12 + p 23 − p 13 ) ≤ u 12 + u 23 − l 13 Remark that x 12 + x 23 − x 13 = 0; divide by T : l 12 + l 23 − u 13 ≤ ( p 12 + p 23 − p 13 ) ≤ u 12 + u 23 − l 13 T T Since q c = p 12 + p 23 − p 13 is integral, we can round up the lower bound and round down the upper bound; this gives the bound of the previous page. 19

  20. Constructing a cyle base Goal: construct a cycle base for the undirected graph G = ( V , E ) Start with any spanning tree T of E . Renumber the remaining edges as e 1 , e 2 , . . . , e k , with k = | E | − ( | V | − 1). Construct cycle j ( j = 1 , . . . , k ) of the cycle base as follows: Add e j to T ; this yields a cycle. Cycle j contains the edges that the cycle in T ∪ { e j } consists of. Remove e j from T . Observation: e j occurs only in cycle j ; edges in T can show up in several cycles. We can use this observation to find a ‘good’ cycle base. What would we like to have in a cycle base, and how can we try to achieve this? 20

  21. Constructing a ‘good’ cyle base (1) Important for a cycle base is the remark: ‘Given a value for the q c variables, you can determine a feasible solution for the x ij variables.’ To find a value for the q c you must solve an ILP; this can be difficult. Use here the bounds on q c :   � � ⌈ l ij −  / T ⌉ ≤ q c ≤ u ij    ( i , j ): γ c ( i , j ): γ c ij =1 ij = − 1   � � ⌊ u ij −  / T ⌋ l ij    ( i , j ): γ c ( i , j ): γ c ij =1 ij = − 1 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend