• Tidak ada hasil yang ditemukan

A study of genetic algorithms for solving the school timetabling problem.

N/A
N/A
Protected

Academic year: 2023

Membagikan "A study of genetic algorithms for solving the school timetabling problem."

Copied!
269
0
0

Teks penuh

The experimental work described in this dissertation was carried out at the School of Computer Science, University of Natal, Pietermaritzburg, from January 2007 to April 2013, under the supervision of Professor Nelishia Pillay. Where the work of others has been used, it is duly acknowledged in the text.

PLAGIARISM

PUBLICATIONS

The school timetable problem is a common optimization problem that many elementary schools and high schools face. The second goal is to evaluate a genetic algorithm that uses an indirect representation (IGA) when solving the school timetable problem. When comparing the performance of the two approaches, IGA outperformed DGA for all the school schedule problems tested.

Introduction

  • Purpose of the study
  • Objectives
  • Contributions to the study
  • Thesis layout

To develop and evaluate a genetic algorithm approach that uses indirect representation in solving the school timetable problem. There has been no previous investigation of indirect representations in genetic algorithms in solving the school timetable problem, and it was found that this genetic algorithm (IGA) performed better than a genetic algorithm using direct representation (DGA). This chapter describes the school timetable problems that various authors have tried to solve, the methods that have been used to solve the problem, and the results obtained.

An overview of the school timetabling problem

  • The School timetabling problem
  • Common hard constraints
    • Lesson requirements
    • Clashes
    • Consecutive period requirements
    • Co-teaching and subclasses
    • Specialized venues
    • Teacher availability
  • Common soft constraints
    • Daily teacher/subject limits
    • Compact timetables
    • Replacement teachers
    • Resource preferences
  • The school timetabling problem as a multi-objective problem
  • Chapter summary

So assigning the principal to the last few periods of the day would be a violation. A general requirement is the limitation of the number of lessons a teacher is allocated per day. In the three studies, the soft constraints were considered as sub-goals and the number of violations for each of the sub-goals had to be minimized.

Table 2.1:  Class timetable example
Table 2.1: Class timetable example

Previous work on the school timetabling problem

  • The tabu search
    • Tabu search description
    • Applications of tabu search to the school timetabling problem
  • Integer or linear programming
    • Integer or linear programming description
    • Application of integer programming to the school timetabling problem
  • Tiling algorithms
  • Simulated Annealing
    • Introduction to simulated annealing
    • Applications of simulated annealing to the school timetabling problem
  • Constraint programming
    • Constraint programming description
    • Applications of constraint programming to the school timetabling problem
  • Particle Swarm Optimization
    • Introduction to particle swam optimization
    • Application of particle swarm optimization to the school timetabling problem
  • Hybrid algorithms
  • Comparative studies
  • Chapter Summary

Additionally, a set of CLUs were combined to form the week's lessons (i.e. the class schedule) for a given class. All free periods for classes must be allocated to the last period of the day. Tabu search was then applied to reduce the cost of hard constraints and the cost of soft schedule constraints.

Introduction to Genetic Algorithms

  • Introduction
  • Biological background
  • Genetic Algorithm Overview
    • Initial population generation
    • Fitness function
    • Selection method
    • Genetic operators
    • Control parameters
  • Advances in Genetic Algorithms
    • Control models
    • Individual representation
    • Initial population creation
    • Tournament Selection
    • Genetic operators
  • Chapter Summary

In the genetic algorithm presented by Goldberg [GOLD89], all individuals in the initial population are generated randomly. In the genetic algorithm used by [GOLD89], the offspring are created by combining the string fragments (parts of the string) that are obtained from each of the parents. If there are no duplicate individuals in the initial population, the diversity of the population increases and allows for greater coverage of the search space.

Figure 4.1:  Genetic algorithm [GOLD89]
Figure 4.1: Genetic algorithm [GOLD89]

Genetic algorithms and the School Timetabling Problem

  • Evolutionary or genetic algorithms
  • Genetic algorithms with other techniques
  • Comparative studies
  • Chapter Summary
    • Representation
    • Control model
    • Initial population generation
    • Selection method
    • Genetic operators
    • Single phase versus multiphase
    • School Timetabling Problems

