scheduling and timetabling lecture 10 han hoogeveen
play

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

Scheduling and Timetabling, Lecture 10 Han Hoogeveen, Utrecht University 1 Timetabling: basic problems Basic problems Just to get a feeling what is possible (polynomial time) and when the problem gets NP -hard. Useful as a subproblem (for


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

  2. Timetabling: basic problems Basic problems Just to get a feeling what is possible (polynomial time) and when the problem gets NP -hard. Useful as a subproblem (for example in a decomposition approach) Based on the paper by De Werra ‘An introduction to timetabling’ (see website) The paper ‘School Timetabling in Theory and Practice’ by Irving van Heuven van Staereling (see website) provides more background 2

  3. Simple class-teacher model There are n teachers (denoted t 1 , . . . , t n ) There are m classes (denoted c 1 , . . . , c m ) Teacher j ( j = 1 , . . . , n ) must meet class c i ( i = 1 , . . . , m ) r ij times Each lesson requires one slot; independent lessons can be taught simultaneously (plenty of rooms available) Everybody is always available (crucial assumption) Goal: minimize the number of slots that you need. Any suggestions for a lower bound? 3

  4. Solution approach Valid lower bounds are m n � � max r ij and max r ij ; j i i =1 j =1 a teacher/class can have at most one lesson at a time Hence, the maximum of the two is a valid lower bound; call this lower bound p . It is possible to construct a solution that uses a number of slots that is equal to this lower bound. 4

  5. Graph approach (1) Construct a bipartite graph: teachers on the left, classes on the right Connect teacher t j with class c i with r ij edges The maximum degree in the graph is equal to p Color the edges using p colors such that this coloring corresponds to a feasible solution Edges with the same color correspond to lesson taught in the same slot. How to find this coloring? 5

  6. Graph approach (2) The edges with the same color form a matching, since each teacher/class has at most one lesson per slot. Theorem (König): If the maximum degree in a multi-edge bipartite graph is equal to p , then it is possible to partition the edges in p disjoint matchings. How to find such a solution? 6

  7. Availability is crucial In general, the problem remains easily solvable if everybody is always available Examples of similar problems that you can deal with then Each teacher and class have specified a maximum number of lessons that can be scheduled per day; you have to minimize the number of days. Given a number of days, assign the lessons such that each teacher and class have the same number of lessons per day (difference at most one between days) The rostering problems become NP -hard if there are slots at which some teacher/class is not available. 7

  8. Timetabling with unavailabilities Situation as before: n teachers t 1 , . . . , t n have to educate m classes c 1 , . . . , c m For each teacher/class combination the number of lessons r ij is known For each teacher the slots at which he/she is available is given; similarly for each class Question: does there exist a feasible solution using a given number of timeslots q ? 8

  9. Finding a feasible timetable in case of unavailabilities Decision problem, no objective. You can turn it into an optimization problem (if you want to) You can solve the decision problem using Constraint Satisfaction Here you combine constraints and try to reduce domains (famous example: Sudoku) If you get stuk, then you can use a decision tree (just like a branch-and-bound tree) You can fathom a node by showing that there is no feasible solution possible. 9

  10. Showing infeasibility You want to have a strong test, which can discard a node early in the tree In general you will need to look at a relaxation of the problem A relaxation results in a simpler decision problem; be sure that showing that this relaxation is infeasible implies that the original problem has no solution Similar to the branch-and-bound approach where you have to find an upper/lower bound by relaxing a problem Suggestions for a relaxation? 10

  11. Relaxing the problem De Werra considers two relaxations that can be used here: Consider only 1 teacher (suppose this is teacher 0) Consider only 1 class (suppose this is class 0) Clearly a relaxation: if there is no timetable for this single teacher, then the full problem is infeasible (similar for the class) How to solve it? De Werra considers the subproblem of looking at a single timeslot, but this relaxation is not useful to discard nodes in the decision tree. 11

  12. Solving the 1-teacher problem You must assign the classes to timeslots You only have to consider timeslots on which the teacher is available It is possible to assign a class to a timeslot only if the class is available at that time slot 12

  13. Formulating it as a max flow problem The problem can be solved as an unweighted bipartite assignment problem, where you have r i 0 copies of class i (one per lesson that they must get from teacher 0) Formulate it as a max flow problem Two sets of vertices: class nodes c 1 , . . . , c m and timeslot nodes t 1 , . . . , t q Add arc ( c i , t k ) if and only if class i is available in timeslot k Add source s and the arcs ( s , c i ) ( i = 1 , . . . , m ) with capacity r i 0 (at most r i 0 lessons for class i ) Add sink t and the arcs ( c i , t ) ( i = 1 , . . . , m ) with capacity 1 (at most 1 lessons for class i per timeslot) How can you see if there is a feasible solution for the single teacher problem? 13

  14. Additional questions How can you use/adapt this max flow formulation to derive characteristics of a feasible solution? How could you try to solve this problem using branch-and-price? 14

  15. Generating a round robin tournament In a round robin tournament each team meets each other team once In each timeslot each team plays one match (or one team has a bye) An easy way to generate such a round robin is through the bracelet method Possible disadvantage: patterns will occur with respect to subsequent opponents Major sports competitions are now planned using ILP techniques (possibly a good subject for your presentation ...) 15

  16. Bracelet method 1 �❅ ❅ � ❅ � Add as many blocks as you need ❅ � 2 2i+1 Opposite teams are matched The team on top has a bye or plays team 2 i + 2 After planning one round, 3 2i shift all numbers clockwise, etc. i+1 i+2 16

  17. Real-life problems Real-life problems often have many additional constraints, which prevent a clean solution method. Local search works (almost) always well Column generation may be a good alternative. You must decide what to do with the additional constraints. Possibilities: Add these as constraints in the master problem (only if these are linear) Include these in the pricing problem. The pricing problem should not become too difficult to solve. See the application of using column generation to find healthy, personalized rosters. 17

  18. Scheduling Goal: decide for each job (task) by which machine it is executed during which time interval such that all constraints are satisfied and some objective is minimized. Example: one (or more) mechanic has to repair a number of cars in a garage. The resulting schedule is shown as a Gantt-chart: time goes from left to right one vertical line per machine a job is depicted as a block: the left border indicates the start time and the right border indicates the completion time. 18

  19. Single and parallel machine scheduling Standard assumptions (can be different in other models) There are m machines ( m can be equal to 1); together these have to carry out the work. Notation M 1 , . . . , M m . Each machine is continuously available from time zero onwards. Each machine has capacity one (it can handle at most one job at a time); the completion time of one job may be equal to the start time of the next job. 19

  20. Jobs (1) Standard assumptions (can be different in other models) There are n jobs (notation J 1 , . . . , J n ). Executing job J j requires an uninterrupted period of length p j (processing time); preemption is not allowed, unless stated differently. The execution of job J j should not start before its release date r j ; if r j has not been specificied, then r j = 0. The execution of job J j should be completed at or before its deadline ¯ d j ; if ¯ d j has not been specificied, then ¯ d j = ∞ . 20

  21. Jobs (2) Job J j cannot start before all its predecessors have been completed. The precedence relations (if available) are specified in the form of a directed acyclic graph. Job J j can have a weight w j . Job J j can have a due date d j ; this due date indicates a preferred completion time , which is used in the objective. 21

  22. Notation; parameters J j : job j ( j = 1 , . . . , n ). M i : machine i ( i = 1 , . . . , m ). p j : processing time of J j . r j : release date of J j ; J j cannot be started before time r j . ¯ d j : deadline of J j ; J j should be finished at or before time ¯ d j . d j : due date of J j ; this is used to compute the objective value. w j : weight of J j ; this is used to compute the objective value. f j ( t ): cost function of J j ; it measures the cost of completing J j at time t . We assume that f j is non-decreasing in t . 22

  23. Notation; variables Consider a given schedule σ C j ( σ ): completion time of J j in schedule σ ; C j for short. S j ( σ ): start time of J j in schedule σ ; S j for short. If preemption is not allowed, then C j = S j + p j . L j ( σ ) = C j ( σ ) − d j : lateness of J j in schedule σ ; L j for short. T j ( σ ) = max { L j ( σ ) , 0 } : tardiness of J j in schedule σ ; T j for short. U j ( σ ): this is an indicator function that signals whether L j > 0 (then U j = 1) or L j ≤ 0 (then U j = 0); U j for short. 23

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