High School Time Table Problem Solving and Comparison With Automatic Optimized Timetable
High School Time Table Problem Solving and Comparison With Automatic Optimized Timetable
1 Introduction
A timetable specifies which people meet at which location and at what time. The timing of events must
be such that nobody has more than one event at the same time. School timetabling as a term refers to the
construction of weekly timetables for schools of secondary education [14]. Specific feature of school timetabling
field is a great number of research papers and widely used commercial software. Therefore a discussion of new
results will be.
The events are lessons in a subject, taught by a teacher to a group of pupils in a single room. The
timetable assigns a teacher, a pupils group, a room, and a time slot to each lesson. The pupil groups are specific
to the subject, we call them subject-groups. A high school is referred here as the last grades of a high school or
gymnasium where the pupils can mostly choose their preferred learning profile subjects. Therefore, this task is
more complex in comparison with a secondary school scheduling without high school classes.
Some combinations of assignments lead to acceptable timetables, constraints follow from conditions
imposed by rooms, pupils or teachers. We distinguish two types of constraints: conditions that must be met
(“hard” constraints) and desires that should be fulfilled as well as possible (“soft” constraints). An important set
of soft constraints is defined by didactic reasons. For example, by placing “hard” subjects, such as mathematics
or physics, into morning hours. The maximal number of daily hours Tmax is obviously a hard constraint.
Timetabling can be generally defined as the activity of assigning, subject to constraints, a number of events to a
limited number of time periods and locations such, that desirable objectives are satisfied as nearly as possible
[26]. Educational timetabling can be divided into three main classes: school timetabling, course timetabling and
exam timetabling [15]. The goal is to find a timetable that satisfies all the hard constraints and minimizes the
violation of soft constraints.
2 Overview of publications
A survey on educational timetabling problems [23] gives an overview of the literature. Overviews on
examination timetabling and university course timetabling are in [4, 12, 13]. A comprehensive overview of
formulations and of state-of-the-art approaches is in the surveys [4, 7, 8, 13, 15], in the proceedings of the
PATAT conferences [5 – 7, 9, 10] and in the Lecture Notes in Computer Science series [9 – 11]. The European
working group on automated timetabling (EURO-WATT) maintains a website with information on timetabling
problems [25].
3 New Elements
The first new element of this work is the application and systematic investigation of the Bayesian
Heuristic Approach [20] for optimization of heuristic parameters. These include the initial temperature and the
cooling rate of Simulating Annealing (SA) algorithm and the randomization parameter of the local search
algorithm. The formulation of the objective function in terms of Pareto optimality seems to be new in the field of
school scheduling. The paper describes apparently the first web-based platform-independent implementation of
- 165 -
the software. Java servlet provides conditions for application at any school with internet connection. Any web
browser works, no additional software is needed. Note that efficiency of recent versions of Java is close to that of
the most efficient programming languages [9].
here cr – penalty for required restriction r; Nr – number of required restriction. In this case r = 1, .., 9.
Some of required restrictions cr can be evaluated by the individual rules of each school. Such
requirements are called needful, or “soft” constrains. They are valued differently in each school.
The main needful restrictions of the schedule include:
• Elimination of “windows” in teacher’s schedule.
• Elimination of “windows” in pupil’s schedule.
• Unacceptable working hours.
• Unacceptable workdays.
• Unacceptable order of subjects.
• Changing of pupils in the formed subject-group.
Usually penalty points for these restrictions are as follows:
cm – penalty for the “window” on teacher’s m schedule.
cs – penalty for the “window” on pupils s schedule.
cmv – penalty for “bad” hour v of teacher m.
cmd – penalty for “bad” day d of teacher m.
csv – penalty for “bad” hour v of pupil s.
cpd – penalty for violation of pedagogical didactic pd.
cmg – penalty of the list change of subject-group g taught by teacher m.
“Bad” hour/day is the hour/day, when teacher/pupil already has a work hour. Pedagogical didactic
evaluates the difficulty of subjects. Most difficult subjects must be in the 1-4 lessons during the day. Less
important subjects – in the end of the day. The importance of every subject is written in initial data file.
The sum function of the needed restrictions penalty points is as follows:
- 166 -
Fn = ∑ c m Lm + ∑ c s Ls + ∑ ∑ c mv Lvm +
m s m v (2)
+ ∑ ∑ c md Ldm + ∑ ∑ c sv Lvs + ∑ c pd L pd + ∑ c mg Ln ,
m d s v pd n
where, F(τ) is the total penalty of some schedule τ; A is the set of schedules satisfying the physical constraints.
The penalties F(τ) depend on expert evaluations, therefore we regard them as heuristics.
Figure 2. Forming subject-groups to teachers Figure 3. Time table for teachers creation
Figure 2 illustrates how subject-groups are assigned to teachers. Here pupils sij from groups Gi are
grouped to the groups with identical subject Dt. Identical subject has same name and same hours per week. These
groups are called subject-groups (with x pupils in the group) and assigned to the teacher Ml. Figure 3 shows how
teacher’s timetables are created. The subject-groups DtMl[Sx], with teacher Ml, subject Dt and pupils of this
subject-group Sx, are putted to the free class-room and to school timetable. When process is finalized, the
optimization process is ready to start.
- 167 -
After optimizing, we can see such results of this program:
• school schedule;
• individual pupils schedules;
• individual teachers schedules;
• individual room schedules;
• subject-group schedules;
All results user can see in the program (on working time), or download them as archive personal
computer. The program does not require much effort to the user, the payment to work with a computer, or a lot
of time to understand how system works.
6 Optimization Methods
- 168 -
Analyzing Figure 4, we see different results using different initial parameters. Here difference of
penalty points (between initial and optimal schedules) is calculated. Every column is received after 100
experiments with fixed initial parameters (Iterations, x1 and x2). In the left side of Figure 2 the results are
grouped by x2 when x1 was between 100 and 1000. In the right side, the results are grouped by x1 when x2 was
between 1 and 10. There are showed only best results after.
Figure 5. Average of 100 experiments results using BHA Figure 6. The best results of BHA after 100 experiments
with each different SA iteration
However, the results can be used in similar schools as an approximation.
7 Comparison of results
Here are compared such results: real schedule created in a Lithuanian high school and, from pupils and
teachers wishes, created and optimized schedule. Schedule was automatically optimized with Bayes method the
results we can see in Figure 7. Both, schedule and data are from the same school and same classes.
Evaluating both types of schedules, penalty points were calculating for:
• pupil window – 5;
• teacher window – 300;
• teachers wished free time – 10;
• exceeding maximum hour limit – 2000;
• pedagogical didactic – 5.
Sum of seted penalty points for the real schedule was 380 020. It is always same, because after finishing
the creation process it can’t be changed. Sum of penalty points after optimization process (was seted same
penalty points) are showed in the Figure 5. There are few results after optimization with different initial
parameters of optimisation method Bayes. The results are different while every time schedule is created from the
new point.
- 169 -
Figure 7. Penalty points after creating and optimizing schedule from initial data file
As we can see, the optimization results are much better as real schedule result. It is so, while
optimization program creates and optimizes schedule only for high school classes. However, teacher can work in
basic school to. However, in Lithuanian schools schedule creating starts from high school classes schedule.
“School schedule optimization” program is working same way.
- 170 -
“Rector 2009” [24] is the product of the Russian company “P. Yu. Smykalov”. Figure 9 shows a
fragment of output in the format similar to MS “Excel” forms used in local schools. In the upper side the subject
for the group 12a are showed. Under it – all groups, lessons per week, subjects and teachers are showed. Green
colour means, that no one works at the same time in two places. Reports, if one is trying to insert data to wrong
place, are showed in red colour. Convenient for basic school scheduling. No automatic optimization.
Figure 9. A fragment of “Rector 2009” output Figure 10. A fragment of “aSc TimeTable 2009” output
“aSc TimeTables 2009” [3] is the product of the Slovak company “Applied Software Consultants s.r.o”.
A fragment of resulting timetable for Monday and Tuesday in a compact form for eight pupil subject-groups is in
Figure 10. The results of experimental calculations are in Table 1. They show that the software works well in
basic schools and is not practical in large high schools. Any penalty points are calculated.
Table 1. Testing „aSc TimeTables 2009“
Average
Average
Average
Average
Average
Small
Small
Small
Small
Small
Small
Hard
Hard
Hard
Hard
Hard
Hard
Complexity
Settings of the
program
Strict
Strict
Strict
Strict
Strict
Strict
Strict
Strict
Strict
Soft
Soft
Soft
Soft
Soft
Soft
Soft
Soft
Soft
Restrictions
70054852
33245895
1652362
1375124
5026351
4523625
142800
183265
975236
---
---
---
---
---
---
---
---
---
Viewed options
---
---
---
---
---
---
---
---
---
31
25
29
32
27
33
52
45
52
Time
A timetable that satisfies all necessary conditions is regarded as feasible. A feasible timetable is optimal
if it minimizes all undesirable factors. To compare the quality of different feasible timetables we must evaluate
at least the most important undesirable factors. The difficulty is that desirability is subjective by definition and
depends on the local conditions. This prevents comparison of results obtained by automatic optimization with
decisions made by human operator.
9 Concluding Remarks
• The new element of this work is application and systematic investigation of the Bayesian Heuristic
Approach (BHA) [20] to optimization of heuristic parameters (with penalty points). These include the
initial temperature and the cooling rate of SA algorithm and the randomization parameter of the local
search algorithm.
- 171 -
• BHA is intended for global optimization of functions with noise what is typical in optimization of
heuristic parameters.
• The formulation of the objective function in terms of Pareto optimality seems to be new in the field of
school scheduling.
• Application in some large schools shows some advantages comparing with commercial software. The
web-site: http://soften.ktu.lt/~mockus and accompanying web-sites include corresponding.
References
[1] Aarts, E.H.L.; Van Laarhoven, P.J.M. 1987. Simulated annealing: Theory and applications. D. Reidel,
Dordrecht, The Netherlands.
[2] Abramson, D. 1991. Constructing school timetables using simulated annealing: Sequential and parallel algorithms.
Management Science, 37:98-113.
[3] aSc Timetables. 2009. <http://www.asctimetables.com/>
[4] Bardadym, V. A. 2003. Computer-aided school and university timetabling: The new wave? In Lecture notes in
computer science: Vol. 1153, Practice and Theory of Automated Timetabling, First International Conference,
Selected papers, pages 22-45. Springer.
[5] Burke, E. K.; Trick, M. 2005. Practice and theory of automated timetabling V. Lecture notes in computer science,
Vol. 3616. Springer, Berlin.
[6] Burke, E. K.; Eckersley, A. J.; McCollum, B.; Petrovic, S.; Qu, R. 2004. Analysing similarity in examination
timetabling. In Proceedings of the 5th International Conference on the Practice and Theory of Automated
Timetabling, pages 557-559. Springer.
[7] Burke, E. K.; De Causmaecker, P. 2003. Practice and theory of automated timetabling IV. Lecture notes in
computer science, Vol. 2740. Springer, Berlin.
[8] Burke, E. K.; Petrovic, S. 2002. Recent research directions in automated timetabling. Journal of Operational
Research Society., 140:266-280.
[9] Burke, E. K.; Erben, W. 2001. Practice and theory of automated timetabling III. Lecture notes in computer
science, Vol. 2079. Springer, Berlin.
[10] Burke, E. K.; Carter, M. W. 1998. Practice and theory of automated timetabling II. Lecture notes in computer
science, Vol. 1408. Springer, Berlin.
[11] Burke, E. K.; Ross, P. 1996. Practice and theory of automated timetabling. Lecture notes in computer science,
Vol. 1153. Springer, Berlin.
[12] Carter, M. W.; Laporte, G. 1998. Recent developments in practical course timetabling. In Lecture notes in
computer science: Vol. 1408. Practice and theory of automated timetabling, pages 3-19. Berlin, Springer.
[13] Carter, M. W.; Laporte, G. 1996. Recent developments in practical examination timetabling. In Lecture notes in
computer science: Vol. 1153. Practice and theory of automated timetabling, pages 3-21. Springer.
[14] Dascalki, S.; Birbas, T.; Housos, E. 2004. An integer programming formulation for a case study in university
timetabling. European Journal of Operational Research, 153:117-135.
[15] De Werra, D. 1985. An introduction to timetabling. European Journal of Operational Research, 19:151-162.
[16] Fudenberg, D.; Tirole, J. 1983. Game Theory. MIT Press, Boston.
[17] Metropolis, N.; Rosenbluth, A. W.; Rosenbluth, M. N.; Teller, A. H.; Teller, E. 1953. Equations of state
calculation by fast computing machines. Journal of Chemical Physics, 21:1087-1092.
[18] Mimosa scheduling software. 2009. <http://www.mimosasoftware.com/>
[19] Mockus, J. 2002. Bayesian heuristic approach to global optimization and examples. Journal of Global
Optimization, 22:191-203.
[20] Mockus, J.; Eddy, W.; Mockus, A.; Mockus, L.; Reklaitis, G. 1997. Bayesian Heuristic Approach to Discrete
and Global Optimization. Kluwer Academic Publishers, ISBN 0-7923-4327-1, Dordrecht-London-Boston.
[21] Pedroso, J. P.; Moreira, N.; Reis, R. 2004. A web-based system for multi-agent interactive timetabling. In
ICKEDS'04: International Conference on Knowledge Engineering and Decision Support, pages 1-6, Porto,
Portugal.
[22] Pupeikien÷, L.; Mockus, J. 2005. School schedule optimization program. Information Technology and Control,
34:161-170.
[23] Schaerf, A. 1995. A survey of automated timetabling, technical report cs-r 9567. Technical report, Centrum
Wiskunde & Informatica (CWI), Amsterdam, The Netherlands.
[24] Smykalov, P. 2009. School timetabling: Rector. <http://www.rector.spb.ru/uk/index.html>
[25] Watt. 2009. <http://www.asap.cs.nott.ac.uk/watt/>
[26] Wren A. 1996. Scheduling, timetabling and roistering a special relationship? In Lecture notes in computer science:
Vol. 1153. Practice and theory of automated timetabling, pages 46-75. Berlin, Springer.
- 172 -