0% found this document useful (0 votes)
46 views8 pages

High School Time Table Problem Solving and Comparison With Automatic Optimized Timetable

This document discusses optimizing high school timetables by automatically generating schedules and comparing them to existing schedules. It aims to develop a program to create real high school timetables, compare results to automatically optimized schedules, and evaluate heuristics. Key constraints and objectives are defined, including assigning teachers, students, rooms and time slots to lessons while avoiding conflicts and optimizing criteria like pedagogical order of subjects. Penalty point systems are established to evaluate schedules based on how well they meet required constraints and minimize other soft constraints.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views8 pages

High School Time Table Problem Solving and Comparison With Automatic Optimized Timetable

This document discusses optimizing high school timetables by automatically generating schedules and comparing them to existing schedules. It aims to develop a program to create real high school timetables, compare results to automatically optimized schedules, and evaluate heuristics. Key constraints and objectives are defined, including assigning teachers, students, rooms and time slots to lessons while avoiding conflicts and optimizing criteria like pedagogical order of subjects. Penalty point systems are established to evaluate schedules based on how well they meet required constraints and minimize other soft constraints.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

HIGH SCHOOL TIME TABLE PROBLEM SOLVING AND

COMPARISON WITH AUTOMATIC OPTIMIZED TIMETABLE


Lina Pupeikiene1, Jonas Mockus2
1
Vilnius Gediminas Technical University, Sauletekio al. 11, LT-10223 Vilnius, Lithuania,
[email protected]
2
Institute of Mathematics and Informatics, Akademijos g. 4, LT-08663 Vilnius, Lithuania,
[email protected]
Abstract. In every high school it is most important to build school schedule for high school pupils. Every
pupil of high school can choose individual lessons and has individual schedule. The problem is more
complicated when the every pupil has possibilities to choose not only subjects, but hour per week of this
subject too. However, as the number of teachers, number of pupils, number of different subjects, number
of different subject hours, time slots and the constraints increases, the required time to find at least one
feasible solution grows exponentially. All pupils, which have the same subject, are grouped to the
subject-groups. Every subject-group has own teacher. The high school schedule is created from these
subject-groups. The article includes such aims: development and estimation of real high school timetables
program; comparison results of real high school schedule and automatically optimized schedule.
Key words: High school timetabling, optimal scheduling, subject-groups forming, heuristics evaluation.

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].

4 Defining Optimization Problem


Ministry of Education of the Republic of Lithuania has confirmed basic rules for high school schedule
forming. They can be complementary of each school's rules and restrictions. However, the main purpose of these
limitations is to develop a schedule, which would evaluate of the Ministry of Education requirements. In
addition, this schedule must be acceptable to both: pupils and teachers.
Required schedule restrictions (formed by the Ministry of Education):
1. Working days d per week must be d ≤ 5.
2. The teacher simultaneously cannot work in several different places.
3. The teacher cannot have more than 36 hours per week.
4. The pupil simultaneously cannot learn few different subjects.
5. A pupil i may have 28 ≤ i ≤ 32 lessons per week.
6. It cannot be more then p≤7 lessons p per day.
7. Number of pupils i in one subject-group can be 15 ≤ i ≤ 30.
8. In each classroom simultaneously cannot be several different types of subjects (for example,
mathematics and physics).
9. Subjects, requiring special measures or facilities, shall be taught in the special classrooms (for
example, IT, chemistry etc.).
Technically any required restriction violations cannot be broken. There can be only some minor
offenses necessary restrictions, if it significantly improves the quality of the schedule. To define with timetable
is good or bad we use penalty points. The penalty point’s cr, which assessing these restrictions, should be
imposed very strictly.
The main required penalty point’s restrictions function is as follows:
F f = ∑ cr N r , (1)
r

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

here Lm – number of “windows” on teachers m schedule; Ls – number of “windows” on pupils s


schedule; Lvm – number of “bad” hours v on the teachers m schedule; Ldm – number of “bad” days d on the
teachers m schedule; Lvs – number of “bad” hours v on the pupils s schedule; Lpd – number of pedagogical
didactic pd violations; Ln – number n of changing formed subject-group.
All physical restrictions and inconveniences are showed in Figure 1.

Figure 1. Restrictions for a creation of high school schedule


A compromise solution is reached by defining penalties for violation of constraints and disregarding
inconveniences. Therefore, penalty points are calculated:
F = F f + Fn . (3)
where, Ff – is a sum of the penalties for the required restrictions; Fn – is a sum of the penalties for the needful
restrictions (disregarding inconveniences). Optimal schedule will be schedule, which has as less as possible
penalty points. To find such schedule, objective function F should be optimized. To not analyze the schedules
with same number of penalty points, Pareto optimality was formulated. So we will get less variants to analyze
and will save the users time. The optimization problem is
min F (τ ) , (4)
τ ∈A

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.

