SlideShare uma empresa Scribd logo
1 de 11
A GENETIC ALGORITHM APPROACH TO STATIC JOB
              SHOP SCHEDULING




                                  ABSTRACT
      Higher production rates may be achieved by the use of highly mechanized or
computerized machinery which involves not only the higher production costs but also
higher maintenance. It’s a challenge for a production engineer to perform the same
activity within the same possible time with much cheaper equipment. The brain storming
activity of assigning the jobs to the machines so as to achieve his target all lies in his
ability of scheduling the jobs. With the arrival of different kinds of jobs having different
job sequences, it’s a tedious task to organize such lot. In this work an attempt has been
made to apply the prevalent techniques of genetic algorithms to the static job shop
scheduling.

INTRODUCTION
     Scheduling, in the context of manufacturing is a process of assigning the start and
completion times of operations on various jobs on various machines. A flow shop is
characterized by, more or less, continuous and uninterrupted flow of jobs through
multiple machines in series. In such a shop, the flow of work is unidirectional since all
jobs follow the same technological routing through all the machines. But in the real time
situations the scenario is completely different. The jobs arriving could not only be of
different sizes but also may have different job sequences. In such situations the priorities
of assigning the jobs plays an important role. The jobs are allotted in a sense not only
taking the dispatch time into consideration but also the optimum completion time. . The
job shop scheduling problem is defined as follows
       Given ‘n’ jobs to be processed on ‘m’ machines in a different technological order,
the processing time of job ‘ i ‘ on machine j being P ij (i = 1,2,3,………,n and j = 1,2,
…..n), the optimal sequence which consumes the least possible time is to be selected. The
present paper aims at finding the optimal order (sequence) in which the ‘n’ jobs should be
processed on each of the ‘m’ machines to minimize a well defined measure of
performance. In this attempt Genetic algorithms are used as a tool for achieving this
optimality.

GENETIC ALGORITHMS – AN OPTIMIZING TOOL
    Genetic algorithms are inspired by Darwin's theory of evolution. Solution to a
problem solved by genetic algorithms uses an evolutionary process (it is evolved).
Algorithm begins with a set of solutions (represented by chromosomes) called
population. Solutions from one population are taken and used to form a new population.
This is motivated by a hope, that the new population will be better than the old one.
Solutions which are then selected to form new solutions (offspring) are selected
according to their fitness - the more suitable they are the more chances they have to
reproduce.

Chromosome
     All living organisms consist of cells. In each cell there is the same set of
chromosomes. Chromosomes are strings of DNA and serve as a model for the whole
organism. A chromosome consists of genes, blocks of DNA. Each gene encodes a
particular protein. Basically, it can be said that each gene encodes a trait, for example
color of eyes. Possible settings for a trait (e.g. blue, brown) are called alleles. Each gene
has its own position in the chromosome. This position is called locus.
        Complete set of genetic material (all chromosomes) is called genome. Particular
set of genes in genome is called genotype. The genotype is with later development after
birth base for the organism's phenotype, its physical and mental characteristics, such as
eye color, intelligence etc.

Encoding of a chromosome
      A chromosome should in some way contain information about solution that it
represents. The most used way of encoding is a binary string. A chromosome then could
look like this:

                           Chromosome 1 1101100100110110
                           Chromosome 2 1101111000011110

Each chromosome is represented by a binary string. Each bit in the string can represent
some characteristics of the solution. Another possibility is that the whole string can
represent a number.

Of course, there are many other ways of encoding. The encoding depends mainly on the
solved problem. For example, one can encode directly integer or real numbers;
sometimes it is useful to encode some permutations and so on.

Mutation
After a crossover is performed, mutation takes place. Mutation is intended to prevent
falling of all solutions in the population into a local optimum of the solved problem.
Mutation operation randomly changes the offspring resulted from crossover. In case of
binary encoding we can switch a few randomly chosen bits from 1 to 0 or from 0 to 1.
Mutation can be then illustrated as follows:


                        Original offspring 1 1101111000011110
                        Original offspring 2 1101100100110110
                        Mutated offspring 1 1100111000011110
                        Mutated offspring 2 1101101100110110

The technique of mutation (as well as crossover) depends mainly on the encoding of
chromosomes. For example when we are encoding permutations, mutation could be
performed as an exchange of two genes.

Crossover and mutation probability

There are two basic parameters of GA - crossover probability and mutation probability.

