Project Seminar Presentation
Project Seminar Presentation
Vijay B. Gujar.
(MT2008205)
Introduction to Scheduling
School Timetabling Problem
RNA and GAT4C
GA Library
Conclusion
Introduction to Scheduling Problems
Scheduling Is Difficult Problem
04/17/11
- Due to size and complexity of the search space
3
Problem Definition
Objective:
The objective of timetable construction program is
to construct a weekly timetable for an elementary
school.
Description:
Problem formulation is as follows:
A weekly timetable consists of M working days. Every day
there are N timeslots. Therefore, there are M x N timeslots
4
available weekly.
Problem Definition
contd..
04/17/11
place.
5
Chromosome Representation
04/17/11
representation;
6
Constraints for Timetable Scheduling Problem
Hard Constraints:
04/17/11
Overlaps:
Avoid the possibility of a class been taught by more than
one teacher in the same period.
Simultaneity:
Two classes are defined as simultaneous classes if they are
taught by different teachers at the same time.
.
.
7
HARD CONSTRAINTS
CONTD..
04/17/11
Consecutiveness:
This constraint checks whether a distribution of hours
8
Soft Constraints
• Overuse:
04/17/11
It refers to the number of periods per day in which a teacher gives its
lessons, over its specified maximum of periods per day.
• Underuse:
• Holes:
- Number of Classes ,
1) Unavailability
- Teachers number ,
- Lecture number.
- Day
10
- Class
Input Data
contd..
04/17/11
Input For Constraints
2) Consecutiveness
- Teacher id
- Day
- Class
11
Genetic Algorithm
Direct manipulation of coding
04/17/11
Search from a population, not a single
point
04/17/11
13
Genetic Operators
04/17/11
Crossover operators (Block wise)
14
RNA Search Method
Random Nonascendent enters in a loop that navigates the part of
04/17/11
search space, stepping interactively from one solution to one of its
neighbors, called move.
15
RNA Search Method
Contd..
04/17/11
of iterations without improving the value of the
cost function.
04/17/11
until it makes no improvements for given
number of iterations.
Advantages of RNA
04/17/11
developed an algorithm.
18
Tournament Selection
Tournament selection runs a tournament among
04/17/11
a few individuals chosen at random from the
population and selects the winner (the one with
the best fitness). Selection pressure can be
easily adjusted by changing the tournament
size. If the tournament size is larger, weak
individuals have a smaller chance to be
selected.
04/17/11
two pairs of individuals are selected and then the
best candidate of each one is chosen, according
to its fitness value.
04/17/11
The process is then repeated, updating the best
solution found among the individuals up to now,
and it stops when a certain number of cycles is
completed.
21
Four Children Tournament
(GAT4C)
04/17/11
The main difference with the previous algorithm
is that once two individuals are chosen to form a
pair other are discarded, so they will be never
be chosen again.
04/17/11
1) Crossover and flip mutations –
No. of Children generated fast and large
2) Get Neighbors best pair
3) Random Selection
23
Optimizing Timetable Schedules by a
Hybrid Genetic Algorithms
04/17/11
Problem Definition and Constraints
Mutation (Flip Mutation)
24
The School Timetable Scheduling Problem
by Hybrid Genetic Algorithm Contd….
04/17/11
Genetic operators
25
Hybrid Algorithm
RNA and GAT4C
04/17/11
In this approach, Tournament is alternated
with RNA until a certain number of iterations is
reached.
First, Tournament phase is performed. It is
followed by RNA phase which starts taking the
best individual found among all generations as
the initial solution. 26
Hybrid Algorithm
contd…
04/17/11
After finishing the RNA stage, new population of n
individuals must be created as the input to new
genetic phase.
27
Hybrid Algorithm
contd…
04/17/11
Therefore we guarantee that the best candidate
known up to now are always included at the
beginning of every tournament phase, and
consequently the best genetic material.
28
GA Library
There are three things you must do to solve a
04/17/11
problem using a genetic algorithm:
1. Define a representation
2. Define the genetic operators
3. Define the objective function
04/17/11
specifiable amount of overlap. The algorithm
creates a population of individuals by cloning
the genome or population that you pass when
you create it. Each generation the algorithm
creates a
04/17/11
initialization, mutation, and crossover.
04/17/11
Mutation means different things for different data
types.
04/17/11
genome. The comparator (often referred to as a
'distance function') is used to determine how
different one genome is from another. Every
genetic algorithm requires that an objective
function is defined - this is how the genetic
algorithm determines which individuals are
better than others. Some genetic algorithms
require a comparator. 33
Objective Functions and Fitness Scaling
04/17/11
than gradient search methods because they do
not require complicated differential equations
or a smooth search space. The genetic
algorithm needs only a single measure of how
good a single individual is compared to the
other individuals. The objective function
provides this measure; given a single solution
to a problem, how good is it?
04/17/11
must first cast the generic genome into the
type of genome that your objective function
is expecting. From that point on you can
work with the specific genome type. Each
objective function returns a single value that
represents the objective score of the genome
that was passed to the objective function
35
Member function descriptions
ga.nGenerations(gen); // no. of generations
04/17/11
ga.pMutation(0.001); // probability of mutation
ga.pCrossover(0.9); // probability of crossover
ga.scoreFilename("bog.dat"); // name of file for scores
ga.selectScores(GAStatistics::AllScores);
ga.evolve(); // Initialization
36
Member function descriptions
evolve-Initialize the genetic algorithm then
evolve it until the termination criteria have been
04/17/11
satisfied. This function first calls initialize then
calls the step member function until the done
member function returns gaTrue. It calls the
flushScores member as needed when the
evolution is complete. You may pass a seed to
evolve if you want to specify your own random
seed.
04/17/11
flush its generational data to disk. If you
have specified a flushFrequency of 0 or
specified a coreFilename of nil then calling
this function has no effect.
38
Member function descriptions
pCrossover-Set/Get the crossover
04/17/11
probability.
04/17/11
population to replace each generation.
40
Member function descriptions
04/17/11
You can select the amount of overlap between
generations by specifying the pReplacement
parameter.
04/17/11
GABinaryString and GAGenome classes. It is a
threedimensional block of 1s and 0s whose
width, height, and depth can be fixed or
variable. The genes in this genomes are bits.
The alleles for each bit are 0 and 1.
42
Termination Function
ga.nGenerations() :
04/17/11
The termination function determines when the
genetic algorithm should stop evolving. It takes
a genetic algorithm as its argument and
returns gaTrue if the genetic algorithm should
stop or gaFalse if the algorithm should continue.
04/17/11
timetabling problem.
44
REFERENCES
[1] A. Abramson,. “Constructing school timetables using simulated
04/17/11
annealing:sequential and parallel algorithms”, Management Science , 1991,37,
98-113.
[2] Alberto Colorni, Marco Dorigo, ”Metaheuristics For Highschool Timetabling”, To
Appear In Computational Optimization And Applications Journal, 1997.
[3] A. Bertoni, M.dorigo, “Implicit parallelism in genetic algorithms”, to appear in
Artificial Intelligence, 1993.
[4] L Booker, D.E.Goldberg ,J.H.Holland, “Classifier systems and genetic algorithms.
Artificial Intelligence”, 40, 235-282.
[5] Nedim Šrndic , Emir Pandžo , Mirza Derviševic, Samim Konjicija, “The Application
of a Parallel genetic Algorithm to Timetabling of Elementary School Classes A
Coarse Grained Approach”.
[6] M.W. Carter, “A survey of practical applications of examination timetabling
algorithms”, Operations Research ,1986.,34, 193-202.
[7]N. Chalhal and DE Werra, “An interactive system for constructing timetables on a
PC”, European Journal of Operational Research ,1989,40.
[8.] A. Colorni, M. Dorgio and V. Maniezzo,. “A Genetic algorithm to solve timetable
problem” ,1992, 60, 5-31, (in Italian).
45
REFERENCES CONTD…
[9.] J. Csima and C.C. Gotlieb, Tests on a computer method for construction of school
timetables, Communications of the ACM 7, 1961.,160-163.
[11] Tarek A. El-Mihoub, Adrian A. Hopgood, Lars Nolle, Alan Battersby, “Hybrid
Genetic Algorithms: A Review”, Engineering Letters, 13:2, EL_13_2_11,
Advance online publication, 4 August 2006.
FUTURE WORK