Each free period must be allocated at the end of the day or at the beginning of the day. The authors found feasible schedules in the initial population, so the main objective of the genetic algorithm was to optimize the quality of these feasible schedules. Free periods for class schedules should be moved to either the beginning or end of the day.

An individual in the population was represented as a two-dimensional matrix with the rows representing the days of the week and the columns representing the periods. The cost of the grid was determined by the weighted sum of the constraint violations. Hill climbing ensured that moves did not result in an increase in the constraint cost of the grid.

The last two approaches combined the hill-climbing (RNA) algorithm with each of the genetic algorithms. The fitness of a schedule was determined by computing the weighted sum of the constraint violations. Another important contributing factor was the use of the tabu search incorporated with the mutation operator.

Studies by [DIST01], [ABRA91a], [CERD08], and [RAHO06] include hill climbing as part of the genetic operators to solve their respective problems.

Methodology

  • Introduction
  • Fulfilling the objectives of the study
    • Objective One
    • Objective Two
  • Hypothesis testing
  • The School Timetabling Problems
    • The Hard Defined TimeTable (HDTT) school timetabling problem
    • The Valouxis Greek school timetabling problem
    • The Beligiannis Greek school timetabling problem
    • The Woodlands Secondary school timetabling problem
    • The W.A. Lewitt primary school timetabling problem
  • System implementation details
  • Chapter Summary

The mathematical formulation of the fitness function for this problem is simply the sum of all the collisions of a given lattice. This increases the difficulty of the problem as these constraints must be met rather than minimized. The formulation of the fitness function to calculate the soft constraint cost is a summation of the number of violations for each of the listed soft constraints.

There are also four soft constraints that need to be minimized, which is more than most problems discussed in the literature. Thus, this problem is one of the most challenging problems compared to the other problems in the literature. Based on the above constraints, the fitness function formulation to calculate the hard constraint cost is shown below.

Lower costs for soft constraints indicate better schedule quality. So the goal is to minimize the value of the above function. Unlike the Beligiannis problem, the number of classes and teachers involved in the subclassing and co-teaching requirements is more than two, which increases the difficulty of the problem. The goal is to minimize the cost of the schedule and a feasible schedule is one with a hard constraint cost of 0.

Thus, the fitness value is determined by the sum of the number of hard constraint violations for each hard constraint HCX.

Table 6.1:  Levels of significance, critical values and decision rules
Table 6.1: Levels of significance, critical values and decision rules

A Genetic Algorithm Approach using a Direct Representation

  • Overall algorithm
  • Initial population creation
    • Representation
    • Initial population creation process
    • Converting the class-teacher lessons list into a list of tuples
    • The sequential construction method (SCM)
    • Initial population creation during Phase 2
  • Evaluating a timetable for feasibility and quality
    • Evaluating the feasibility of a timetable (Phase 1)
    • Evaluating the quality of a timetable (Phase 2)
  • Selecting a parent
    • Standard tournament selection
    • Variant tournament selection (VTS)
  • Genetic operators for Phase 1
    • Two violation mutation (2V)
    • One violation mutation (1V)
    • Hill climbing versus non-hill climbing operators
  • Genetic operators for Phase 2
    • Random Swap
    • Row swap
    • One violation mutation (1V)
    • Two violation mutation (2V)
  • Control parameters
  • Chapter Summary

As discussed in Section 5.4 (Chapter 5), using an intersection operator would require repair operators to remove duplicate tuples and add missing tuples. The schedule with the best fitness (i.e. the least number of strong constraint violations) is added to the initial population. The random heuristic is repeatedly applied until all tuples have been placed on the schedule.

Any one of the seven tuples from assembly number 3 will then be assigned to a period in the grid. The tuples are assigned to periods in the grid in this order, potentially reducing the number of violations when filling the grid. Initially, all tuples have the same degree of saturation (i.e. the number of periods) since the grid is empty.