Crossover probability: how often crossover will be performed. If there is no crossover,
offspring are exact copies of parents. If there is crossover, offspring are made from parts
of both parent's chromosome. If crossover probability is 100%, then all offspring are
made by crossover. If it is 0%, whole new generation is made from exact copies of
chromosomes from old population (but this does not mean that the new generation is the
same!).
Crossover is made in hope that new chromosomes will contain good parts of old
chromosomes and therefore the new chromosomes will be better. However, it is good to
leave some part of old population survive to next generation.

Mutation probability: how often parts of chromosome will be mutated. If there is no
mutation, offspring are generated immediately after crossover (or directly copied)
without any change. If mutation is performed, one or more parts of a chromosome are
changed. If mutation probability is 100%, whole chromosome is changed, if it is 0%,
nothing is changed.

Mutation generally prevents the GA from falling into local extremes. Mutation should
not occur very often, because then GA will in fact change to random search.

Other parameters

There are also some other parameters of GA. One another particularly important
parameter is population size.

Population size: how many chromosomes are in population (in one generation). If there
are too few chromosomes, GA has few possibilities to perform crossover and only a
small part of search space is explored. On the other hand, if there are too many
chromosomes, GA slows down. Research shows that after some limit (which depends
mainly on encoding and the problem) it is not useful to use very large populations
because it does not solve the problem faster than moderate sized populations.

Parameters of GA

   •   Crossover rate
       Crossover rate should be high generally, about 80%-95%. (However some results
       show that for some problems crossover rate about 60% is the best.)
   •   Mutation rate
       On the other side, mutation rate should be very low. Best rates seems to be about
       0.5%-1%.
   •   Population size

       It may be surprising, that very big population size usually does not improve
       performance of GA (in the sense of speed of finding solution). Good population
       size is about 20-30, however sometimes sizes 50-100 are reported as the best.
       Some research also shows, that the best population size depends on the size of
encoded string (chromosomes). It means that if you have chromosomes with 32
       bits, the population should be higher than for chromosomes with 16 bits.

   •   Selection
       Basic roulette wheel selection can be used, but sometimes rank selection can be
       better. There are also some more sophisticated methods that change parameters of
       selection during the run of GA. Basically, these behave similarly like simulated
       annealing. Elitism should be used for sure if you do not use other method for
       saving the best found solution.
   •   Encoding
       Encoding depends on the problem and also on the size of instance of the
       problem.

Search space

If we are solving a problem, we are usually looking for some solution which will be the
best among others. The space of all feasible solutions (the set of solutions among which
the desired solution resides) is called search space (also state space). Each point in the
search space represents one possible solution. Each possible solution can be "marked" by
its value (or fitness) for the problem. With GA we look for the best solution among
among a number of possible solutions - represented by one point in the search space.

Looking for a solution is then equal to looking for some extreme value (minimum or
maximum) in the search space. At times the search space may be well defined, but
usually we know only a few points in the search space. In the process of using GA, the
process of finding solutions generates other points (possible solutions) as evolution
proceeds.
Example of a search space

The problem is that the search can be very complicated. One may not know where to look
for a solution or where to start. There are many methods one can use for finding a
suitable solution, but these methods do not necessarily provide the best solution. Some
of these methods are hill climbing, tabu search, simulated annealing and the genetic
algorithm. The solutions found by these methods are often considered as good solutions,
because it is not often possible to prove what the optimum is.

A GA-BASED SCHEDULING SYSTEM --THE APPROACH FOR STATIC JSSPs

       The proposed approach to dynamic JSSPs is based on our original GA-based
scheduling system devised for static JSSPs. Here approach for static JSSPs is briefly
explained. Each individual is a direct representation which encodes for each operation (in
index order) its starting time in a feasible schedule. The number of fields on the
chromosome is the number of operations. Such a direct representation doesn’t suffer from
the problem of false competition-- different representations of the same schedule
competing against one another -- which is found in some indirect representation schemes.
Another advantage in the direct representation is the ease of encoding the schedule into
the chromosome. In some indirect representations, such as prioritization of scheduling
rules, it is difficult to encode the schedule back to the chromosome. This advantage is
more important in our approach because the genetic operators we designed work on the
schedule level and the modified schedules need to be encoded back to the chromosomes.
The genetic operators are inspired by the Giffler and Thompson (G&T) algorithm. The
G&T algorithm is a systematic approach to generate active schedules, in which no
operations can be completed earlier without delaying other operations.
The Giffler and Thompson Algorithm
Step 1:
Let C contain the first schedulable operation of each job;
Let rjm = 0, for all operations (j, m) in C.
Step 2:
Compute t(C) =            min         {rjm + pjm}
                    ( j, m )∈ C