5 “School schedule optimization” program working steps


“School schedule optimization” program designed to high school scheduling.

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

6.1. Defining Neighbourhood


Many different definitions can be used defining neighbourhood in a set A of feasible timetables d. The
definition is important because local search is performed in the neighbourhood of the given point. We search for
better timetables by subsequent closing of gaps for pupils and teachers. In this case the neighbours of a timetable
d’ are all timetables d” that can be reached from d’ by a sequence of closing gap operations. This way we obtain
locally optimal d*(d’) that depends on the initial point d’.
Local search can be randomized by selecting current candidate (a pupil or a teacher) for gap closing
with some probability x0. Closing gaps for randomly selected pupils and teachers, we modify the search
sequences. However, this not helps to reach the global optimum since the neighbourhood remains the same.

6.2. Escaping Neighbourhood


Simplest algorithm to search for global optimum is just random search with uniform distribution of
observations (observation is calculation of the objective function at some fixed point). The advantages are
simplicity and convergence to a global minimum of continuous functions. A well-known way to escape the local
minimum is Simulated Annealing [1, 2, 14, 19, 21, 22]. Denote
δ n = F (d n+1 ) − F (d n ) , (5)
n n+1
Here d is a current timetable, d is a new timetable generated by closing gap operation. Define the
probability
−δ n
x1 / ln(1+ x2 n )
pn = e , if δ n > 0
, (6)
p n = 1, if δ n < 0
, (7)
where parameter x1 is the “initial temperature”, parameter x2 defines the “cooling rate”. SA algorithm means:
go to new timetable dn+1 with probability pn (8)
To apply the SA to a specific problem, one must specify the parameters x1 and x2.The choice can have a
significant impact on the method's effectiveness. Unfortunately, there are no choices of these parameters that
will be good for all problems.

Figure 4. The best results of SA using different parameters

- 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.

6.3. Bayesian Heuristic Approach


The Bayesian Heuristic Approach was designed for automatic optimization of heuristic parameters by
filtering the noise during optimization of multi-modal functions [20]. We need to optimize three heuristic
parameters x = (x0, x1, x2). Optimal parameters are obtained using the data of some specific school.
We cannot see optimal parameters x1, x2 of SA. Optimal results depend on the initial soft constrains and
number of iteration. A way to adapt these parameters to a given problem is automatic optimization. This is not an
easy problem since we need optimize multi-modal function with considerable noise. Here the Bayesian Heuristic
Approach (BHA) [20] is useful.
Figures 5 and 6 illustrate efficiency of automatic adaptation of SA parameters using BHA. In these
figures, the difference between initial and optimal timetable is showed. There we see 100 experiments with every
different SA iteration. SA parameters were set automatically. Figure 3 shows, that method is more efficient as
more SA iteration are used. Figure 4 illustrates the best results what was shown during 100 experiments with
every different SA iteration. There we can see, that the best results we will get when it will be many SA and
BHA iterations.

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.

8 Optimization in Commercial Software


We discuss optimization possibilities of the following three commercial timetabling systems currently
used in Lithuanian high schools: “Mimosa 2009”, “aSc TimeTables 2009”, and “Rector 2009”.
“Mimosa 2009” [18] is the product of the Finnish company “Mimosa Software Ltd”. “Mimosa”
provides convenient GUI for manual timetabling and reports constraints violations.

Figure 8. A fragment of “Mimosa 2009” output


Figure 8 shows a fragment of the output. In the upper-left side we can see pupils schedule, under it –
pupils of the subject-group and in the right side – individual schedules of every pupil in the subject-group. The
form is acceptable for Lithuanian schools. For example, “Ch3BK” means a chemistry lessons, pupils from 3-rd
level, will learn as basic course. Optimization is limited to closing some gaps in teacher’s schedules. The
software is popular in basic schools. Application in upper classes of high schools is possible within some strict
limitations by setting individual pupil schedules. Long and hard manual work is needed if the school is large.
Any penalty points are calculated in this program.
To compare results of different automatic optimization methods we need procedures for evaluation of
undesirable factors in some fixed scales. In this paper, it is done in the framework of Pareto optimality [16]. The
commercial software does not support this, since no direct comparison of decisions quality cannot be made.

- 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“

Small high school Medium high school Large high school


(50 pupils) (150 pupils) (350 pupils)
Average

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

Calculations Left subjects


00:08:40
00:13:02
02:10:07
00:41:32
05:53:13
71:23:51
---
---
---
---
---
---
---
---
---
---
---
---

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 -

You might also like