• Tidak ada hasil yang ditemukan

Chapter 3 Previous work on the school timetabling problem

3.7 Hybrid algorithms

This section describes papers that have solved various school timetabling problems by using combinations of different techniques.

Avella et al. [AVEL07] addressed an Italian high school timetabling problem by using a combination of local search algorithms, namely simulated annealing and a VLSN (Very Large Scale Neighbourhood) search. The hard constraints for this problem are as follows:

 No clashes.

 Certain lessons must be allocated to specific periods.

 Class timetables must be compact.

 Some teachers have one day off a week (full-time) while others have more than one day free (part time).

In addition to hard constraints, the soft constraints are:

 Teacher preferences should be met.

 Teacher timetables should be compact.

 Teacher lessons should be evenly distributed throughout the week.

 No teacher should be allocated more than one period of teaching during afternoon sessions.

A two phased approach was used. The first phase used simulated annealing to find feasible timetables and the second phase used a VLSN search (integer programming) to improve the quality of the feasible timetables found. In the first phase, timetables were created by randomly allocating tuples to periods. As the cost of the timetable was reduced, the tuples placed in the violation free periods were fixed to their allocated periods. As the cost increased, the tuples were “heated”, allowing these tuples to be included in the swapping process if required. The system was firstly applied to the benchmark data sets provided by Abramson [ABRA93]. Feasible timetables were produced for all data sets and these results were compared to the results obtained by Smith et al. [SMIT03]. The simulated annealing part of the system performed better (in reducing the hard constraint cost) than the neural network and simulated annealing methods presented by Smith et al. [SMIT03]. The authors also applied their approach to two Italian high school timetabling problems. Their results were compared to the timetables generated using a commercial software package. Feasible solutions were found for all problems and the VLSN search was found to reduce the number of soft constraint violations. The VLSN search managed to reduce the number of soft constraint violations by approximately 20% when compared to the commercial software alternative. This VLSN search also managed to reduce the soft constraint cost of four randomly generated timetables. The authors concluded that simulated annealing found feasible solutions and the VLSN search improved the quality of the timetables.

A three phase approach was adopted by Alvarez-Valdez et al. [ALVA96] to solve the Spanish school timetabling problem. This approach used two separate tabu search methods to respectively address the hard constraints and the soft constraints. The hard constraints for this problem are the following:

 No clashes.

 Teacher availability requirements must be met.

 Each subject is taught to a particular class at most once in a day.

 Double period requirements must be met.

The only soft constraint is that all class timetables should be compact. The first phase involved creating a candidate solution. Tuples were allocated in order of urgency i.e. tuples

with the fewest violation free periods were allocated first. In the event of two or more tuples having the same urgency, then teacher urgency is used as a tie-breaker i.e. teachers with the fewest number of violation-free periods are given priority. A tabu search was applied in phase two and was able to find feasible solutions very quickly as the initial solution did not contain many constraint violations. The tabu list had a variable length instead of a fixed length as the tabu search with a variable length list produced better results. Phase three involved resolving the only soft constraint of compactness. A tabu search was once again used and the results produced were described as good. The authors concluded that they had developed a program to obtain good solutions that satisfied all of the hard constraints.

The quality of the timetables was also found to be better than the solutions that were produced manually. The multiphase approach was found to be successful in finding feasible, high quality timetables. The first phase of creating timetables by allocating tuples with the fewest feasible periods first contributed a great deal towards finding a feasible solution. The tabu search could then remove the remaining hard constraint violations. A separate tabu search used to reduce the soft constraint cost also proved to be successful.

Another contributing factor was the changing of the length of the tabu list whenever a predefined number of moves were performed. This was found to have improved the results since a changing list size would reduce the probability of cycling when increased and increased the exploration of the search space when decreased.

De Haan et al. [DEHA07] solved the school timetabling problem using a combination of a graph colouring problem and a tabu search. The hard constraints of the problem are:

 Each lesson of a particular subject must be taught on different days.

 Double period requirements must be met.

 Teacher availability requirements must be met.

 Timetables for lower grade classes must be compact.

The only soft constraint was that teacher timetables and higher grade class timetables should be compact. A four phase approach was used. The first phase dealt with optional subjects taken by classes in the upper grades. A branch and bound algorithm was used to place students into groups such that each group contained a set of students doing the same optional subjects. The second and third phases involved the construction of a feasible timetable. In the second phase, the tuples involving the upper grades were allocated in order of tuples with the fewest feasible periods on the timetable. In phase three, a graph colouring heuristic was used to allocate the remaining tuples (involving the lower grades). In

a graph colouring problem, the vertices represent the lessons and these vertices are coloured according to the period to which they have been allocated. When an edge joins two nodes of the same colour, a clash occurs. The fourth phase was used to improve timetable quality (including allocation of rooms and resources) by using a tabu search. The authors stated that not all constraints were incorporated into their system. An empirical comparison was performed with the actual timetable used by the school and it was found that there was a significant reduction in the number of free periods for teachers (reduced from 128 to 48).

Bello et al. [BELL08] used a combination of both a graph colouring algorithm and a tabu search to solve a school timetabling problem that is subject to the following hard constraints:

 No class clashes and teacher clashes.

 Teacher availability requirements must be met.

 Each class must have a maximum of two lessons with the same teacher per day.

The soft constraints for the problem are:

 Teachers should be allocated to teach in the least number of days possible.

 Double period requirements should be met.

 Teacher timetables should be compact.

A timetable was represented using a two-dimensional matrix. Initial solutions were created using a greedy algorithm. No details were provided as to how the greedy algorithm chooses and allocates tuples. The timetable fitness in terms of both feasibility and quality was determined by finding the weighted sum of all the constraint violations. The authors used a graph colouring algorithm to find a feasible timetable. In this algorithm, a vertex of the graph represents a lesson. Two nodes of the same colour that are joined by an edge represent a clash. The graph was coloured using a tabu search method. The system was applied to three Brazilian school timetabling problems as well as two artificial school timetabling problems. The authors found that this hybrid approach produced competitive results when compared to two other tabu search approaches from two unpublished studies.

Schaerf et al. [SCHA01] solved the school timetabling problem by alternating between two different local search techniques, namely hill climbing and a tabu search. These two

techniques are alternated until a solution can no longer be improved. The hard constraints for the problem are:

 No clashes.

 Consecutive period requirements must be met.

The soft constraints are:

 Class timetables should be compact.

 If lessons are not scheduled as doubles or quadruples and they are repeated on a day, then these lessons should be separated.

 Class-teacher lessons should be evenly distributed throughout the week.

 Teacher preferences should be met.

 The same lesson should not be taught to a class more than once in a day.

 Movement between venues should be minimized.

A candidate solution was created by randomly allocating tuples to the timetable. Hill climbing was then applied where moves were accepted only when the fitness of the candidate solution had improved or had not changed. The search terminated when the solution could no longer be improved or when a fixed number of iterations had been performed. The second phase was the application of the tabu search, which continuously made moves until the timetable could no longer be improved. A variable length tabu list was used that decreased when several improvements were made and increased when moves resulted in an increase in timetable cost. The alternation of the tabu search and hill climbing continued for a given number of iterations. If a local optimum is reached, a shifting penalty strategy was employed. This strategy involved changing the weightings of each constraint in the cost function, allowing the tabu search to continuously explore a new area of the search space. While no results were formally provided, the authors found that the alternating method worked well for the school timetabling problem.