and let m* denote the machine on which the minimum is achieved.
Step 3:
Let G denote the conflict set of all operations (j, m*) on machine m* such that rjm* < t(C)
Step 4:
Randomly select one operation from G and schedule it.
Step 5:
Delete the operation from C; include its immediate successor in C, update rjm in C and
return to step 2 until all operations are scheduled.

       Basically, the G&T algorithm is used as an interpreter to decode any offspring
into an active schedule. At each decision point in the G&T algorithm (step 4), the
operation with the earliest starting time reported in the parental schedule is chosen to be
scheduled next. In contrast to previous approaches, which work on the chromosome
level, the designed time horizon exchange (THX) crossover works on the schedule level.
THX crossover randomly selects a crossover point just like a standard crossover, but
instead of using the crossover point to exchange two chromosomes, THX crossover uses
the crossover point as a scheduling decision point mark in the G&T algorithm to
exchange information between two schedules. Before the decision point mark, the
temporal relations among operations are inherited from one parent. In the remaining
portion, the temporal relations are inherited from the other parent to the extent possible
(i.e., while maintaining a valid schedule). The mutation operator randomly selects two
operations in the block -- a sequence of successive operations on the critical path which
are on the same machine with at least two operations. These two operations are reversed.
After the mutated child is generated, the G&T algorithm is applied to interpret the child.



CONCLUSION
   •   The experimental results show that significant improvement over priority rule
       approaches was achieved for both deterministic and stochastic JSSPs using a
       genetic algorithm approach.
•   A consistent superiority shows the robustness of the GA to the objective
       functions.
   •   The selection of a different and appropriate scheduling rule improves the system
       performance under different manufacturing environments.


ACKNOWLEDGEMENTS
    We express our deep sense of gratitude to Dr.B.V.RAMANA MURTY professor
and head of the Mechanical department of Raghu engineering college Visakhapatnam for
his inspiring and esteemed guidance and support for preparing this paper
REFERENCES

[1] Adams, J., Balas, E., and Zawack, D. “The Shifting Bottleneck Procedure in Job Shop
Scheduling,” Management Science, vol. 34, pp. 391-401, 1988.
[2] Bierwirth, C., Kropfer, H., Mattfeld, D.C., and Rixen, I., “Genetic Algorithm based
Scheduling in a Dynamic Manufacturing Environment,” IEEE Conf. on Evolutionary
Computation, Perth, IEEE Press, 1995.
[3] Davis, L., “Job-shop Scheduling with Genetic Algorithms,” Proc. Int’l Conf. on
Genetic Algorithms and their Applications, pp. 136-149, Lawrence Erlbaum, Hillsdale,
NJ, 1985.
[4] Dorndorf, U. and Pesch, E. “Evolution Based Learning in a Job Shop Scheduling
Environment,” Computers Operations Research, vol. 22, pp. 25-40,1995.
[5] Dorndorf, U. and Pesch, E. “Combining Genetic and Local Search for Solving the Job
Shop Scheduling Problem,” APMOD93 Proc. Preprints, pp. 142-149, Budapest,
Hungary, 1993.
[6] Fang, H., “Genetic Algorithms in Timetabling and Scheduling,” Ph.D. thesis,
Department of Artificial Intelligence, University of Edinburgh, 1994.
[7] Fang, H., Ross, P. and Corne, D., “A Promising Genetic Algorithm Approach to Job-
Shop Scheduling, Rescheduling, and Open-Shop Scheduling Problems,” Proc. Fifth Int’l
Conf. on Genetic Algorithms, pp. 375-382, Morgan Kaufmann, San Mateo, CA, 1993.
[8] Giffler, J. and Thompson, G.L., “Algorithms for Solving Production Scheduling
Problems,” Operations Research, Vol. 8, pp. 487-503, 1960.
[9] Goodman, E. D. An Introduction to GALOPPS, Technical Report GARAGe95-06-01,
Genetic Algorithms Research and Applications Group, Michigan State University, 1995.
[10] Kobayashi, S., Ono, I., and Yamamura, M. “An Efficient Genetic Algorithm for Job
Shop Scheduling Problems,” Proc. Sixth Int’l Conf. on Genetic Algorithms, pp. 506-511,
MorganKaufmann, San Mateo, CA, 1995.
                                       APPENDIX

      The program that has been developed and used in the present work