At the next iteration of the allocation process, all tuples with a saturation degree of 29 are prioritized, and one of these tuples (selected using secondary heuristics) will be allocated to the schema. The two teachers (or venues) are then swapped within the schedule, possibly resulting in the removal of hard constraints. Three of the four operators discussed in this section are based on the mutation operators used in the literature.

Another cell is randomly selected and the contents of the two cells are swapped, resulting in the possibility that the soft constraint violation is removed.

Table 7.2:  List of class-teacher lessons
Table 7.2: List of class-teacher lessons

A Genetic Algorithm Approach using an Indirect Representation

  • Overall Algorithm
  • Initial Population Creation
    • Instruction String Representation
    • Algorithm for Initial Population Creation
    • The Sequential Construction Method (SCM)
    • Phase 2 Initial Population Creation
  • Evaluating an individual in the population
  • Selecting a parent
  • Genetic Operators
    • Mutation
    • Crossover
  • Control Parameters
  • Summary

The length of the initial string is equal to the number of tuples to be allocated. Then the deallocate instruction will remove the tuple from the roadmap (resulting in an empty roadmap). The allocation instruction is then applied and an unallocated tuple is placed in the roadmap.

A population of strings is created with each string containing a combination of instructions that will be used to improve the quality of the schedule found in Phase 1. The fitness value of the individual is calculated by counting the number of violations of hard constraints (Phase 1) and violations of soft constraints (Phase 2) of the manufactured schedule. If an allocation instruction ("A") is executed, then the tuple with the lowest degree of saturation (i.e. the tuple with the least number of periods without violation) is allocated to a period that does not violate any hard constraint (if it is possible).

This section describes the crossover and mutation genetic operators used in both phases of IGA. For this operator, a randomly selected crossover point is selected for each of the two individuals. As can be seen in Figure 8.3, the crossover operator also caused the length of the strings to change.

This is followed by the description of how an individual is represented, how the initial population is generated for both phases of the IGA and how each individual is evaluated.

Table 8.1:  Instructions used to build a timetable
Table 8.1: Instructions used to build a timetable

Results and discussion

Introduction

DGA process evaluation

  • The Abramson benchmark school timetabling problem (HDTT)
    • Comparison of low-level construction heuristics
    • Comparison of selection methods
    • Comparison of mutation operators
  • The Valouxis Greek school timetabling problem
    • Comparison of low-level construction heuristics
    • Comparison of Phase 1 selection methods
    • Comparison of Phase 1 mutation operators
    • Comparison of Phase 2 selection methods
    • Comparison of Phase 2 mutation operators
  • The Beligiannis Greek high school timetabling problem
    • Comparison of low-level construction heuristics
    • Comparison of Phase 1 selection methods
    • Comparison of Phase 1 mutation operators
    • Comparison of Phase 2 selection methods
    • Comparison of Phase 2 mutation operators
  • W.A. Lewitt primary school timetabling problem
    • Comparison of low-level construction heuristics
    • Comparison of Phase 1 selection methods
    • Comparison of Phase 1 mutation operators
    • Comparison of Phase 2 selection methods
    • Comparison of Phase 2 mutation operators
  • The Woodlands secondary school timetabling problem
    • Comparison of low-level construction heuristics
    • Comparison of Phase 1 selection methods
    • Comparison of Phase 1 mutation operators
    • Comparison of Phase 2 selection methods
    • Comparison of Phase 2 mutation operators
  • Best performing DGA processes

The DGA approach using the degree of saturation produces solutions in the smallest number of bands. The DGA using the 2VNH mutation operator performs better than the DGA approach using one of the hill-climbing operators. From Table 9.18, it is concluded that DGA using variant tournament selection performs better than DGA using standard tournament selection.

The DGA using variant tournament selection also produces the schedule with the fewest number of soft constraint violations (39). The average qualities in Table 9.39 indicate that the DGA using standard tournament selection produces better quality schedules than the DGA using variant tournament selection. The hypothesis states that the DGA using standard tournament selection will produce better quality schedules than the DGA using variant tournament selection.

