Professional Documents
Culture Documents
HEURISTIC SEARCH
In computer science, artificial intelligence, and mathematical optimization, a heuristic is a technique
designed for solving a problem more quickly when classic methods are too slow, or for finding an
approximate solution when classic methods fail to find any exact solution. This is achieved by
trading optimality, completeness, accuracy, or precision for speed.
The objective of a heuristic is to produce quickly enough a solution that is good enough for solving
the problem at hand. This solution may not be the best of all the actual solutions to this problem, or
it may simply approximate the exact solution. But it is still valuable because finding it does not
require a prohibitively long time.
Heuristics may produce results by themselves, or they may be used in conjunction with
optimization algorithms to improve their efficiency (e.g., they may be used to generate good seed
values).
All of the search methods in the preceding section are uninformed in that they did not take into
account the goal. They do not use any information about where they are trying to get to unless they
happen to stumble on a goal. One form of heuristic information about which nodes seem the most
promising is a heuristic function h(n), which takes a node n and returns a non-negative real number
that is an estimate of the path cost from node n to a goal node. The function h(n) is an
underestimate if h(n) is less than or equal to the actual cost of a lowest-cost path from node n to a
goal.
Results about NP-hardness in theoretical computer science make heuristics the only viable
option for a variety of complex optimization problems that need to be routinely solved in realworld applications.
The trade-off criteria for deciding whether to use a heuristic for solving a given problem include the
following:
Optimality: When several solutions exist for a given problem, does the heuristic guarantee
that the best solution will be found? Do we actually need the best one?
Completeness: When several solutions exist for a given problem, can the heuristic find them
all? Do we actually need all solutions? Many heuristics are only meant to find one solution.
Accuracy and precision: Can the heuristic provide a confidence interval for the purported
solution? Is the error bar on the solution unreasonably large?
Execution time: Is this the best known heuristic for solving this type of problem? Some
heuristics converge faster than others. Some heuristics are only marginally quicker than
classic methods.
important to correct. Finally, heuristic evaluations does not allow a way to assess the quality of
redesigns .
Backtracking is one of methods for the problem which has a combination of solutions of a large but
still limited number. Its important feature is solution space generated in the search while
implementing. Its shortcoming is the bigger
time complexity. Therefore we should use it with caution; It is best used in combination with other
algorithms.
Execution time:execution time of heuristic search is very less then blind or classical searches
DIFFERENT TYPES OF HEURISTIC SEARCHES
1)
GENETIC ALGORITHM
In the computer science field of artificial intelligence, a genetic algorithm (GA) is a search heuristic
that mimics the process of natural selection. This heuristic (also sometimes called a meta heuristic)
is routinely used to generate useful solutions to optimization and search problems.[1] Genetic
algorithms belong to the larger class of evolutionary algorithms (EA), which generate solutions to
optimization problems using techniques inspired by natural evolution, such as inheritance, mutation,
selection, and crossover.
Initialization of genetic algorithm
population. The population size depends on the nature of the problem, but typically contains several
hundreds or thousands of possible solutions. Traditionally, the population is generated randomly,
allowing the entire range Initially many individual solutions are (usually) randomly generated to
form an initial of possible solutions (the search space). Occasionally, the solutions may be "seeded"
in areas where optimal solutions are likely to be found.
Selection
During each successive generation, a proportion of the existing population is selected to breed a
new generation. Individual solutions are selected through a fitness-based process, where fitter
solutions (as measured by a fitness function) are typically more likely to be selected. Certain
selection methods rate the fitness of each solution and preferentially select the best solutions. Other
methods rate only a random sample of the population, as the former process may be very timeconsuming.
The fitness function is defined over the genetic representation and measures the quality of the
represented solution. The fitness function is always problem dependent. For instance, in the
knapsack problem one wants to maximize the total value of objects that can be put in a knapsack of
some fixed capacity. A representation of a solution might be an array of bits, where each bit
represents a different object, and the value of the bit (0 or 1) represents whether or not the object is
in the knapsack. Not every such representation is valid, as the size of objects may exceed the
capacity of the knapsack. The fitness of the solution is the sum of values of all objects in the
knapsack if the representation is valid, or 0 otherwise.
In some problems, it is hard or even impossible to define the fitness expression; in these cases, a
simulation may be used to determine the fitness function value of a phenotype (e.g. computational
fluid dynamics is used to determine the air resistance of a vehicle whose shape is encoded as the
phenotype), or even interactive genetic algorithms are used.
Genetic operators
The next step is to generate a second generation population of solutions from those selected through
genetic operators: crossover (also called recombination), and/or mutation.
For each new solution to be produced, a pair of "parent" solutions is selected for breeding from the
pool selected previously. By producing a "child" solution using the above methods of crossover and
mutation, a new solution is created which typically shares many of the characteristics of its
"parents". New parents are selected for each new child, and the process continues until a new
population of solutions of appropriate size is generated. Although reproduction methods that are
based on the use of two parents are more "biology inspired", some research suggests that more than
two "parents" generate higher quality chromosomes.
These processes ultimately result in the next generation population of chromosomes that is different
from the initial generation. Generally the average fitness will have increased by this procedure for
the population, since only the best organisms from the first generation are selected for breeding,
along with a small proportion of less fit solutions. These less fit solutions ensure genetic diversity
within the genetic pool of the parents and therefore ensure the genetic diversity of the subsequent
generation of children.
Opinion is divided over the importance of crossover versus mutation. There are many references in
Fogel (2006) that support the importance of mutation-based search.
Although crossover and mutation are known as the main genetic operators, it is possible to use other
operators such as regrouping, colonization-extinction, or migration in genetic algorithms.[5]
It is worth tuning parameters such as the mutation probability, crossover probability and population
size to find reasonable settings for the problem class being worked on. A very small mutation rate
may lead to genetic drift (which is non-ergodic in nature). A recombination rate that is too high may
lead to premature convergence of the genetic algorithm. A mutation rate that is too high may lead to
loss of good solutions unless there is elitist selection. There are theoretical but not yet practical
upper and lower bounds for these parameters that can help guide selection through experiments (see
Tutorials).
Mutation is a genetic operator used to maintain genetic diversity from one generation of a
population of genetic algorithm chromosomes to the next. It is analogous to biological mutation.
Mutation alters one or more gene values in a chromosome from its initial state. In mutation, the
solution may change entirely from the previous solution. Hence GA can come to better solution by
using mutation. Mutation occurs during evolution according to a user-definable mutation
probability. This probability should be set low. If it is set too high, the search will turn into a
primitive random search.
The classic example of a mutation operator involves a probability that an arbitrary bit in a genetic
sequence will be changed from its original state. A common method of implementing the mutation
operator involves generating a random variable for each bit in a sequence. This random variable
tells whether or not a particular bit will be modified. This mutation procedure, based on the
biological point mutation, is called single point mutation. Other types are inversion and floating
point mutation. When the gene encoding is restrictive as in permutation problems, mutations are
swaps, inversions and scrambles.
The purpose of mutation in GAs is preserving and introducing diversity. Mutation should allow the
algorithm to avoid local minima by preventing the population of chromosomes from becoming too
similar to each other, thus slowing or even stopping evolution. This reasoning also explains the fact
that most GA systems avoid only taking the fittest of the population in generating the next but rather
a random (or semi-random) selection with a weighting toward those that are fitter.[1]
For different genome types, different mutation types are suitable:
Example:
1010010
1010110
CROSSOVER
In genetic algorithms, crossover is a genetic operator used to vary the programming of a
chromosome or chromosomes from one generation to the next. It is analogous to reproduction and
biological crossover, upon which genetic algorithms are based. Cross over is a process of taking
more than one parent solutions and producing a child solution from them. There are methods for
selection of the chromosomes. Those are also given below.
Termination
This generational process is repeated until a termination condition has been reached. Common
terminating conditions are:
The highest ranking solution's fitness is reaching or has reached a plateau such that
successive iterations no longer produce better results
Manual inspection
2)
TABU SEARCH
6
Tabu search, created by Fred W. Glover in 1986 and formalized in 1989, is a metaheuristic search
method employing local search methods used for mathematical optimization.
Local (neighborhood) searches take a potential solution to a problem and check its immediate
neighbors (that is, solutions that are similar except for one or two minor details) in the hope of
finding an improved solution. Local search methods have a tendency to become stuck in suboptimal
regions or on plateaus where many solutions are equally fit.
Tabu search enhances the performance of these techniques by using memory structures that describe
the visited solutions or user-provided sets of rules.[2] If a potential solution has been previously
visited within a certain short-term period or if it has violated a rule, it is marked as "tabu"
(forbidden) so that the algorithm does not consider that possibility repeatedly.
Tabu search (TS) is a metaheuristic algorithm that can be used for solving combinatorial
optimization problems (problems where an optimal ordering and selection of options is desired).
The memory structures used in tabu search can roughly be divided into three categories:[5]
Short-term: The list of solutions recently considered. If a potential solution appears on the tabu
list, it cannot be revisited until it reaches an expiration point.
Intermediate-term: Intensification rules intended to bias the search towards promising areas of the
search space.
Long-term: Diversification rules that drive the search into new regions (i.e. regarding resets when
the search becomes stuck in a plateau or a suboptimal dead-end).
Short-term, intermediate-term and long-term memories can overlap in practice. Within these
categories, memory can further be differentiated by measures such as frequency and impact of
changes made. One example of an intermediate-term memory structure is one that prohibits or
encourages solutions that contain certain attributes (e.g., solutions which include undesirable or
desirable values for certain variables) or a memory structure that prevents or induces certain moves
(e.g. based on frequency memory applied to solutions sharing features in common with unattractive
or attractive solutions found in the past). In short-term memory, selected attributes in solutions
recently visited are labeled "tabu-active." Solutions that contain tabu-active elements are banned.
Aspiration criteria are employed that override a solution's tabu state, thereby including the
otherwise-excluded solution in the allowed set (provided the solution is good enough according to
a measure of quality or diversity). A simple and commonly used aspiration criterion is to allow
7
hour a week
No preferences are allowed for any teacher
Here we will try to make valid teacher subject-batch pairs, Following are the constrains which
must be followed
Teacher should get the classes only for the subjects it teaches
Batch
B1
B2
B4
..
Teacher
T1
T2
T3
..
subject
S2
S2
S1
..
..
..
..
25
..
..
..
.
.
9
.
75
.
.
Following are the errors and scope for further analysis of the allocation
Possibility that no teacher left for teaching a particular subject, since all existing teachers
have been allocated a class
Scope for remove few teachers ,as even without them all the classes can be allocated easily
Now we have allocated a unique integer to every batch subject teacher combination and we will
try to allocate those integers to an 3-D array
First Index
= number of days
= number of rooms
HARD CONSTRAINS
These are the constrains that must be followed during the coding. and without satisfying these
constrains solution is not valid. They are listed as follows:
SOFT CONSTRAINS
These are the constrains that are not compulsory for a solution to follow , but quality of the time
table is decided by accomplishment of these constrains
These are listed as follow.
In students time table we have to try to reduce the number of breaks during a day, so that
FITNESS FUNCTION
This is the function that will decide the quality of the time table that are created by putting penality
on each soft constrains accordingly .lesser the penalty better is the quality of the time table.
Fitness = 1/Penalty
Penalty for each soft constrains is as follows
1) For teachers time table 1 hour break is preferred over 2 or 3 hour breaks .so penality for
each break for n hours will be (n-1)^2 i.e. (n-1)*(n-1)
11
2) This implies
3 hours penalty of 9
2hours - penalty of 4
For each break of n hours of student penalty is (n)^3
This implies
2 hour break penalty of 8
3 hours break penalty of 27
3) If for a batch there is only one class in that day penalty is 30
4) For each back to back classes of teacher penalty of 5
5) If there are any Batch-subject-teacher combination could not be allocated to the 3-d array
then penalty is 500
AIM
Our aim is to find the best time tables having the following qualities
Follow all the hard constrain
Making optimal use of the resources
Best fitness function
1.4) Approach to problem in terms of technology /platform to be used
As we are using genetic algorithm to generate time-table, which consist of three methods namely
crossover, mutation and calculating fitness functions , Genetic algorithm instead of focusing on one
most optimal solution ,it focus on many different sub-optimal solution ,that results in high need of
computation and memory.
So for this project due to high computation needs we are using C++ , since it is most optimum in
terms of computation.
INPUT AND STORAGE
Name of the teachers, subjects and batches is taken as input
All these values will be stored in different text files. We chose to store it in text file instead of
database because of the computational advantage. And no sensitive data is needed to be stored.
Storing data into the data structure from text file
Data is read from the text file and stored in the arrays
Two different algorithms are used one is the the basic random algorithm
Crossover
Mutation
Rank Selection
Tournament selection
Fitness Function
even after being such an important area ,mostly because of complexity of the problem scheduling is
done manually ,so to help big organisation for there such important task ,it is important to design a
proper algorithm so that a lot of time can be saved .
13
Since it is an NPhard problem, no best solution can exist ,there is always scope for more
Create a whole new algorithm for this pupose
Find a new combing algorithm, that is we can try to find an alrithm which we can combine
1.6 Give tabular comparison of other existing approaches/ solution to the problem framed
1)
Genetic Algorithms vs. Tabu
Search in Timetable Scheduling
2)
Solving Timetable Scheduling Problem
Using Genetic Algorithms
3)
Timetable Scheduling Using Particle Swarm
Optimization
4)
14
5)
University Time Table Scheduling using
Genetic Artificial Immune Network
6)
Algorithms of Time table Problem
Application and
Performance Evaluation in Course
Scheduling
System
9) Use of Active Rules and Genetic Algorithm . The objective of the work is to create a model
to Generate the automatic Time-Table
used to generate the acceptable schedule using
probabilistic operators.
10)Managing Uncertain Data using Multi
Criteria Repeat Crossover Genetic Algorithm
15
2) Background Study
2.1) Literature Survey
1)
Genetic Algorithms vs. Tabu
Search in Timetable Scheduling
S. C. Chu*B
National Kaohsiung Institute of Technology, Taiwan, R.O.C., *University of South Australia,
H. L. Fang , AI Application Group
E. & C. Dept, China Steel Corp, Taiwan, ROC
IEEE,1999
to find the optimum solution throught genetic algorithm through genetic algorithm and tabu
search,both of them can beat searching like back tracking hands down.in this research paper tabu
search performed better than genetic algorithm. Still since this was the first paper to tackle
scheduling problem through heuristic search so this have great importance in this major project.
2)
Solving Timetable Scheduling Problem
Using Genetic Algorithms
Branimir Sigl, Marin Golub, Vedran Mornar
Faculty of Electrical Engineering and Computing, University of Zagreb
Unska 3, I0000 Zagreb, Croatia
IEEE-2003
This paper uses genetic algorithm to solve the time table scheduling problem using 3-d array of
day ,tim and classes,and uses crossover and mutation process to optimise.this paper also make huge
improvement over genetic algorithm as shown above.main difference between this and the above
research paper is the improvement that they did on genetic algorithm,stating
The first step of the improved crossover operator simply copies equal genes from parents to the
child individual. No additional conflicts can be added through copying those equal values. Different
parents genes are specially marked and delegated for further processing. In the second step, the
crossover operator checks the list of equations for each marked gene in child individual and counts
16
the number of potential conflicts generated for both parents choices. The gene from a parent that
generates fewer conflicts is chosen, so no additional conflicts are generated in addition to the
conflicts caused by the parents.
3)
Timetable Scheduling Using Particle Swarm Optimization
Shu-Chuan Chu, Yi-Tin Chen
Department of Information Management
Cheng-Shiu University
Jiun-Huei Ho, Department of Electronic Engineering, Cheng-Shiu University
Here this algorithm chooses 10 -20 random solutions and call them lolal maximas.and out of those
20 solutions whichever is the best is called global maxima .each of those 20 solutions are changed
by changing 2-3 of their positions that are chosen randomly .to find better solutions .out of those 20
solutions their best solutions are found and out of them the best is chosen to be global ,in this way
algorithm have power to come out of local maximas
as compare to genetic algorithm(traditional)algorithm performed better ,but in this paper it is not
compared with improved genetic algorithm.
4)
USING A GENETIC ALGORITHM OPTIMIZER TOOL TO SOLVE
UNIVERSITY TIMETABLE SCHEDULING PROBLEM
Sehraneh Ghaemi Mohammad Taghi Vakili Ali Aghagolzadeh
{Ghaemi, Mvakil, Aghagol} @tabrizu.ac.ir
Faculty of Electrical & Computer Engineering
University Of Tabriz
IEEE-2007
Modified genetic algorithm(mga)
This type of chromosome representation needs less number of bits for each gene. Therefore
algorithm needs shorter time for running. The obtained results show that SX operator in upper
mutation rates and UX and MUX operator in lower mutation rates perform well and MUX operator
is better than others. By varying mutation rate during algorithm running better results are achieved.
Also Tournament selection operates better than Rank Weighting selection. The MGA and CGA
methods with population size less than GA yield better results and accelerate the algorithm. Note
that the unsatisfied constraints number with CGA method is less than MGA method
5)
University Time Table Scheduling using Genetic Artificial Immune Network
Antariksha Bhaduri
IEEE-2009
Scheduling is one of the important tasks encountered in real life situations. Various scheduling
problems are present, like personnel scheduling, production
scheduling, education time table scheduling etc. Educational time table scheduling is a difficult task
because of the many constraints that are needed to be satisfied in order to get a\ feasible solution.
Education time table scheduling problem is known to be NP Hard. Hence, evolutionary techniques
have been used to solve the time table scheduling problem. Methodologies like Genetic Algorithms
(GAs), Evolutionary Algorithms (EAs) etc have been used with mixed success. In this paper, we
have reviewed the problem of educational time table scheduling and solving it with Genetic
Algorithm. We have further solved the problem with a memetic hybrid algorithm, Genetic Artificial
Immune Network (GAIN) and compare the result with that obtained from GA. Results show that
GAIN is able to reach the optimal feasible solution faster.than that of GA.
In this paper, we discussed in detail the educational time tabling problem, which is basically a
scheduling problem. The problem is known to be NP hard, and is of very high importance to
educational institutes. We discussed in brief the various methods used in solving the time tabling
problem. A detailed overview has been provided for previous works for solving this problem, with
links to such works, with more emphasis on solving the problem using evolutionary algorithms.
Then, the problem is structured and a chromosome/network cell design with genetic operators used
18
is provided for solving it. Finally, we solved the problem using Genetic Algorithm and a hybrid
memetic algorithm, GAIN and the results are compared. Results showed that the memetic
algorithm, GAIN greatly coutperforms GA and hence proved to be a very promising algorithm for
solving the time tabling problem.
6)
Algorithms of Time table Problem Application and
Performance Evaluation in Course Scheduling
System
Yunfeng Dong1, Bei Qi2, Wushi Gao1, Qingzhu Wang1
Shandong Polytechnic University, Jinan, China
E-mail: dyf@spu.edu.cn, qb@spu.edu.cn, gws@spu.edu.cn,
wqz@spu.edu.cn
Lan Wang, Center Hospital, Shandong Luneng Group Co. Ltd Jinan, China
E-mail: qiufengdong@163.com
IEEE-2011
Summary
Tabu search algorithm can accept inferior solutions in the search process; the new solution is not
randomly generated in the current field, but selected the best solution, which the best solution of
probability is more than other solutions. Then the search can escape from local optimal solution,
and turn to other areas, increasing the probability of global optimum solution for local search. We
use tabu search to replace the mutation operator. The tabu search can get better
individual solutions, and be out of local optimum The tabu search is applied to the local search, it
can greatly avoid the phenomenon of over-mature for genetic algorithms, but it is also unwise to use
tabu search frequently, it waste running time. In fact, we can call the tabu search to replace the
mutation operation in appropriate time. So basically all the steps are same but instead of mutation
,sometimes tabu search is performed. Genetic search algorithm has been validated in the test and
achieved good results. Genetic search algorithm is a more practical method, convergence is fast, and
time distributes uniform. But in practice conditions may not be terminated, the purpose is to provide
different possible solutions in order for users to choose. However, if the constraint conditions are
too harsh, there may be no feasible solution, in such case, human intervention is necessary. Course
scheduling problem is a multidisciplinary hard problems, this article attempt genetic algorithm only
on the field of course scheduling, the encoding of genetic algorithms and parameter settings needed
to be improved and explored, the effect on the algorithm need be improved in further.
19
7)
An Algorithm to Automatically Generate Schedule for
School Lectures Using a Heuristic Approach
Anirudha Nanda, Manisha P. Pai, and Abhijeet Gole
SUMMARY
In this paper authors have tried to avoid random selection, by there point of view
It decreases an overhead of computation when we apply all the proper condition while mapping
teachers with time-room
And if they see any clash the lecture already mapped with that time slot is sent to clash data if that
lecture is not present in output data slot that is if the teacher of that lecture is no available ata that
time
The intention of the algorithm to generate a time-table schedule automatically is satisfied. The
algorithm incorporates a number of techniques, aimed to improve the efficiency of the search
operation. It also, addresses the important hard constraint of clashes between the availability of
teachers. The non-rigid soft constraints i.e. optimization objectives for the search operation are also
effectively handled. Given the generality of the algorithm operation, it can further be adapted to
more specific scenarios, e.g. University, examination scheduling and further be enhanced to create
railway time tables. Thus, through the process of automation of the time-table problem, many anhours of creating an effective timetable have been reduced eventually. The most interesting future
direction in the development of the algorithm lies in its extension to constraint propagation. When
there is a value assigned to a variable, such assignment can be propagated to unassigned variables to
prohibit all values which come into conflict with the current assignments. The information about
such prohibited value.
usage of Genetic Algorithms (GAs) for finding optimal solutions to the problem of Class Timetable.
It is seen that the GA could be improved by the further incorporation of repair strategies, and is
readily scalable to the complete timetabling problem. The system at present does not take care of
other constraints like unavailability of lecturers, small size of rooms and time required by the
lecturer to move from one class timetable is used at the dept.
WHATS NEW
Breeding Timetables
Timetables are randomly selected from the population and used for breeding. No favouritism is
given to fitter timetables. A child timetable is bred by performing unity order based crossover on the
parents. This means that each parent has an equal chance of providing each gene.
9) Use of Active Rules and Genetic Algorithm to Generate the automatic Time-Table
Bharkha Narang Ambika and Rashmi Bansal
Year-2013
International Conference on Emerging Trends in Engineering and Management
SUMMARY
This document proposes an optimized technique to automate time table
generation system. Time table generation system involves various challenging
constraints of resources including faculties, rooms, time slots etc. The roposed
technique filters out the best of active rules and
Genetic algorithm to generate the optimized solution. Genetic Algorithm and
Active Rules together form a complete sphere for developing a system, which
needs to satisfy various constraints. Active Rules provide event-conditionaction model for the implementation of any rule based system. In genetic
algorithm every individual are characterized by a fitness
function. After analysis if there is higher fitness then it means better solution
and then after based on their fitness, parents are selected to reproduce
offspring for a new generation where fitter individuals have more chance to
reproduce. The objective of the work is to create a model used to generate the
acceptable schedule using probabilistic operators.
even after being such an important area ,mostly because of complexity of the problem scheduling is
done manually ,so to help big organisation for there such important task ,it is important to design a
proper algorithm so that a lot of time can be saved .
5.1.2) DEFINATION
Timetable Scheduling Problems are particularly challenging for Artificial Intelligence and
22
Operations Research techniques. They are problems of time-based planning and combinatorial
optimization that tend to be solved with a cooperation of search and heuristics, which usually lead
to satisfactory but sub-optimal solutions. There are many kinds of timetable scheduling problems in
the daily life, such as examination, lecture, transportation timetables. In general, there are several
common difficulties in these kinds of problems:
complete problems.
It is very difficult to design effective heuristics; Advanced search techniques using various
heuristics to prune the search space will not be guaranteed to find an optimal solution.
A general algorithmic approach to a problem may turn out to be inapplicable; certain
In a timetable-scheduling problem, events, for example exam subjects, must be slotted to certain
times which satisfy several of constraints.
Knowledge-based and OR-based approaches to solving such problems are hard to develop, are often
slow and can be inflexible because the architecture itself was based on specific assumptions about
the nature of the problem. Constraint satisfaction techniques have been used to solve hard
constraints; however, it is more difficult to handle soft constraints such as preferences. Most often
people still resort to handcrafted solutions starting from an easier solution and making a sequence of
modifications to cater for changed requirements. This typically leads to suboptimal solutions that
bring significant organizational or financial penalties. [ 13 developed a Genetic Algorithm (GA)
based timetable system
which has been successfully used by a university.
3.1.1.3) SCOPE
3.1.1.4) OVERVIEW
In the last few years, colleges and universities around the world are expanding enrollment in order
to develop more high-quality personnel, various countries' educational reform is also thorough
unceasingly. The essence of course scheduling question is the curriculum, the teacher and the
student should be assigned in the appropriate time section to the appropriate classroom. It is a multiobjective scheduling problem which involve more factors, and known as the Time table Problem in
operations research (Time table Problem called TTP). Automated Course Scheduling algorithm,
TTP, was proved to be NP-complete problem as early as in the 70s. The computing time is
exponential increase, and integration time and space as dual constraints. From classroom (space)
point of view it is similar to the binpacking problem. But increased many restraints in the time. So it
is a more complex problem than the bin-packing problem. We can establish theoretical profundity
from this thesis. At present, in mathematics did not have an general algorithm to be able to solve the
NP complete problem well. Solving the NP complete problem only to be able to depend on the
approximate method, many scholars have conducted the research regarding this.
3.1.1.5 Contact information/SRS team members
Vibhanshu wadhwa ( enrol 10503854)
24
Provide a good algorithm to our audience so that they can generate a helpful time table with
3.1.2.3)user characteristics
25
INPUT AND STORAGE: program will take all the input from the user and will save it in its
will calculate the fitness functions of the solutions and will sort them in increasing
APPLYING GENETIC ALGORITHM THROGH MUTATION: them by using fitness score
program will apply genetic algorithm or its improved version to create best possible solution
Operating environment
26
HARD CONSTRAINS
These are the constrains that must be followed during the coding. and without satisfying these
constrains solution is not valid. They are listed as follows:
SOFT CONSTRAINS
These are the constrains that are not compulsory for a solution to follow ,but quality of the time
table is decided by accomplishment of these constrains
These are listed as follow.
In time table of teacher more 1 hours breaks are preffered then 2or 3 or more hours break
In students time table we have to try to reduce the no. of breaks during a day,so that they
hour a week
No preferences are allowed for any teacher
3.2 Functional requirements
Page should be available on the internet for the user
Page should query about if user want to make the time-table
Option about exiting should always be there
Program should be able to take input about teacher and store it
Program should be able to check if no. of teachers doesnt over flow and if they do then it
28
accordingly.
Then it should be able to provide options about reducing batches or increasing the teachers
Program should be able to check if no. of teachers are sufficient for amount of batches by
high Number of acceptable solution should be available ,so that user can choose from
how to use it
computation of time table should be fast
resources used for computation should be least as possible
algorithm should be efficient
3.3.2)Operating constraints
3.3.5) portability
As basic software are used like c++ and html software will be portable
3.5 Design Diagrams
3.5.1Use Case diagrams
30
31
32
33
34
35
36
37
38
Data is read from the text file and stored in the arrays
Batch
Subject
Teach_sub
Batch _sub
Final
Batch
B1
B2
B4
..
Teacher
T1
T2
T3
..
subject
S2
S2
S1
..
..
..
..
25
..
..
..
.
39
.
75
.
Here we will try to make valid teacher subject-batch pairs, Following are the constrains which
must be followed
Teacher should get the classes only for the subjects it teaches
Possibility that no teacher left for teaching a particular subject, since all existing teachers
have been allocated a class
Scope for remove few teachers ,as even without them all the classes can be allocated easily
First Index
= number of days
40
= number of rooms
In this case:
Number of days
=5
=6
So this array have 5*8*6 slots,which is equals to 240 elements,as shown below
So if there are n values in array final, we have to allocate n value to these 240 slots
N<=240
There are two methods to do this
1) Random allocation
2) Arrow method
After we choose a random arrow, we try to fill all the slot of the arrow, by finding valid
values in the final array
42
CROSSOVER
43
Fitness Function
This is the function that will decide the quality of the time table that are created by putting penality
on each soft constrains accordingly .lesser the penalty better is the quality of the time table.
Fitness = 1/Penalty
Penalty for each soft constrains is as follows
1) For teachers time table 1 hour break is preferred over 2 or 3 hour breaks .so penality for
each break for n hours will be (n-1)^2 i.e. (n-1)*(n-1)
This implies
3 hours penalty of 9
2hours - penalty of 4
2) For each break of n hours of student penalty is (n+1)^3
This implies
2 hour break penalty of 8
3 hours break penalty of 27
44
Day/Time T1
Mon
T2
Class1
Tue
T3
T4
T5
Class2
T7
T8
Class3
Class4
Wed
Class5
Thur
Class8
Fri
Class10
Sat
Class13
Class6
Class7
Class9
Class11
Class12
Calculating Penalty
T6
penalty on Tuesday
Penalty=50
As there is only one class on that day
If (bu==0)
store it in unallocated array
}
Empty_space()
{
For k= 0 to roommax
If(there is any unallocated space)
Return 1
}
Breaker()
{
For (k=0 to roomax)
Check if that teacher and batch already have any class on arr[day][time][k]
If (yes)
Return 0
Else
Return 1
}
Backup()
{
Traverse the whole tt serially ,given day*time be the starting point
Es=Empty_space()
If(es==1)
Br = Breaker()
If(br==0)
Return 0
Else if(br==1)
Return 1
}
Arrow algorithm
Out of day*time arrow choose them randomly until data is finised or no arrow left
For (k=0 to roommax)
For(i=0 to n)
46
Mutation
take the best solution
for (i=0 to n)
6
47
Risk
Id
Pro
bab
ility
(P)
Impac
t (I)
RE
(P*
I)
While
creating
random
solution
possibility
is large
diversity
of solution
are not
selected
Instead of
going
toward
maxima
due to
crossover
and
mutation
which are
random
,quality of
the
solution
decrease
Algorithmic
Algorithmic
Even
though
algorithm
converges
towards
maxima
,but its
local
maxima
and not
global
maxima
Algorithmic
Algorithm
is
convergin
g toward
global
Algorithmic
Mitigati
on Plan
if 8 is Y
Risk
Selecte
d
for
Mitigat
i
on
(Y/N)
Y
Uniform
crossover can
be used
,which doent
change the
couloms
which are
same for both
the parents
,so that no
new conflict
is added
Use tabu
search to
increase the
diversity that
is tabu search
can expand
ability of
solution to
reach global
maxima
During the
process best
solution is
kept safe that
is many
48
Crossover
between
different
solution is
used along
with mutation
to increase
the diversity
Conti
nge
ncy
plan ,
if
any
maxima
but during
mutation
or
crossover,
it
somehow
change the
best
solution
for less
better
solution
copies of best
solution are
made ,so that
even when
few copies
are used for
mutation and
crossover, we
still have best
solution for
future
comparison
Program is algorithmic
running
for a very
long time
if solution
doesnt
converges
,which
might
result in
memory
overflow
User
User-input
might
make
mistake
during
input of
the
data,that is
for
example
user might
write
physics
as
phisics .
then these
will be
taken as
two
different
subject
even when
user didnt
49
Multiple
termination
conditions
are applied
,based on
time as well
no. of
iteration
whichever is
received first
intend that
7
User
might add
repeated
data ,that
is user
might add
name of
one
reacher
twice and
during the
computati
on more
that
maximum
number of
classes
will be
added for
that teaher
User-input
Storage
hardware
overflow,
as a large
amount of
storage is
required
for
computati
on ,if
software is
being run
on old
machine
,it might
not allow
to declare
data
structure
of that
high
storage
capacity
Even
when
hardware
50
terminatio
n is
defined
properly,if
sorware
tried to
run on
machine
with low
computati
on power ,
it will take
a lot of
time to
execute
and might
even hang
the system
Type of Test
Will Test Be
Comments/Explanations
Performed?
51
Software Component
Requirements
Testing
YES
Unit Testing
YES
Integration
Testing
YES
52
Performance
Testing
YES
Performance of Concerted
is taken for multivariate
queries and compared.
Stress Testing
YES
Compliance
Testing
NO
Not performing.
interoperability.
We do not require this testing as there
are no fixed standards in our project
work area we basically strive for user
satisfaction.
Consistency
Testing
YES
Performing
Load Testing
YES
Needs to be performed on
whole application.
YES
54
Type of
Testing
Required
Unit
Unit
Volume
Stress
Stress
Unit
Consistency
Input
expected Output
2
3
4
5
Increased performance
of the huiristic
55
Status
Pass/Fail
pass
pass
Fail
Fail
pass
Subjective
Correct
output,robustness
pass
5.4)
Error and Exception Handling
Test case id
3
4
5.5)
Limitations of the solution
Not useful if lectures are of multiple duration
There may be an existing solution ,but might not be able to find it
Running time is not polynomial
May not give you the most optimal solution
May stuck into local optima
Findings & Conclusion
6.1 Findings
The initial scheduling problem with large number of binary variables has been reduced to
the acceptable size by eliminating certain dimensions of the problem and encorporating those
dimensions into constraints. The grouping of several binary variables into one gene value
significantly reduced the individual size. Now it is possible to try to solve the full size problem
(problem of the whole FER schedule) with genetic algorithm approach. Such a
representation of the scheduling problem achieves the acceptable algorithm speed, so
small size problems are solved in tens of seconds. Significant improvements have been achieved by
using intelligent operators. The intelligent algorithm converges much faster then
the basic algorithm and represents a good starting point for complete solving of the full
scale problem. Genetic algorithm with basic operators used random genes for its operations and
was not directed to a solution. Adding intelligence to the operators by finding genes
with less conflicts improved algorithms behavior and overall solution of the problem.
To completely solve the full scale problem, further algorithms improvements will have to be
made. When generating the constraints, it could be useful to sign each one, so no constraint will be
set (and checked) twice. Individuals should be generated in such way that classes which are more
difficult to schedule occupy the front genes of an individual, while classes easier to schedule should
occupy the back genes. This would be useful for intelligent crossover operator, which sets and
checks the conflicts from front to back of the individual. Also, a parallel computing approach
should be tried, so checking space of the problem could be widened. Each thread could start with
different initial population and the quality of solution is expected to be better.
56
Need of new algorithm and its comparison with the old one
Old algorithm due to its allotment of classes in random slots results in diversity
Which results in incomplete allotment of the of the classes
Even though there exists a solution ,old algorithm was not able find that
Its advantage was fast execution
Now new algorithm(arrow system) take comparatively more time
But its most robust
Provide complete solution ,even for the big data set
Complexity is greater
Below are the few comparison of the algorithm
Data set=67
Operating system : Ubuntu 14.04
Application: g++ compiler
Processor: inter core i5 2.3 ghz
Ram: 4gb
Algorithm 1is new algorithm (arrow algorithm)
Algorithm 2 is pure genetic algorithm
y-axis is heuristic value
x-axis is no. of mutation
57
58
The combination of the algorithm proved out to be better instead of using only 1 algorithm, when
we used combinations of 2 or more algorithm ,results gets better.
As it is shown below instead of using mutation of tabu search alone ,combing them in equal
proportion gave better fitness value
59
Tabu vs mutation
6.2 Conclusion
Genetic search algorithm has been validated in the test and achieved good results. Genetic search
algorithm is a more practical method, convergence is fast, and time distributes uniform. But in
practice conditions may not be terminated, the purpose is to provide different possible solutions in
order for users to choose. However, if the constraint conditions are too harsh, there may be no
feasible solution, in such case, human intervention is necessary. Course scheduling problem is a
multidisciplinary hard problems, this article attempt genetic algorithm only on the field of course
scheduling, the encoding of genetic algorithms and parameter settings needed to be improved and
explored, the effect on the algorithm need be improved in further.
6.3 Future Work
60
It is area of great interest for algorithmist to tackle time-table scheduling problems as not only
required by vast organisations but also give them opportunity to tackle NPhard problems
IT IS REQURED IN :
CHALLENGES
It is area of great interest for algorithmist to tackle time-table scheduling problems as not only
required by vast organisations but also give them opportunity to tackle NPhard problems
Even if time-table scheduling have vast number of uses around the world,still in most of the cases it
is done manually and softwares are not being used. Following are the reasons:
NPhard problem ,and completely efficient solutions are impossible to find.
Classical algorithm like backtracking just doesnt work ,may even result in space/time over
flow
Scheduling through heuristic searches also takes a lot of time and space,but still there is
some hope
Algorithms are really complex and are really hard to impement
Even then no guarantee of efficient solutions exists
Till date at least 10 -15 IEEE paper has been published for scheduling problems but no
specific algorithm have been chosen world-wide by every community
Different algorithmist uses different set of combination to satisfy there and their
organisations need.
It is an on-going and hot topic for present day community to find an standard approach for
time table scheduling
61
References
[1]Algorithms of Time table Problem Application and Performance Evaluation in Course
Scheduling System, Yunfeng Dong1, Bei Qi2, Wushi Gao1, Qingzhu Wang1,Shandong Polytechnic
University, Jinan, China,IEEE-2011
[2]Genetic Algorithms vs. Tabu Search in Timetable Scheduling, S. C. Chu*B
National Kaohsiung Institute of Technology, Taiwan, R.O.C., *University of South Australia,
H. L. Fang , AI Application Group,E. & C. Dept, China Steel Corp, Taiwan, ROC,
1999 Third International Conference on Knowledge-Based Intelligent Information Engineeing
Systems, 31" Aug-I" Sept 1999, Adelaide, Australia
[3]Solving Timetable Scheduling Problem Using Genetic Algorithms , Branimir Sigl, Marin Golub,
Vedran Mornar,Faculty of Electrical Engineering and Computing, University of Zagreb Unska 3,
I0000 Zagreb, Croatia, 25th Int. Conf. 'Information Technology Interfaces IT1 2003, June 161 9, 2003, Cavtat, Croatia
[4]Timetable Scheduling Using Particle Swarm Optimization,Shu-Chuan Chu, YiTin Chen
Department of Information Management,Cheng-Shiu University, Jiun-Huei Ho,
Department of Electronic Engineering, Cheng-Shiu University, Proceedings of the
First International Conference on Innovative Computing, Information and Control
(ICICIC'06)
[5]University Time Table Scheduling using Genetic Artificial Immune Network,Antariksha
62
Vibhanshu
Email id: vibhanshu.wadhwa@gmail.com
Ph: 9013373373 (M)
OBJECTIVE:
Aspiring to work in a good development environment that put my abilities to challenge and create value for the
organization while contributing to my personal and professional growth.
EDUCATIONAL QUALIFICATIONS:
Bachelor of Engineering in Computer Science ( 2010-2013) with 69% (till 3rd year) from Jaypee Institute of
Information Technology, Noida , U.P
XIIth with 78.6%
ASN Senior Secondary School (CBSE)
Xth with 76.6%
Kendriya Vidyalaya Noida (CBSE)
TECHNICAL SKILLS:
63
PERSONAL SKILLS:
HOBBIES:
Listening Music.
Interacting with people.
Playing table-tennis, Volleyball and many outdoor sports.
PERSONAL DETAILS:
Fathers Name
Date of Birth
Sex
Marital Status
Nationality
Languages Know
:
:
:
:
:
:
DECLARATION:
I hereby declare that the information given above are true and to the best of my knowledge and belief.
Vibhanshu
64