is given below

#include<stdio.h>
#include<conio.h>
void main()
{int i,k,l,m,n,b,popsize,r,q,t,v[20][20],c[20][20],p[20][20],j[20]
[20],cmax[20];
clrscr();
printf("enter the no. of jobsn");
scanf("%d",&n);
printf("enter the no. of machinesn");
scanf("%d",&m);
for(i=1;i<=n;i++)
for(k=1;k<=m;k++)
{
printf("enter the processing time of job %d on machine %d   ",i,k);
scanf("%d",&p[i][k]);
}
printf("enter the population sizen");
scanf("%d",&popsize);
for(i=1;i<=popsize;i++)
{
printf("enter the job sequence %d",i);
for(k=1;k<=n;k++)
scanf("%d",&j[i][k]);
}

for(t=0;t<30;t++)
{
for(i=1;i<=popsize;i++)
c[j[i][1]][1]=p[j[i][1]][1];

for(i=2;i<=n;i++)
c[j[l][i]][1]=c[j[l][i-1]][1]+p[j[l][i]][1];
for(k=2;k<=m;k++)
c[j[l][1]][k]=c[j[l][1]][k-1]+p[j[l][1]][k];

for(i=2;i<=n;i++)
for(k=2;k<=m;k++)
{
if((c[j[l][i-1]][k])>(c[j[l][i]][k-1]))
b=c[j[l][i-1]][k];
else
b=c[j[l][i]][k-1];
c[j[l][i]][k]=b+p[j[l][i]][k];
}
cmax[l]=c[j[l][n]][m];
}
for(l=1;l<=popsize;l++)
printf("%3d",cmax[l]);


for(l=1;l<popsize;l++)
{
  for(q=l+1;q<=popsize;q++)
  {
    if(cmax[l]<cmax[q])
    {
    r= cmax[q];
    cmax[q]=cmax[l];
    cmax[l]=r;
for(k=1;k<=n;k++)
   {
   v[q][k]=j[q][k];
   } } }}

printf("nthe arranged fx and array are:n");
for(i=1;i<=popsize;i++)
printf("%dn",cmax[i]);
for(i=1;i<=popsize;i++)
{
for(k=1;k<=n;k++)
printf("%2d",j[i][k]);
printf("n");
}

printf("nassigning strong string in place of weak stringnn");
for(k=1;k<=n;k++)
j[1][k]=j[popsize][k];
printf("nprinting the mating poolnn");
for(l=1;l<=popsize;l++)
{
for(k=1;k<=n;k++)
printf("%2d",j[l][k]);
printf("n");
}

printf("nTHE PROCESS OF MUTATIONnn");
for(l=1,q=1;l<popsize;l++,q++)
{
  v[l][q]=j[l][q];
  j[l][q]=j[l][q+1];
  j[l][q+1]=v[l][q];
}
for(l=1;l<=popsize;l++)
{
for(k=1;k<=n;k++)
printf("%2d",j[l][k]);
printf("n");
}

}
getch();
}

Mais conteúdo relacionado

Mais procurados

Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
zamakhan
 
Optimization technique genetic algorithm
Optimization technique genetic algorithmOptimization technique genetic algorithm
Optimization technique genetic algorithm
Uday Wankar
 

Mais procurados (20)

Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
RM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lectureRM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lecture
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
 
Introduction to the Genetic Algorithm
Introduction to the Genetic AlgorithmIntroduction to the Genetic Algorithm
Introduction to the Genetic Algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Introduction to Evolutionary Algorithms
Introduction to Evolutionary AlgorithmsIntroduction to Evolutionary Algorithms
Introduction to Evolutionary Algorithms
 
Ga
GaGa
Ga
 
Genetic programming
Genetic programmingGenetic programming
Genetic programming
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm ppt
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
GENETIC ALGORITHM
GENETIC ALGORITHM GENETIC ALGORITHM
GENETIC ALGORITHM
 
L018147377
L018147377L018147377
L018147377
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
GENETIC ALGORITHM
GENETIC ALGORITHMGENETIC ALGORITHM
GENETIC ALGORITHM
 
