© J. Christopher Beck Lecture 17: Introduction to Timetabling
© J. Christopher Beck Outline Introduction to Timetabling UC Berkeley Classroom Assignment Reservations without Slack Example IP formulation Algorithm 9.2.2
© J. Christopher Beck Classroom Timetabling UC Berkeley 30,000 students, 80 depts, 4000 classes, 250 rooms 3 schedulers and 1 supervisor For each section of each course, the departments supply Estimated enrollment Requested meeting time Special requirements (e.g., A/V equipment)
© J. Christopher Beck Develop an Objective Some obvious components One class at a time in a given room, for a given prof, for a given student Usually minimize the number of students who can’t take the courses they want Room should be big enough Special equipment should be present
© J. Christopher Beck Develop an Objective Some non-obvious components Profs want rooms close to their offices Students want consecutive classes to be close together Profs get one day with no classes (Departments want classes in rooms they “own”) (Everyone wants no classes on Friday)
© J. Christopher Beck Develop an Objective How do you balance the components? Is a room within 100 m of a prof’s office worth not being able to accommodate all students? “You can have a Friday afternoon class with A/V equipment or a Friday morning class without.”
© J. Christopher Beck Berkeley Guidelines Standard “calendar” 9-hour day, starting at 8 AM 9 1-hour blocks overlap with hour blocks “Prime time” blocks One dept can only request 60% of its classes during prime time
© J. Christopher Beck Berkeley Solution Large IP 0.5M variables, 30K constraints Very high penalty for not scheduling a class at all Other objective components: distance, over-utilized facilities, empty seats Solved heuristically See Alg , p 222 You should understand Alg 9.6.1
© J. Christopher Beck Reservation Systems Hotel rooms, car rentals, airline tickets (and classroom scheduling) You want to have the use of a resource for a given period of time With slack: p j < d j – r j Without slack p j = d j – r j May not be able to schedule all requests
© J. Christopher Beck Objectives Maximize $$ Maximize resource usage Minimize number of rejected requests Minimize $$ of rejected requests
© J. Christopher Beck Objectives
© J. Christopher Beck Reservations without Slack n activities, m resources All activities and resources are independent p j = d j – r j Activities have weight w j or w ij May have resource subsets You don’t want to rent any car, you want to rent an SUV Some substitutability of resources Weight is often equivalent to profit
© J. Christopher Beck Weights Can Get Complicated (Ex ) Car rental agency with 4 car types Customer j wants either a subcompact or midsize Customer k wants a subcompact but there are none left w ij = (q j – c i ) * p j q j is the price charged per day to customer j c i is the cost (to the rental agency) per day of a car in class i Yield management
© J. Christopher Beck IP Formulation H slots x ij : binary variable that is 1 if activity j is assigned to resource i J t : set of activities that need a resource in slot t
© J. Christopher Beck IP Formulation maximize Every activity is assigned to at most one resource Does not represented resource subsets! Each resource has only one activity per time slot
© J. Christopher Beck IP Formulation General problem is hard Special cases are easy All activities have duration of 1 – independent problem for each time slot See p. 209 All weights are 1, all resources in a single set, durations are arbitrary Maximize the number of scheduled activities
© J. Christopher Beck Alg Order activities in ascending order of release date Let J be the set of already scheduled activities Step 1: J = {}, j = 1
© J. Christopher Beck Alg Step 2: If a resource is available at r j, assign it to activity j, add activity j to J, and goto 4. Step 3: Let j* in J with max. completion time. If C j > C j*, then don’t schedule j. Else replace j* with j in J Step 4: If j = n, STOP. Else j = j +1 and goto Step 2.
© J. Christopher Beck Exercise 9.1: 3 resources, 0 slack activities rjrj djdj Use Alg to find max # activities Find schedule that maximizes sum of durations of activities scheduled What is the minimum number of resources needed to do all activities?