CAPÍTULO 1. Marco Teórico
1.3. Lean Manufacturing
1.3.5. Estandarización y Estabilidad
1.3.5.2. Takt Time
Since their introduction by Bremermann (1958) and Fraser (1957) and the seminal work done by Holland (1975), genetic algorithms (GAs) have been developed extensively to tackle problems including the travelling salesman problem (for example (Whitley, Starkweather and Shaner, 1991)), bin packing problems (for example (Falkenauer, 1996)) and scheduling problems (for example (Terashima-Marin, Ross and Valenzuela-Rendon, 1999)). A Genetic Algorithm tries to evolve a population to a higher level of fitness by a process analogous to evolution in nature. With GAs, the genotype of a problem to be solved are stored in a chromosome. Initially, a population is generated either randomly or with some knowledge (for example, for the RCPSP problem, random, precedence valid, chromosomes could be generated (Hartmann, 1997)).
At each generation (iteration) of the GA, the entire population is evaluated using the schedule evaluation function. A new population is created from the existing population using selection, crossover and mutation. The new population is then
recombined with the old population using a replacement strategy. The process is repeated until a termination condition which is usually a certain number of generations.
Crossover
Crossover takes two parent chromosomes and combines them to create one or more children. There are several crossover operators (Hartmann, 1997). The three generic popular crossover operators are described here.
Uniform Crossover - This is usually used to create two children. Each gene of the first (second) child is taken from the father (mother) with probability p, otherwise it comes from the mother.
Mother a b c d e f g
Random 0.1 0.5 0.3 0.8 0.3 0.4 0.9
Father A B C D E F G
With a p=0.4
Daughter A b C d E f g
Random 0.1 0.5 0.3 0.8 0.3 0.4 0.9
Son a B c D e F G
Changing the value of p changes the magnitude of effect the crossover has. Low values means that the son and daughter are similar to the mother and father and values close to 0.5 mean they are more of a combination. This is more suited to problems which do not have a clear structure in chromosome, for example Random Key or Priority Rule representations, or the representation for the knapsack problem used by (Chu and Beasley (1998).
One Point Crossover – One point crossover again creates two offspring. The mother and father are both split at the same random point, and then the different sections swapped to make two children.
Mother a b c d e f g
Father A B C D E F G
With a split after the 3rd gene:
Daughter a b c D E F G
Son A B C d e f g
This method keeps chains of genes together so is good for representations where order of the genes has an effect on solution quality.
Two Point Crossover – Two point crossover is similar to one point except that there are two points where the chromosome is split:
Mother a b c d e f g
Father A B C D E F G
With a split after the 3rd and 5th gene:
Daughter a b c D E f g
Son A B C d e F G
In a study done by Hartman (1997) on the RCPSP, the two point crossover was shown to be the most effective, with uniform and one-point coming second and third. Hartman notes that “The two-point crossover operator appears to be capable of inheriting building blocks that contributed to the parents’ fitness (for much larger projects, even more than two cuts may probably be advisable).” indicating that a k-point crossover might be an interesting area of research as this allows more “blocks” to be considered.
Mutation
To help diversification, GAs have a fixed, small probability of mutation (P ) of perhaps m 0.01 or less. During mutation, each “bit” of the chromosome has P probability of m being changed. With RK chromosomes, this could simply mean generating a new random key number for that bit. In a permutation based AL chromosome this becomes more tricky as it needs to keep a valid chromosome. This is usually overcome by P m becoming the probability of swapping the activity with the one to the right of it. For all positions i 1,...,J 1 I and i Ii 1 are swapped with probabilityP . m
Lower mutation rates can lead to genetic drift (unless using replacement methods that favour diverse methods). This is where all the individuals’ genes become the same and converge on an optima (not necessarily the global optima).
Selection (Replacement Strategies)
When the new pool of offspring has been created, the original population and the new offspring need to be combined and reduced to keep the population size fixed.
Full Replacement – the population is replaced by offspring and the parents discarded.
Ranked – the parent and the offspring population are combined and ranked by their fitness and we keep the best ones.
Proportional Selection – this is analogous to a roulette wheel, where all the population has a section of the wheel and the size of that section is proportional to the deviation from the best individual. The wheel is spun and the one it lands on is removed from the population. This is repeated until the population is at its correct size. More formally,
) (I
F is the fitness of individual I and Pis our population. If fbest min(f(I)|I P),
the probability that an individual will die (and thus will not be moved to the next
2-Tournament – two different individuals are chosen at random and the weaker of the two is removed until the population is back to normal size.
3-Tournament – three different individuals are chosen at random and the weakest of the three is removed until the population is back to normal size.
Elitism – elitism keeps a number of the best solutions. This is to make sure the population keeps good results and can be combined with another method of replacement.
The best parameters
Hartman experimentally tests the three main types of GA different mutation rates (0.01, 0.05, 0.10), selection methods and different crossover operators to see which
Self adapting Genetic Algorithms are those which tune their parameters automatically to achieve better results for a given problem. The idea was first developed by Degris et al.
(1999) (though not applied to the RCPSP). Hartman (2002) first developed this method for the RCPSP and used a GA to optimise the order of the activities scheduled. He also added a gene which represented a bit which if set to 1, a serial schedule generation scheme is used, otherwise a parallel schedule generation scheme was used and the
results are competitive with other state-of-the-art heuristics evaluated by Kolish and Hartmann (2006).
Figure 2.4. Average percentage of the population using Serial schedule generation scheme over generations (created from the data in (Hartmann, 2002))
Interesting to note were the statistics of the schedule generation scheme usage presented as a graph in Figure 2.4. From this graph we can see that with scarcer resources (lower values of RS) the parallel schedule generation scheme is favoured over the serial and with more resources available the serial schedule generation scheme is favourable. It is interesting to note that the only the RS=0.7 favours serial schedule generation scheme when it has been suggested in literature that serial is superior to parallel. This would imply that most of the literature has used problems with high resource availability.
Another method is adaptive crossover and mutation rates. With this method, the crossover and mutation rates adapt depending on the performance of the GA.
When there is no improvement in the average fitness over three generations, the mutation rate and crossover rate are modified as follows:
New Mutation Rate = (Old Mutation Rate + 1) / 2
New Crossover Rate = Old Crossover Rate / 2
If the average fitness rate over the last 3 generations has improved, they are modified as follows:
New Mutation Rate = Old Mutation Rate / 2 New Crossover Rate = (Old Crossover Rate + 1) / 2
This helps intensification and also stops the genetic drift by increasing the crossover rate when little improvements are found. This does not usually perform as well as fixed crossover and mutation rates. Having said this, finding the optimal crossover and mutation rates is hard and usually problem specific and having adaptive rates eliminates this time consuming process.