Optimization technique genetic algorithm
Optimization technique genetic algorithmOptimization technique genetic algorithm
Optimization technique genetic algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithm
Genetic Algorithm Genetic Algorithm
Genetic Algorithm
 

Semelhante a A genetic algorithm approach to static job shop scheduling

Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
Nipun85
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
Nandhini S
 

Semelhante a A genetic algorithm approach to static job shop scheduling (20)

Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 
AI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.pptAI_PPT_Genetic-Algorithms.ppt
AI_PPT_Genetic-Algorithms.ppt
 
Genetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.pptGenetic-Algorithms-computersciencepptnew.ppt
Genetic-Algorithms-computersciencepptnew.ppt
 
Genetic-Algorithms forv artificial .ppt
Genetic-Algorithms forv artificial  .pptGenetic-Algorithms forv artificial  .ppt
Genetic-Algorithms forv artificial .ppt
 
Genetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.pptGenetic-Algorithms for machine learning and ai.ppt
Genetic-Algorithms for machine learning and ai.ppt
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 
4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt4.Genetic-Algorithms.ppt
4.Genetic-Algorithms.ppt
 
Gadoc
GadocGadoc
Gadoc
 
A Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its ApplicationsA Review On Genetic Algorithm And Its Applications
A Review On Genetic Algorithm And Its Applications
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithm
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Genetic algorithms mahyar
Genetic algorithms   mahyarGenetic algorithms   mahyar
Genetic algorithms mahyar
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Evolutionary computing - soft computing
Evolutionary computing - soft computingEvolutionary computing - soft computing
Evolutionary computing - soft computing
 
Genetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptxGenetic Algorithm 2 -.pptx
Genetic Algorithm 2 -.pptx
 
Advance operator and technique in genetic algorithm
Advance operator and technique in genetic algorithmAdvance operator and technique in genetic algorithm
Advance operator and technique in genetic algorithm
 

