optimized classroom scheduling at lagrange college

34
Optimized Classroom Scheduling at LaGrange College Jon M. Ernstberger 21 March 2016

Upload: jon-ernstberger

Post on 15-Apr-2017

171 views

Category:

Science


2 download

TRANSCRIPT

Page 1: Optimized Classroom Scheduling at LaGrange College

Optimized Classroom Scheduling at LaGrangeCollege

Jon M. Ernstberger

21 March 2016

Page 2: Optimized Classroom Scheduling at LaGrange College

About LaGrange College

Page 3: Optimized Classroom Scheduling at LaGrange College

About LaGrange College

Page 4: Optimized Classroom Scheduling at LaGrange College

About LaGrange College

Page 5: Optimized Classroom Scheduling at LaGrange College

We are growing.

Page 6: Optimized Classroom Scheduling at LaGrange College

Classroom Assignment

Heres how this process currently works:

I Departments know which courses must run in a given term.

I Knowing familial responsibilities, chairs make teachingschedules.

I Everyone tries to schedule in their own building.

I Priority is given to largest classes.

Page 7: Optimized Classroom Scheduling at LaGrange College

Simple Case

A builidng with two rooms and only three MWF scheduling periods.

Period No. Room 1 Room 2

One

Two

Three

I You have six scheduling opportunities.

Page 8: Optimized Classroom Scheduling at LaGrange College

Simple Case

Call each of those spaces a “bin”.

Period No. Room 1 Room 2

One 1 2

Two 3 4

Three 5 6

I What if you only have four classes and two professors?

Page 9: Optimized Classroom Scheduling at LaGrange College

Metaheuristic Approach - Inspired by Genetic Algorithm

Holland[1] defines this concept of a genetic algorithm.

I A population P of trial solutions is randomly created, typicallyin Rm×n – m “solutions” for a problem whose domain is inRn(a, b).

I A fitness function is defined so that the goodness-of-fit ofeach member (possible solution) is measured.

I Those solutions deemed most fit remain until a new“generation”. This process is known as elitism.

I Offspring are created via the two processes mutation andcrossover.

I Mutation is the result of random noise being added to apopulation (or individual attributes, the genes).

I Crossover occurs with a probability p and is a direct swapbetween genes.

Page 10: Optimized Classroom Scheduling at LaGrange College

GA Intuition

Page 11: Optimized Classroom Scheduling at LaGrange College

GA Inutition, cont.

Page 12: Optimized Classroom Scheduling at LaGrange College

GA Inutition, cont.

fast sickly good stripe pattern smart

too bold heart problem keen smell unintelligent

premature deaf good hearing disease resistant

Page 13: Optimized Classroom Scheduling at LaGrange College

GA Inutition, Elitism

fast good stripe pattern smart

keen smell

good hearing disease resistant

Page 14: Optimized Classroom Scheduling at LaGrange College

GA Inutition, Crossover

fast f,gs good stripe pattern smart

f,s gs,ks keen smell s,dr

s,gs ks,gh good hearing disease resistant

Page 15: Optimized Classroom Scheduling at LaGrange College

GA Inutition, Crossover and Mutation

fast f+,gs good stripe pattern smart

f,s− gs−,ks− keen smell s−,dr+

s+,gs+ ks+,gh− good hearing disease resistant

Page 16: Optimized Classroom Scheduling at LaGrange College

#GAProbz

I There is no formal theory for the convergence (or lackthereof) of the genetic algorithm.

I The algorithm cannot state definitively that there is nooptimized classroom schedule.

I It could be fast or it could be slow.

I Computationally intense.

Page 17: Optimized Classroom Scheduling at LaGrange College

Stochastic Integer Search

We use a custom, integer-based genetic algorithm-esque searchthat does the following:

I We use random permutations of the integers in the set{1, . . . , q} (q is the number of scheduling opportunities) tocreate each member of the population. The populationP ∈ Zm×n[1, q] where n ≤ q.

I In our formulation, mutation over the integers and crossoverwere equivalent–a swap.

Page 18: Optimized Classroom Scheduling at LaGrange College

Fitness Functional

How do I determine a good solution may be?

Criteria:

1. Make sure I get a “solution” where the class fits in the space.

2. Can’t double-book a professor.

How do we do that?

Page 19: Optimized Classroom Scheduling at LaGrange College

Fitness Functional, Class Fits the Room

I Randomly generate the population P and select the ithmember.

I Corresponding to the population member, Pi we assign

R(Pi ) := C

