The document discusses automated university timetabling, which involves scheduling teachers, classes, timeslots, and rooms while satisfying various constraints. It covers key concepts like hard and soft constraints, and feasible timetables. Common techniques for timetabling include constructive heuristics to first find a feasible solution, then using local search methods like neighborhood search for optimization. The complexity of evaluating constraints can range from linear to quadratic time depending on the approach.
2. Summary
Outline
• Introduction
• Problem Formulation
• State of the Art
• Architecture
• Timetabling Algorithm
Automated University Timetabling Alexandre Pinto 2
3. Introduction - What is Timetabling?
Scheduling of:
• a set of teachers
• a set of classes
Placing them in:
• a timeslot from a set of timeslots
• a room from a set of rooms
Subject to:
• Unary/Binary constraints
• Capacity constraints
• Event spread constraints
• Agent constraints
Automated University Timetabling Alexandre Pinto 3
4. Introduction - What is Timetabling?
Scheduling of:
• a set of teachers
• a set of classes
Placing them in:
• a timeslot from a set of timeslots
• a room from a set of rooms
Subject to:
• Unary/Binary constraints
• Capacity constraints
• Event spread constraints
• Agent constraints
Automated University Timetabling Alexandre Pinto 3
5. Introduction - What is Timetabling?
Scheduling of:
• a set of teachers
• a set of classes
Placing them in:
• a timeslot from a set of timeslots
• a room from a set of rooms
Subject to:
• Unary/Binary constraints
• Capacity constraints
• Event spread constraints
• Agent constraints
Automated University Timetabling Alexandre Pinto 3
6. Introduction - An example
08:00 - 09:00
09:00 - 10:00
10:00 - 11:00
11:00 - 12:00
12:00 - 13:00
13:00 - 14:00
14:00 - 15:00
15:00 - 16:00
16:00 - 17:00
17:00 - 18:00
18:00 - 19:00
19:00 - 20:00
Monday Tuesday Wednesday Thursday Friday
u
u
u
u
COMP (PL3)
P. Correia G.4.3
u
u
u
u
COMP (T1)
C. Fonseca B1
u
u
u
u
COMP (TP1)
L. Macedo B2
u
u
u
u
C.G (T1)
J. Henriques B1
u
u
u
u
C.G (TP1)
J. Henriques B1
u
u
u
u
C.G (PL4)
J. Arrais G.4.3
u
u
u
u
I.S (T1)
P. Cunha Anf. A
u
u
u
u
I.S (TP1)
P. Cunha C.5.2
u
u
u
u
A.P.L. (PL1)
L. Paquete E.4.5
u
u
u
u
A.P.L. (T1)
L. Paquete B1
u
u
u
u
I.A.I. (T1)
F. Machado Anf. A
u
u
u
u
I.A.I. (TP1)
F. Machado BAnf. A
u
u
u
u
I.A.I. (PL1)
F. Machado E.4.5
Figure: An example timetable
Automated University Timetabling Alexandre Pinto 4
7. Problem Formulation - Fundamental Concepts
Concepts:
• Class - A class is an event that gathers a set of students
having the same subject at the same time.
• Event - An event is the basic unit to be scheduled.
Automated University Timetabling Alexandre Pinto 5
8. Problem Formulation - Fundamental Concepts
Concepts:
• Class - A class is an event that gathers a set of students
having the same subject at the same time.
• Event - An event is the basic unit to be scheduled.
Automated University Timetabling Alexandre Pinto 5
9. Problem Formulation - Fundamental Concepts
Concepts:
• Hard Constraint - A rule that must be respected.
• Soft Constraint - A rule that should be respected as much as
possible.
• Feasible Timetable - A timetable is considered feasible when
all events are scheduled and no hard constraint is violated.
Automated University Timetabling Alexandre Pinto 6
10. Problem Formulation - Fundamental Concepts
Concepts:
• Hard Constraint - A rule that must be respected.
• Soft Constraint - A rule that should be respected as much as
possible.
• Feasible Timetable - A timetable is considered feasible when
all events are scheduled and no hard constraint is violated.
Automated University Timetabling Alexandre Pinto 6
11. Problem Formulation - Fundamental Concepts
Concepts:
• Hard Constraint - A rule that must be respected.
• Soft Constraint - A rule that should be respected as much as
possible.
• Feasible Timetable - A timetable is considered feasible when
all events are scheduled and no hard constraint is violated.
Automated University Timetabling Alexandre Pinto 6
12. Problem Formulation - Fundamental Concepts
Three main categories:
Figure: The University Curricular Structure in Portugal
Automated University Timetabling Alexandre Pinto 7
13. Problem Formulation - Fundamental Concepts
Figure: University Curricular Structure
Class-teacher problem!
Automated University Timetabling Alexandre Pinto 8
14. State of the Art - Scientific View
Figure: Techniques Applied to the University Timetabling Problem
Automated University Timetabling Alexandre Pinto 9
15. State of the Art - Scientific View
One-Stage Optimization
Algorithms
Figure: One stage algorithms
Automated University Timetabling Alexandre Pinto 10
16. State of the Art - Scientific View
Two-Stage Optimization
Algorithms
Figure: Two stage algorithms
Automated University Timetabling Alexandre Pinto 11
17. State of the Art - Technological View
XXXXXXXXXXXFeature
System
Leeds Purdue Bullet THOR
Distributed
Timetabling
On-line
Timetabling Diamant
Timetabling
Engine
Persistent Database
User Interface
Solver
Interactive Changes
Input Validation
Flexibility in Preferences
Distinction of Roles
Table: Summary of the features of commercial/non-commercial solutions
Automated University Timetabling Alexandre Pinto 12
18. Architecture - Evaluation Function
One of the main operations of the timetabling algorithms is to
check constraint violations.
There are two ways of analyzing violations:
• Check entire solution - The solution is analyzed considering all
of the events, i.e, the entire solution.
• Check only the differences - Applicable to the computation of
the difference between an old solution and a new one.
Automated University Timetabling Alexandre Pinto 13
19. Architecture - Evaluation Function
One of the main operations of the timetabling algorithms is to
check constraint violations.
There are two ways of analyzing violations:
• Check entire solution - The solution is analyzed considering all
of the events, i.e, the entire solution.
• Check only the differences - Applicable to the computation of
the difference between an old solution and a new one.
Automated University Timetabling Alexandre Pinto 13
20. Architecture - Evaluation Function
One of the main operations of the timetabling algorithms is to
check constraint violations.
There are two ways of analyzing violations:
• Check entire solution - The solution is analyzed considering all
of the events, i.e, the entire solution.
• Check only the differences - Applicable to the computation of
the difference between an old solution and a new one.
Automated University Timetabling Alexandre Pinto 13
21. Architecture - Evaluation Function
f (s) =
SC
i=1
wi (s) · Ci (s)
Figure: s - A solution in the search space
Ci - Number of times that the constraint is violated
wi - Weight of the constraint
SC - Number of soft constraints
The objective of the search algorithm will be to find a solution s
that minimizes the value of f (s).
Automated University Timetabling Alexandre Pinto 14
23. Architecture - Complexity Analysis
Constraint - Order of typologies
must/should be respected
Worst-Case Analysis
Entire Solution Incremental Approach
O(P · E) O(E)
Table: P - Number of teachers, E -
Number of events
2 5 /
3 7 11 10 /
1 4 /
6 9 8 /
2 5 1 /
1
2
3
4
5
Figure: Current order of teacher
events
Automated University Timetabling Alexandre Pinto 16
24. Architecture - Complexity Analysis
Constraint - All distances
between events must be
respected
Worst-Case Analysis
Entire Solution Incremental Approach
O(E2) O(E)
Table: E - Number of events
Events
Events
2
2
5
5
4
4
3
3
0 1 2 3 4 5 6 7 8 9
0
1
2
3
4
5
6
7
8
9
Figure: Distance matrix
Automated University Timetabling Alexandre Pinto 17
25. Architecture - Complexity Analysis
Constraint - Events in the last
slot of the day should be avoided
Worst-Case Analysis
Entire Solution Incremental Approach
O(D · PC) O(E)
Table: D - Number of days, PC -
Number of curricular plans, E -
Number of events
Figure: Generic structure to keep
track of events
Automated University Timetabling Alexandre Pinto 18
26. Timetabling algorithm - A possibility
First phase - Feasibility achieved
through a constructive heuristic
Questions to be solved:
• How to choose the next
event?
• How to choose the time slot
and the room?
• How to deal with unassigned
events with no feasible
place?
Rooms
Timeslots
0 0 0 0
1 1 1 1
2 2 2
3 3 3 3
4 4 4
5 5 5 5
6 6 6 6
7 7 7
8 8 8
9 9 9 10 10 10 10
11 11 11
12 12 12 12
13 13 13
14 14 14 14
0 1 2 3 4 5 6 7 8 9 10 11 12 13
0
1
2
3
4
5
6
7
8
9
Figure: Initial Feasible Solution
Automated University Timetabling Alexandre Pinto 19
27. Timetabling algorithm - A possibility
First phase - Feasibility achieved
through a constructive heuristic
Questions to be solved:
• How to choose the next
event?
• How to choose the time slot
and the room?
• How to deal with unassigned
events with no feasible
place?
Rooms
Timeslots
0 0 0 0
1 1 1 1
2 2 2
3 3 3 3
4 4 4
5 5 5 5
6 6 6 6
7 7 7
8 8 8
9 9 9 10 10 10 10
11 11 11
12 12 12 12
13 13 13
14 14 14 14
0 1 2 3 4 5 6 7 8 9 10 11 12 13
0
1
2
3
4
5
6
7
8
9
Figure: Initial Feasible Solution
Automated University Timetabling Alexandre Pinto 19
28. Timetabling algorithm - A possibility
Second phase - Optimization
using a search mechanism
Questions to be solved:
• How to perform a local
search in each solution?
• How to perturb the
solutions?
• How to define the
acceptance criterion?
Figure: Neighborhood search
Automated University Timetabling Alexandre Pinto 20
29. Timetabling algorithm - A possibility
Second phase - Optimization
using a search mechanism
Questions to be solved:
• How to perform a local
search in each solution?
• How to perturb the
solutions?
• How to define the
acceptance criterion?
Figure: Neighborhood search
Automated University Timetabling Alexandre Pinto 20