The results of using the DGA approach with each of the three construction heuristics are shown in Table 9.45. On average, DGA using the degree of saturation produces the least number of strong constraint violations. DGA using the degree of saturation heuristic also produces the best quality schedule with the least number of soft constraint violations (7).

The hypothesis states that DGA using standard tournament selection performs better than DGA using variant tournament selection method (in terms of feasibility). The success rates listed in Table 9.50 indicate that the DGA using the hybrid operator is far superior to the DGA using any of the other mutation operators. The average quality of DGA using each mutation operator is given in the table below (Table 9.53).

Table 9.1:  Processes and parameter values to test best low-level construction  heuristic (HDTT problem)
Table 9.1: Processes and parameter values to test best low-level construction heuristic (HDTT problem)

Fine-tuning of DGA control parameter values

  • The Abramson benchmark school timetabling problem
    • Fine tuning the SCM size
    • Fine-tuning the population size
    • The best tournament size
    • Fine-tuning the number of swaps
    • Maximum number of generations
  • The Valouxis school timetabling problem
    • Fine-tuning the SCM size
    • Fine-tuning the population size
    • Fine-tuning the tournament size
    • Fine-tuning the number of swaps
    • Maximum number of generations
  • The Beligiannis Greek school timetabling problem
    • Fine-tuning the SCM size
    • Fine-tuning the population size
    • Fine-tuning the tournament size
    • Fine-tuning the number of swaps
    • Maximum number of generations
  • The W.A. Lewitt primary school timetabling problem
    • Fine-tuning the SCM size
    • Fine-tuning the population size
    • Fine-tuning the tournament size
    • Fine-tuning the number of swaps
    • Maximum number of generations
  • The Woodlands secondary school timetabling problem
    • Fine-tuning the SCM size
    • Fine-tuning the population size
    • Fine-tuning the tournament size
    • Fine-tuning the number of swaps
    • Maximum number of generations
  • Summary of fine-tuning

Success rates and the number of generations taken to find a solution are shown in Table 9.72. The following table (Table 9.84) shows the processes and parameter values ​​used to test the best tournament size. The processes and parameter values ​​used to test the tournament sizes are listed in the table below (Table 9.97).

The quality of the timetables produced using the DGA approach with different tournament sizes is listed in Table 9.99. The success rates and average quality of the schedules produced using the DGA approach with each SCM value are shown in Table 9.107. The processes and parameter values ​​used in testing the different population sizes are listed in Table 9.108.

The success rates, average HC costs and average quality for the DGA using each population size are shown in Table 9.109.

Table 9.67:  Processes and parameter values to test best SCM size (HDTT problem)  Constant Methods and Operators
Table 9.67: Processes and parameter values to test best SCM size (HDTT problem) Constant Methods and Operators

IGA – Results and discussion

  • The Abramson School Timetabling Problem
  • The Valouxis School Timetable Problem
  • The Beligiannis Greek School Timetabling Problem
  • The Lewitt Primary School Timetabling Probem
  • The Woodlands secondary school timetabling problem

Discussion of IGA versus DGA Results

Comparison with Other Studies

  • Abramson benchmark problem set comparison
  • The Valouxis Greek school timetabling problem
  • The Beligiannis Greek school timetabling problem
    • Data set HS1
    • Data set HS2
    • Data set HS3
    • Data set HS4
    • Data set HS5
    • Data set HS7
  • W.A. Lewitt primary school problem
  • Woodlands data set

Chapter summary

Conclusions and Future Research

Introduction

Objectives and Conclusions

Future research

Abramson data sets

Valouxis data set

Beligiannis data sets

Lewitt data set

Woodlands data set

Gambar

Table 9.3:  Average constraint violations (and standard deviations) found for different  construction heuristics
Figure 9.4:  Column chart showing average generations for each selection method
Table 9.13:  Processes and parameter values to test best low-level construction  heuristic (Valouxis problem)
Table 9.17:  Processes and parameter values to test best selection method  (Valouxis problem)
+7

Referensi

Dokumen terkait

The translation strategies were found as follows: Using Google translate 81% from 39 number of data, check dictionary 6% from 3 number of data, and eliminated cultural term 13% from