A genetic algorithm approach to static job shop scheduling

  • 1. A GENETIC ALGORITHM APPROACH TO STATIC JOB SHOP SCHEDULING ABSTRACT Higher production rates may be achieved by the use of highly mechanized or computerized machinery which involves not only the higher production costs but also
  • 2. higher maintenance. It’s a challenge for a production engineer to perform the same activity within the same possible time with much cheaper equipment. The brain storming activity of assigning the jobs to the machines so as to achieve his target all lies in his ability of scheduling the jobs. With the arrival of different kinds of jobs having different job sequences, it’s a tedious task to organize such lot. In this work an attempt has been made to apply the prevalent techniques of genetic algorithms to the static job shop scheduling. INTRODUCTION Scheduling, in the context of manufacturing is a process of assigning the start and completion times of operations on various jobs on various machines. A flow shop is characterized by, more or less, continuous and uninterrupted flow of jobs through multiple machines in series. In such a shop, the flow of work is unidirectional since all jobs follow the same technological routing through all the machines. But in the real time situations the scenario is completely different. The jobs arriving could not only be of different sizes but also may have different job sequences. In such situations the priorities of assigning the jobs plays an important role. The jobs are allotted in a sense not only taking the dispatch time into consideration but also the optimum completion time. . The job shop scheduling problem is defined as follows Given ‘n’ jobs to be processed on ‘m’ machines in a different technological order, the processing time of job ‘ i ‘ on machine j being P ij (i = 1,2,3,………,n and j = 1,2, …..n), the optimal sequence which consumes the least possible time is to be selected. The present paper aims at finding the optimal order (sequence) in which the ‘n’ jobs should be processed on each of the ‘m’ machines to minimize a well defined measure of performance. In this attempt Genetic algorithms are used as a tool for achieving this optimality. GENETIC ALGORITHMS – AN OPTIMIZING TOOL Genetic algorithms are inspired by Darwin's theory of evolution. Solution to a problem solved by genetic algorithms uses an evolutionary process (it is evolved). Algorithm begins with a set of solutions (represented by chromosomes) called population. Solutions from one population are taken and used to form a new population.
  • 3. This is motivated by a hope, that the new population will be better than the old one. Solutions which are then selected to form new solutions (offspring) are selected according to their fitness - the more suitable they are the more chances they have to reproduce. Chromosome All living organisms consist of cells. In each cell there is the same set of chromosomes. Chromosomes are strings of DNA and serve as a model for the whole organism. A chromosome consists of genes, blocks of DNA. Each gene encodes a particular protein. Basically, it can be said that each gene encodes a trait, for example color of eyes. Possible settings for a trait (e.g. blue, brown) are called alleles. Each gene has its own position in the chromosome. This position is called locus. Complete set of genetic material (all chromosomes) is called genome. Particular set of genes in genome is called genotype. The genotype is with later development after birth base for the organism's phenotype, its physical and mental characteristics, such as eye color, intelligence etc. Encoding of a chromosome A chromosome should in some way contain information about solution that it represents. The most used way of encoding is a binary string. A chromosome then could look like this: Chromosome 1 1101100100110110 Chromosome 2 1101111000011110 Each chromosome is represented by a binary string. Each bit in the string can represent some characteristics of the solution. Another possibility is that the whole string can represent a number. Of course, there are many other ways of encoding. The encoding depends mainly on the solved problem. For example, one can encode directly integer or real numbers; sometimes it is useful to encode some permutations and so on. Mutation
  • 4. After a crossover is performed, mutation takes place. Mutation is intended to prevent falling of all solutions in the population into a local optimum of the solved problem. Mutation operation randomly changes the offspring resulted from crossover. In case of binary encoding we can switch a few randomly chosen bits from 1 to 0 or from 0 to 1. Mutation can be then illustrated as follows: Original offspring 1 1101111000011110 Original offspring 2 1101100100110110 Mutated offspring 1 1100111000011110 Mutated offspring 2 1101101100110110 The technique of mutation (as well as crossover) depends mainly on the encoding of chromosomes. For example when we are encoding permutations, mutation could be performed as an exchange of two genes. Crossover and mutation probability There are two basic parameters of GA - crossover probability and mutation probability. Crossover probability: how often crossover will be performed. If there is no crossover, offspring are exact copies of parents. If there is crossover, offspring are made from parts of both parent's chromosome. If crossover probability is 100%, then all offspring are made by crossover. If it is 0%, whole new generation is made from exact copies of chromosomes from old population (but this does not mean that the new generation is the same!). Crossover is made in hope that new chromosomes will contain good parts of old chromosomes and therefore the new chromosomes will be better. However, it is good to leave some part of old population survive to next generation. Mutation probability: how often parts of chromosome will be mutated. If there is no mutation, offspring are generated immediately after crossover (or directly copied) without any change. If mutation is performed, one or more parts of a chromosome are
  • 5. changed. If mutation probability is 100%, whole chromosome is changed, if it is 0%, nothing is changed. Mutation generally prevents the GA from falling into local extremes. Mutation should not occur very often, because then GA will in fact change to random search. Other parameters There are also some other parameters of GA. One another particularly important parameter is population size. Population size: how many chromosomes are in population (in one generation). If there are too few chromosomes, GA has few possibilities to perform crossover and only a small part of search space is explored. On the other hand, if there are too many chromosomes, GA slows down. Research shows that after some limit (which depends mainly on encoding and the problem) it is not useful to use very large populations because it does not solve the problem faster than moderate sized populations. Parameters of GA • Crossover rate Crossover rate should be high generally, about 80%-95%. (However some results show that for some problems crossover rate about 60% is the best.) • Mutation rate On the other side, mutation rate should be very low. Best rates seems to be about 0.5%-1%. • Population size It may be surprising, that very big population size usually does not improve performance of GA (in the sense of speed of finding solution). Good population size is about 20-30, however sometimes sizes 50-100 are reported as the best. Some research also shows, that the best population size depends on the size of
  • 6. encoded string (chromosomes). It means that if you have chromosomes with 32 bits, the population should be higher than for chromosomes with 16 bits. • Selection Basic roulette wheel selection can be used, but sometimes rank selection can be better. There are also some more sophisticated methods that change parameters of selection during the run of GA. Basically, these behave similarly like simulated annealing. Elitism should be used for sure if you do not use other method for saving the best found solution. • Encoding Encoding depends on the problem and also on the size of instance of the problem. Search space If we are solving a problem, we are usually looking for some solution which will be the best among others. The space of all feasible solutions (the set of solutions among which the desired solution resides) is called search space (also state space). Each point in the search space represents one possible solution. Each possible solution can be "marked" by its value (or fitness) for the problem. With GA we look for the best solution among among a number of possible solutions - represented by one point in the search space. Looking for a solution is then equal to looking for some extreme value (minimum or maximum) in the search space. At times the search space may be well defined, but usually we know only a few points in the search space. In the process of using GA, the process of finding solutions generates other points (possible solutions) as evolution proceeds.
  • 7. Example of a search space The problem is that the search can be very complicated. One may not know where to look for a solution or where to start. There are many methods one can use for finding a suitable solution, but these methods do not necessarily provide the best solution. Some of these methods are hill climbing, tabu search, simulated annealing and the genetic algorithm. The solutions found by these methods are often considered as good solutions, because it is not often possible to prove what the optimum is. A GA-BASED SCHEDULING SYSTEM --THE APPROACH FOR STATIC JSSPs The proposed approach to dynamic JSSPs is based on our original GA-based scheduling system devised for static JSSPs. Here approach for static JSSPs is briefly explained. Each individual is a direct representation which encodes for each operation (in index order) its starting time in a feasible schedule. The number of fields on the chromosome is the number of operations. Such a direct representation doesn’t suffer from the problem of false competition-- different representations of the same schedule competing against one another -- which is found in some indirect representation schemes. Another advantage in the direct representation is the ease of encoding the schedule into the chromosome. In some indirect representations, such as prioritization of scheduling rules, it is difficult to encode the schedule back to the chromosome. This advantage is more important in our approach because the genetic operators we designed work on the schedule level and the modified schedules need to be encoded back to the chromosomes. The genetic operators are inspired by the Giffler and Thompson (G&T) algorithm. The G&T algorithm is a systematic approach to generate active schedules, in which no operations can be completed earlier without delaying other operations.
  • 8. The Giffler and Thompson Algorithm Step 1: Let C contain the first schedulable operation of each job; Let rjm = 0, for all operations (j, m) in C. Step 2: Compute t(C) = min {rjm + pjm} ( j, m )∈ C and let m* denote the machine on which the minimum is achieved. Step 3: Let G denote the conflict set of all operations (j, m*) on machine m* such that rjm* < t(C) Step 4: Randomly select one operation from G and schedule it. Step 5: Delete the operation from C; include its immediate successor in C, update rjm in C and return to step 2 until all operations are scheduled. Basically, the G&T algorithm is used as an interpreter to decode any offspring into an active schedule. At each decision point in the G&T algorithm (step 4), the operation with the earliest starting time reported in the parental schedule is chosen to be scheduled next. In contrast to previous approaches, which work on the chromosome level, the designed time horizon exchange (THX) crossover works on the schedule level. THX crossover randomly selects a crossover point just like a standard crossover, but instead of using the crossover point to exchange two chromosomes, THX crossover uses the crossover point as a scheduling decision point mark in the G&T algorithm to exchange information between two schedules. Before the decision point mark, the temporal relations among operations are inherited from one parent. In the remaining portion, the temporal relations are inherited from the other parent to the extent possible (i.e., while maintaining a valid schedule). The mutation operator randomly selects two operations in the block -- a sequence of successive operations on the critical path which are on the same machine with at least two operations. These two operations are reversed. After the mutated child is generated, the G&T algorithm is applied to interpret the child. CONCLUSION • The experimental results show that significant improvement over priority rule approaches was achieved for both deterministic and stochastic JSSPs using a genetic algorithm approach.
  • 9. A consistent superiority shows the robustness of the GA to the objective functions. • The selection of a different and appropriate scheduling rule improves the system performance under different manufacturing environments. ACKNOWLEDGEMENTS We express our deep sense of gratitude to Dr.B.V.RAMANA MURTY professor and head of the Mechanical department of Raghu engineering college Visakhapatnam for his inspiring and esteemed guidance and support for preparing this paper REFERENCES [1] Adams, J., Balas, E., and Zawack, D. “The Shifting Bottleneck Procedure in Job Shop Scheduling,” Management Science, vol. 34, pp. 391-401, 1988. [2] Bierwirth, C., Kropfer, H., Mattfeld, D.C., and Rixen, I., “Genetic Algorithm based Scheduling in a Dynamic Manufacturing Environment,” IEEE Conf. on Evolutionary Computation, Perth, IEEE Press, 1995. [3] Davis, L., “Job-shop Scheduling with Genetic Algorithms,” Proc. Int’l Conf. on Genetic Algorithms and their Applications, pp. 136-149, Lawrence Erlbaum, Hillsdale, NJ, 1985. [4] Dorndorf, U. and Pesch, E. “Evolution Based Learning in a Job Shop Scheduling Environment,” Computers Operations Research, vol. 22, pp. 25-40,1995. [5] Dorndorf, U. and Pesch, E. “Combining Genetic and Local Search for Solving the Job Shop Scheduling Problem,” APMOD93 Proc. Preprints, pp. 142-149, Budapest, Hungary, 1993. [6] Fang, H., “Genetic Algorithms in Timetabling and Scheduling,” Ph.D. thesis, Department of Artificial Intelligence, University of Edinburgh, 1994. [7] Fang, H., Ross, P. and Corne, D., “A Promising Genetic Algorithm Approach to Job- Shop Scheduling, Rescheduling, and Open-Shop Scheduling Problems,” Proc. Fifth Int’l Conf. on Genetic Algorithms, pp. 375-382, Morgan Kaufmann, San Mateo, CA, 1993. [8] Giffler, J. and Thompson, G.L., “Algorithms for Solving Production Scheduling Problems,” Operations Research, Vol. 8, pp. 487-503, 1960. [9] Goodman, E. D. An Introduction to GALOPPS, Technical Report GARAGe95-06-01, Genetic Algorithms Research and Applications Group, Michigan State University, 1995. [10] Kobayashi, S., Ono, I., and Yamamura, M. “An Efficient Genetic Algorithm for Job Shop Scheduling Problems,” Proc. Sixth Int’l Conf. on Genetic Algorithms, pp. 506-511, MorganKaufmann, San Mateo, CA, 1995. APPENDIX The program that has been developed and used in the present work is given below #include<stdio.h> #include<conio.h>
  • 10. void main() {int i,k,l,m,n,b,popsize,r,q,t,v[20][20],c[20][20],p[20][20],j[20] [20],cmax[20]; clrscr(); printf("enter the no. of jobsn"); scanf("%d",&n); printf("enter the no. of machinesn"); scanf("%d",&m); for(i=1;i<=n;i++) for(k=1;k<=m;k++) { printf("enter the processing time of job %d on machine %d ",i,k); scanf("%d",&p[i][k]); } printf("enter the population sizen"); scanf("%d",&popsize); for(i=1;i<=popsize;i++) { printf("enter the job sequence %d",i); for(k=1;k<=n;k++) scanf("%d",&j[i][k]); } for(t=0;t<30;t++) { for(i=1;i<=popsize;i++) c[j[i][1]][1]=p[j[i][1]][1]; for(i=2;i<=n;i++) c[j[l][i]][1]=c[j[l][i-1]][1]+p[j[l][i]][1]; for(k=2;k<=m;k++) c[j[l][1]][k]=c[j[l][1]][k-1]+p[j[l][1]][k]; for(i=2;i<=n;i++) for(k=2;k<=m;k++) { if((c[j[l][i-1]][k])>(c[j[l][i]][k-1])) b=c[j[l][i-1]][k]; else b=c[j[l][i]][k-1]; c[j[l][i]][k]=b+p[j[l][i]][k]; } cmax[l]=c[j[l][n]][m]; } for(l=1;l<=popsize;l++) printf("%3d",cmax[l]); for(l=1;l<popsize;l++) { for(q=l+1;q<=popsize;q++) { if(cmax[l]<cmax[q]) { r= cmax[q]; cmax[q]=cmax[l]; cmax[l]=r;
  • 11. for(k=1;k<=n;k++) { v[q][k]=j[q][k]; } } }} printf("nthe arranged fx and array are:n"); for(i=1;i<=popsize;i++) printf("%dn",cmax[i]); for(i=1;i<=popsize;i++) { for(k=1;k<=n;k++) printf("%2d",j[i][k]); printf("n"); } printf("nassigning strong string in place of weak stringnn"); for(k=1;k<=n;k++) j[1][k]=j[popsize][k]; printf("nprinting the mating poolnn"); for(l=1;l<=popsize;l++) { for(k=1;k<=n;k++) printf("%2d",j[l][k]); printf("n"); } printf("nTHE PROCESS OF MUTATIONnn"); for(l=1,q=1;l<popsize;l++,q++) { v[l][q]=j[l][q]; j[l][q]=j[l][q+1]; j[l][q+1]=v[l][q]; } for(l=1;l<=popsize;l++) { for(k=1;k<=n;k++) printf("%2d",j[l][k]); printf("n"); } } getch(); }