Approximate Solution to an Exam Timetabling Problem
description
Transcript of Approximate Solution to an Exam Timetabling Problem
![Page 1: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/1.jpg)
1
Approximate Solution to an Exam Timetabling Problem
Approximate Solution to an Exam Timetabling Problem
Adam White
Dept of Computing Science
University of Alberta
Adam White
Dept of Computing Science
University of Alberta
![Page 2: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/2.jpg)
2
Combining Constraint Programming and Simulated Annealing on University ExamTimetableing
Tuan-Anh Duong and Kim-Hoa Lam
International Conference for frenchspeaking and vietnemesse computer scientisits - 2004
Combining Constraint Programming and Simulated Annealing on University ExamTimetableing
Tuan-Anh Duong and Kim-Hoa Lam
International Conference for frenchspeaking and vietnemesse computer scientisits - 2004
![Page 3: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/3.jpg)
3
OutlineOutline
Introduction Problem Motivation Related Work
Two Phase Algorithm Constraint Programming Simulated Annealing
Results Contribution Future Work
Introduction Problem Motivation Related Work
Two Phase Algorithm Constraint Programming Simulated Annealing
Results Contribution Future Work
![Page 4: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/4.jpg)
4
ProblemProblem
Shedule a number of exams in a given set of time slots Students are divided into subgroups
Hard Constraints No student has 2 exams at one time
No more than 2 exams in one room
Worst possible solution But still acceptable
Shedule a number of exams in a given set of time slots Students are divided into subgroups
Hard Constraints No student has 2 exams at one time
No more than 2 exams in one room
Worst possible solution But still acceptable
![Page 5: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/5.jpg)
5
Problem…Problem…
Soft Constraints Student’s exams spread Student subgroups have exams in near rooms Some exams start after & end before regular Room utilization is maximized Some exams should be in special rooms
Improve the quality of the solution
Soft Constraints Student’s exams spread Student subgroups have exams in near rooms Some exams start after & end before regular Room utilization is maximized Some exams should be in special rooms
Improve the quality of the solution
![Page 6: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/6.jpg)
6
MotivationMotivation
Exam scheduling is NP-Complete Have a variety of courses and fields Problem solved:
Chi Minh City University of Technology(China) 100,000 students 320 exams 2.5 week period
More close to home University of Alberta
> 35,000 students > 90 buildings Number of exams???
Exam scheduling is NP-Complete Have a variety of courses and fields Problem solved:
Chi Minh City University of Technology(China) 100,000 students 320 exams 2.5 week period
More close to home University of Alberta
> 35,000 students > 90 buildings Number of exams???
![Page 7: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/7.jpg)
7
Solution MethodsSolution Methods
Constraint programming Constraint Logic programming - CHIP Constraint Logic programming - ECLiPSe Local repair - Constraint Satisfaction Problem
Tabu Search 2 lists - 1 normal, 1 for most moved exams Single list, exams stay in for random time
Genetic Algorithms Automated timetabling
Constraint programming Constraint Logic programming - CHIP Constraint Logic programming - ECLiPSe Local repair - Constraint Satisfaction Problem
Tabu Search 2 lists - 1 normal, 1 for most moved exams Single list, exams stay in for random time
Genetic Algorithms Automated timetabling
![Page 8: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/8.jpg)
8
ApproachApproach
Two Phase algorithm Solve hard constraints using Constraint Programming(CP) Satisfy as much as possible soft constraints using
Simulated Annealing(SA) Optimization problem
Solution from CP is used as an initial solution for SA algorithm In practice…very important
Solved - assigning sessions to exams Not Solved - assigning student groups to exams
Two Phase algorithm Solve hard constraints using Constraint Programming(CP) Satisfy as much as possible soft constraints using
Simulated Annealing(SA) Optimization problem
Solution from CP is used as an initial solution for SA algorithm In practice…very important
Solved - assigning sessions to exams Not Solved - assigning student groups to exams
![Page 9: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/9.jpg)
9
Phase I: Constraint ProgrammingPhase I: Constraint Programming
Backtracking with forward checking(BTFC) Consistency technique & chronological backtracking
Consistency: Arch-consistency Pairs of yet initialized variables & instantiated
vairables Value assigned to current variable
Q: Any variable in domain of future variable conflicts? A: remove from domain
Backtracking with forward checking(BTFC) Consistency technique & chronological backtracking
Consistency: Arch-consistency Pairs of yet initialized variables & instantiated
vairables Value assigned to current variable
Q: Any variable in domain of future variable conflicts? A: remove from domain
![Page 10: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/10.jpg)
10
CP…CP…
Chronological: Variable ordering heuristic or Value ordering heuristic
Value order: selection of next variable Dynamic variable ordering Select smallest number of values in current domain
Variable ordering: order of exams scheduled Priorety scores for exams Order based on remaining domain size(# students)
Chronological: Variable ordering heuristic or Value ordering heuristic
Value order: selection of next variable Dynamic variable ordering Select smallest number of values in current domain
Variable ordering: order of exams scheduled Priorety scores for exams Order based on remaining domain size(# students)
![Page 11: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/11.jpg)
11
Simulated AnnealingSimulated Annealing
Analogy: metal cools and freezes into a minimum energy crystalline structure search for a minimum in a system
Analogy: metal cools and freezes into a minimum energy crystalline structure search for a minimum in a system
![Page 12: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/12.jpg)
12
Phase II: SAPhase II: SAs0, t0 > 0, loop until
loop until
select s in N(s0) ramdomly
= cost(s) - cost(s0)
if < 0 then s0 = selse
x = rand(0,1)
if x < e(- /t) then s0 = send if
until count = maxt = (t)
until stop criteria
s0, t0 > 0, loop until
loop until
select s in N(s0) ramdomly
= cost(s) - cost(s0)
if < 0 then s0 = selse
x = rand(0,1)
if x < e(- /t) then s0 = send if
until count = maxt = (t)
until stop criteria
![Page 13: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/13.jpg)
13
SA …SA …
s0 - initial solution t0 - initial temperature - temperature reduction function N(s) - neighborhood of s cost(s) - cost of a solution
What we are minimizing…related to soft constraints
N, cost and Problem specific
s0 - initial solution t0 - initial temperature - temperature reduction function N(s) - neighborhood of s cost(s) - cost of a solution
What we are minimizing…related to soft constraints
N, cost and Problem specific
![Page 14: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/14.jpg)
14
NeighborhoodNeighborhood
Variant of Kempe Chains Exam i allocated to session t and t’ and t’ != t G - set of exams allocated to t G’ - set of exams allocated to t’
Find unique minimum pair of G’s FG & F’ G’ s.t. I F & (G\F)F & (G’\F’) F Are conflict free
The timetable where we can find F and F’ s.t. Reallocate all exams in F’ to session t Reallocate all exams in F to session t’ Is a neighbor of current solution
Variant of Kempe Chains Exam i allocated to session t and t’ and t’ != t G - set of exams allocated to t G’ - set of exams allocated to t’
Find unique minimum pair of G’s FG & F’ G’ s.t. I F & (G\F)F & (G’\F’) F Are conflict free
The timetable where we can find F and F’ s.t. Reallocate all exams in F’ to session t Reallocate all exams in F to session t’ Is a neighbor of current solution
![Page 15: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/15.jpg)
15
Cost FunctionCost Function
Time distance (Fc) ti, tj sessions for exami and examj
Summed distance between each pair of exams Distance significant iff 1|ti-tj| 5
Then penalty = 26 - |ti-tj| - shorter distance higher penalty
Same day (Fl) Summed sessions that are adjacent and on same day If |ti-tj| = 1 then pen = 1
Both cases penalty = 0 otherwise Minimize Fc + Fl
Time distance (Fc) ti, tj sessions for exami and examj
Summed distance between each pair of exams Distance significant iff 1|ti-tj| 5
Then penalty = 26 - |ti-tj| - shorter distance higher penalty
Same day (Fl) Summed sessions that are adjacent and on same day If |ti-tj| = 1 then pen = 1
Both cases penalty = 0 otherwise Minimize Fc + Fl
![Page 16: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/16.jpg)
16
Cooling SchemeCooling Scheme
Lowering T Size of T determines if higher cost neighbor
solution is accepted x < e(- /t) Climb out of local minima
Geometric cooling Every nrep steps T is multiplyed by set s.t. takes N steps from T0 --> Tf
= 1 - (ln(T0 ) - ln(Tf ))/N Where N is the desired number of SA steps
Lowering T Size of T determines if higher cost neighbor
solution is accepted x < e(- /t) Climb out of local minima
Geometric cooling Every nrep steps T is multiplyed by set s.t. takes N steps from T0 --> Tf
= 1 - (ln(T0 ) - ln(Tf ))/N Where N is the desired number of SA steps
![Page 17: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/17.jpg)
17
Parameter InitializationParameter Initialization
Nrep - steps where T constant Tested 1, 4, 6, 10, 50, 5000
T0 - starting temp Find T0 s.t. starting probability of neighbor solution
acceptance is [70%,80%] Algorithm test all n*(n-1)/2 neighbors - n exams Dynamic - run everytime scheduler is
Tf - final temp Tested 0.5, 0.05, 0.005, 0.0005, 0.00005
Nrep - steps where T constant Tested 1, 4, 6, 10, 50, 5000
T0 - starting temp Find T0 s.t. starting probability of neighbor solution
acceptance is [70%,80%] Algorithm test all n*(n-1)/2 neighbors - n exams Dynamic - run everytime scheduler is
Tf - final temp Tested 0.5, 0.05, 0.005, 0.0005, 0.00005
![Page 18: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/18.jpg)
18
ResultsResults
Microsoft Visual C++ 6.0 PII 450 MHz PC On … HCMC University of Technology
30 exams sessions 324 exams 64,000 students
N - tested from 500 - 70,000 Compared against? NOTHING
Microsoft Visual C++ 6.0 PII 450 MHz PC On … HCMC University of Technology
30 exams sessions 324 exams 64,000 students
N - tested from 500 - 70,000 Compared against? NOTHING
![Page 19: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/19.jpg)
19
Results…Results…COST
6900000
.
.
6200000
6100000
6000000
5900000
SA steps
70000
.
.
30000
20000
10000
0
![Page 20: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/20.jpg)
20
ContributionContribution
Impelemented on a real data set Illustrated the importance of proper
determination of SA parameters Developed methods to select
Timetable cost decreases as N increases Runtime, N = 70,000
SA - 50min CP - 2min Acceptable - run once a term
Impelemented on a real data set Illustrated the importance of proper
determination of SA parameters Developed methods to select
Timetable cost decreases as N increases Runtime, N = 70,000
SA - 50min CP - 2min Acceptable - run once a term
![Page 21: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/21.jpg)
21
Future WorkFuture Work
Implement in smodels Representation?? Approximate soln to soft constraints??
Aquire SA code Empirical results for varying sizes Compare solution methods
Accuracy Speed
If time allows compare with dlv
Implement in smodels Representation?? Approximate soln to soft constraints??
Aquire SA code Empirical results for varying sizes Compare solution methods
Accuracy Speed
If time allows compare with dlv
![Page 22: Approximate Solution to an Exam Timetabling Problem](https://reader031.fdocuments.in/reader031/viewer/2022012914/568151ff550346895dc03e62/html5/thumbnails/22.jpg)
22
QuestionsQuestions