Download presentation
Presentation is loading. Please wait.
Published byDale Doyle Modified over 9 years ago
1
© J. Christopher Beck 20051 Lecture 17: Introduction to Timetabling
2
© J. Christopher Beck 2005 2 Outline Introduction to Timetabling UC Berkeley Classroom Assignment Reservations without Slack Example 9.2.1 IP formulation Algorithm 9.2.2
3
© J. Christopher Beck 2005 3 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)
4
© J. Christopher Beck 2005 4 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
5
© J. Christopher Beck 2005 5 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)
6
© J. Christopher Beck 2005 6 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.”
7
© J. Christopher Beck 2005 7 Berkeley Guidelines Standard “calendar” 9-hour day, starting at 8 AM 9 1-hour blocks overlap with 6 1.5-hour blocks “Prime time” blocks One dept can only request 60% of its classes during prime time
8
© J. Christopher Beck 2005 8 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. 9.6.1, p 222 You should understand Alg 9.6.1
9
© J. Christopher Beck 2005 9 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
10
© J. Christopher Beck 2005 10 Objectives Maximize $$ Maximize resource usage Minimize number of rejected requests Minimize $$ of rejected requests
11
© J. Christopher Beck 2005 11 Objectives
12
© J. Christopher Beck 2005 12 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
13
© J. Christopher Beck 2005 13 Weights Can Get Complicated (Ex. 9.2.1) 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
14
© J. Christopher Beck 2005 14 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
15
© J. Christopher Beck 2005 15 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
16
© J. Christopher Beck 2005 16 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
17
© J. Christopher Beck 2005 17 Alg 9.2.2 Order activities in ascending order of release date Let J be the set of already scheduled activities Step 1: J = {}, j = 1
18
© J. Christopher Beck 2005 18 Alg 9.2.2 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.
19
© J. Christopher Beck 2005 19 Exercise 9.1: 3 resources, 0 slack activities12345678910 rjrj 2752104800 djdj 889443 13 Use Alg 9.2.2 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?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.