where C is the list of the enrollment caps of our offeredcourses (of length q) and R is the list of our “bins”.

Page 20: Optimized Classroom Scheduling at LaGrange College

Class Fits the Room, cont.

Define

I S is the number of seats for classrooms at the designatedtimes.

I The Heaviside function as

H(x) =

{1 x > 0

0 x ≤ 0

Then, create a function

J1(Pi ) =

q∑j=1

H (Rj(Pi )− Sj) .

Page 21: Optimized Classroom Scheduling at LaGrange College

Fitness Functional, Don’t Overbook the Professor

I Corresponding to the population member, Pi we assign

A(Pi ) := T

where T is the list of the instructors of our offered courses(of length q) and A is the list of our instructor “bins”.

I Reshape the list A to look like a grid of rooms by time.

Aq×1 7→ A(r×t)

where r is the number of rooms we can use and t is thenumber of time slots.

Page 22: Optimized Classroom Scheduling at LaGrange College

Don’t Overbook the Professor, cont.

I Now, I do a columnwise sort on A.

As = sort(A).

I To determine the number of overbookings, I do some Booleanlogic.

J2(Pi ) =∑(

As 6≡ 0)−∑(

unique(As

)6≡ 0)

Page 23: Optimized Classroom Scheduling at LaGrange College

Optimization Problem

The optimization problem then becomes

minPi∈Z1×q

J(Pi ) = minPi∈Z1×q

(J1(Pi ) + J2(Pi ))

= minPi∈Z1×q

q∑j=1

H (Rj(Pi )− Sj)

+(∑(

As 6≡ 0)−∑(

unique(As

)6≡ 0))]

Page 24: Optimized Classroom Scheduling at LaGrange College

Class Schedules

MWF TTh

8:30a-9:30a 8:00a-9:30a9:40a-10:40a 9:40a-11:15a

10:50a-11:50a 1:00p-2:30p12:30p-1:30p 2:40p-4:10p1:40p-2:40p2:50p-3:50p

Page 25: Optimized Classroom Scheduling at LaGrange College

Science Building

I Removed all labs and spaces that require specialty scheduling.

I Nine classrooms.

I 38 classes.

I 17 professors.

Results follow.

Page 26: Optimized Classroom Scheduling at LaGrange College

Size of the Scheduling Problem

I 383 individual courses (labs, recitals, etc.)

I Covers hundreds of spaces on campus.

I Of the spaces, many have specialty equipment and are not forgeneral use.

I Some are computer labs.

Page 27: Optimized Classroom Scheduling at LaGrange College

Lesson One

If you cannot solve a problem, make it easier.

Page 28: Optimized Classroom Scheduling at LaGrange College

Reduced Problem

If we reduce our problem in this way, here’s what we do:

I Remove all science and computer labs.

I Remove any recital or performance spaces.

I Remove any spaces with healthcare technology (nursing).

I Remove any spaces with exercise/strength/conditioningequipment.

Building Name Number of Classrooms

Callaway Academic 6 (14,16,30,30,30,40)Smith Hall 7 (14,20,21,22,23,25,48)Hawkes Hall 2 (24,24)Manget 9 (12,12,12,14,14,20,24,24,24)Callaway Science 9 (18,18,24,24,24,34,40,48,64)

Total 33

Page 29: Optimized Classroom Scheduling at LaGrange College

Lesson Two

Money solves lots of problems.

Page 30: Optimized Classroom Scheduling at LaGrange College

Campus Problem

I 180 courses

I 67 different professors

I 33 rooms

I 330 scheduling opportunities.

Page 31: Optimized Classroom Scheduling at LaGrange College

Campus Problem, Results

I There are only flawed results.

I So far, the best results I’ve found still have 9 scheduling errors.

I Runtime is about 31 minutes.

Page 32: Optimized Classroom Scheduling at LaGrange College

Future Work

I Prioritize classes to be in the same building as that of theoffice of the professor.

I Build in early morning and late afternoon bounds.

I Experiment with Longer calendars.

I Implement inter-departmental demands.

Page 33: Optimized Classroom Scheduling at LaGrange College

Some Additional Lessons

I Mathematicians are problem solvers.

I There is always low-hanging fruit to be plucked.

I Failure is okay.

I We just report the news; we don’t make it.

Page 34: Optimized Classroom Scheduling at LaGrange College

References I

J.H. Holland.Genetic algorithms and the optimal allocation of trials.SIAM Journal of Computing, 2(2), 1973.