scheduling and timetabling lecture 4 han hoogeveen
play

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

Scheduling and Timetabling, Lecture 4 Han Hoogeveen, Utrecht University 1 Lecture today Dividing additional driving time Buses in Rotterdam Single Depot Vehichle Scheduling problem (only buses) Planning the drivers (sequential


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

  2. Lecture today Dividing additional driving time ‘Buses in Rotterdam’ Single Depot Vehichle Scheduling problem (only buses) Planning the drivers (sequential approach): presumably on Thursday Planning buses and drivers (integrated problem): Thursday 2

  3. Buses in Rotterdam Problem: Planning buses and drivers Sequential approach: first plan the buses, and subsequentially the drivers given the busschedule. Integrated approach: do not split the problem and find a solution for the entire problem simultaneously Based on the papers (see website): ‘Models and Algorithms for Single-Depot Vehicle Scheduling’ (planning only buses) ‘Models and algorithms for integration of vehicle and crew scheduling’ (planning drivers too) 3

  4. Single Depot Vehicle Scheduling Problem (SDVSP) Assumptions: Overnight buses are stored in a single depot There is an unlimited number of identical buses available There is no limit on the length of a bus route per day (no refueling) Input: Set of trips that have to be driven For each trip the starting place/time and end place/time are known Goal: Find a feasible solution with minimum cost Using a bus implies a fixed cost and a variable cost per kilometer. 4

  5. Graph approach Buses can travel empty from the end point of trip i to the starting point of trip j if time permits; this is called a deadhead . A bus schedule is composed of a deadhead from the depot to the starting point of its first trip a set of trips and deadheads a deadhead from the endpoint of its last trip to the depot. Trips are not important for the cost, as long as they are driven. We have to decide on which deadheads to drive. Two approaches to formulate it as a graph. How? 5

  6. First graph approach Construct the following directed graph (direction according to time) Each trip i corresponds to two vertices i 1 and i 2 There are two dummy vertices s and t corresponding to the start and end of the busschedule at the depot Add arcs ( i 1 , i 2 ) for each trip i . Add arcs ( s , i 1 ) and ( i 2 , t ) for each trip i Add arc ( i 2 , j 1 ) if and only if it is possible to drive trip j immediately after trip i ; this depends on the start time of j , the end time of i and the driving time from the end point of i to the start point of j at that time of day. A feasible busschedule corresponds then to a path from s to t in the graph. The goal is to find a set of paths of minimum length that cover each trip exactly once. 6

  7. Second graph approach Construct the following directed graph (direction according to time) Each trip i corresponds to a vertex i (instead of two in the previous model) There are two dummy vertices s and t corresponding to the start and end of the busschedule at the depot Add arcs ( s , i ) and ( i , t ) for each vertex i Add arc ( i , j ) if and only if it is possible to drive trip j immediately after trip i ; this depends on the start time of j , the end time of i and the driving time from the end point of i to the start point of j at that time of day. A feasible busschedule corresponds then to a path from s to t in the graph. The goal is to find a set of paths of minimum length that cover each trip exactly once. 7

  8. Modeling the cost of a route Cost of a route: Fixed cost per bus; assume that this is M for each bus. Variable cost per kilometer. How to assign the costs to the arcs such that the length of the path is equal to the cost of the schedule? Differences between two models? 8

  9. Cost of a route Fixed cost per bus: The fixed cost should be accounted once for each path. ⇒ Each path starts in s = assign this cost to ( s , i 1 ) or ( s , i ) for each trip i . Variable cost: The total length of the trips is constant: ignore these. The cost of using deadhead ( i , j ) is known; assign it to arc ( i , j ). Similarly, assign the cost of the trip from the depot to i to ( s , i 1 ) or to ( s , i ) and the cost of the trip from j to the depot to ( j 2 , t ) or to ( j , t ). How to solve these problems? 9

  10. Solution to approach with ( i 1 , i 2 ) Solve the problem as a min-cost max-flow problem; the size of the flow corresponds to the number of buses used. To avoid a solution in which each trip is driven by a separate bus, you must find a solution with minimum cost as main objective (continue with augmenting the flow until you find an augmenting path with positive cost). Each arc gets capacity 1 (since you need one bus per trip) What are the costs? If everything goes well, then the flow corresponds to a set of bus schedules. Problem: how can you guarantee that each trip is driven? 10

  11. Min cost max flow approach (2) You can force that each trip is driven by making the arcs ( i 1 , i 2 ) irresistable Subtract X (some big number) from the cost of these arcs ( i 1 , i 2 ). In the final solution there is a flow of one through each arc ( i 1 , i 2 ). 11

  12. ILP formulation to solve the second graph approach Variables? Constraints? 12

  13. ILP formulation (2) To find the busschedules you need to find out which deadheads are driven Variables: introduce a binary variable x ij for each arc ( i , j ) in the graph to signal whether the corresponding deadhead is chosen. The arcs ( s , i ) and ( j , t ) are included. Objective: minimize total cost. We have assigned a cost to each arc ( i , j ) earlier; call this cost coefficient c ij . � min c ij x ij ( i , j ) ∈ A 13

  14. ILP formulation (3) To enforce that you find paths that cover each trip exactly once, add a constraint that for each vertex i ∈ V / { s , t } you select exactly one incoming arc and one outgoing arc. � x ij = 1 ∀ i ∈ V / { s , t } (one successor for i ) ( i , j ) ∈ A � ∀ j ∈ V / { s , t } x ij = 1 (one predecessor for j ) ( i , j ) ∈ A Binary constraints: x ij ∈ { 0 , 1 } ∀ ( i , j ) ∈ A 14

  15. Total UniModularity The corresponding constraint matrix is Totally UniModular (TUM): when you solve the LP-relaxation, then you find an optimal solution that is integral. Theorem : If all elements of the constraint matrix A are equal to 0 , +1 , − 1 and each column of A contains at most one +1 and at most one − 1, then A is TUM. 15

  16. Other algorithms to solve the problem The problem can be solved as a linear program (ignore the integrality constraints). The problem can be solved by a purely combinatoric graph algorithm. Suggestions? 16

  17. Assignment problem (1) The solution consists of a set of paths (from s to t ) To enforce that each vertex is included in a path: assign to each vertex i ∈ V / { s , t } a single predecessor assign to each vertex i ∈ V / { s , t } a single successor Formulate the problem as an assignment problem in a bipartite graph. 17

  18. Assignment problem (2) Construct the bipartite graph as follows: Vertices at the left: s and all trips Vertices at the right: t and all trips Arcs from left to right; an arc corresponds to a possible deadhead. The cost are as before. The goal is to find an assignment that Covers each ordinary trip exactly once Covers s and t multiple times This assignment problem can be solved as a min-cost max-flow problem. Problem: you do not know how many buses you will need. 18

  19. Assignment problem (3) Construct the bipartite graph as mentioned on the previous slide. Each arc has capacity one and cost equal to the cost of the deadhead, which is increased by the fixed cost for arcs ( s , i ). Add a source s ′ and a sink t ′ ; connect s ′ to the vertices at the left and connect the vertices to the right to t ′ . Arcs ( s ′ , s ) and ( t , t ′ ) have a large capacity (for example n ); all other arcs ( s ′ , i ) and ( j , t ′ ) have capacity 1. The cost of each of these arcs is 0. Add arc ( s , t ) with capacity n and cost 0 (to model redundant buses) Find a min cost flow of maximum size. The size of the flow is equal to 2 n (capacity of the [ S , T ] cut with S = { s } , and also of the [ S , T ] cut with T = { t } ). 19

  20. Constructing the bus schedules After solving the max flow min cost problem: remove s ′ and all arcs ( s ′ , i ) (including ( s ′ , s )) remove t ′ and all arcs ( j , t ′ ) (including ( t , t ′ )) remove the arc ( s , t ) and remove all arcs without flow add arcs ( i , i ) for all i ∈ V / { s , t } ; these are directed from right to left. The bus schedules can be constructed by following the s − > t paths. See the example in the slides of Lecture 5. 20

  21. Extensions The buses have different fixed costs (variable costs are equal). This variant is still solvable using these techniques. There are several depots; the number of buses staying overnight must remain the same (can differ per depot). This variant is still quickly solvable (the constraint matrix remains TUM). There are several depots; the same set of buses must return to the depot each night (not just the number of buses). This problem is NP -hard in the strong sense (multi-commodity flow). 21

Recommend


More recommend