1 / 52

METAHEURISTIC

METAHEURISTIC. Jacques A. Ferland Department of Informatique and Recherche Opérationnelle Université de Montréal ferland@iro.umontreal.ca March 2015. Overview. Heuristic Constructive Techniques: Generate a good solution Local (Neighborhood) Search Methods ( LSM ):

yokor
Download Presentation

METAHEURISTIC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. METAHEURISTIC Jacques A. Ferland Department of Informatique and Recherche Opérationnelle Université de Montréal ferland@iro.umontreal.ca March 2015

  2. Overview • Heuristic Constructive Techniques: Generate a good solution • Local (Neighborhood) Search Methods (LSM): Iterative procedure improving a solution • Population-based Methods: Population of solutions evolving to mimic a natural process

  3. Population-based Methods • Genetic Algorithm (GA) • Hybrid GA-LSM • Genetic Programming (GP) • Adaptive Genetic Programming (AGP) • Scatter Search (SS) • Ant Colony Algorithm (ACA) • Particle Swarm Optimiser (PSO)

  4. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  5. At each generation of the Classical genetic algorithm: - N parent solutions are selected and paired two by two - A crossover operator is applied to each pair of parent-solutions according to some probability to generate two offspring-solutions. Otherwise the two parent-solutions become their own offspring-solutions - A mutation operator is applied according to some probability to each offspring-solution. - The population of the next generation includes the offspring-solutions At each generation of the Steady-state population genetic algorithm: - An even number of parent-solutions are selected and paired two by two - A crossover operator is applied to each pair of parent-solutions to generate two offspring-solutions. - A mutation operator is applied according to some probability to each offspring-solution. -The population of the next generation includes the N best solutions among the current population and the offspring- solutions Two variants of GA

  6. Problem used to illustrate • General problem • Assignment type problem: Assignment of resources j to activities i

  7. Encoding the solution • The phenotype form of the solution x єℝpis encoded(represented)as a genotype form vector z єℝn(or chromozome) where m may be different from n. • For example in the assignment type problem: let xbe the following solution: for each 1≤ i ≤ n, xij(i) = 1 xij = 0 for all other j x єℝnxmcan be encoded as z єℝnwhere zi = j(i) i = 1, 2, …, n i.e., zi is the index of the resource j(i)assigned to activity i

  8. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  9. Selection operator • This operator is used to select an even number (2, or 4, or …, or N) of parent-solutions. • Each parent-solution is selected from the current population according to some strategy or selection operator. • Note that the same solution can be selected more than once. • The parent-solutions are paired two by two to reproduce themselves. • Selection operators: Random selection operator Proportional (or roulette whell) selection operator Tournament selection operator Diversity preserving selection operator

  10. Random selection operator • Select randomly each parent-solution from the current (entire) population • Properties: Very straightforward Promotes diversity of the population generated

  11. Proportional (Roulette whell) selection operator • Each parent-solution is selected as follows: i) Consider any ordering of the solutions z1, z2, …, zNin P ii) Select a random number α in the interval [0, ∑1≤k≤ N( 1 / f( zk) )] iii) Let τ be the smallest index such that ∑1≤k≤ τ(1 / f( zk ) ) ≥ α iv) Then zτis selected 1 / f( z1 ) 1 / f( z2 )1 / f( z3)1 / f( zN) | | | | … | | τ α The chance of selecting zkincreases with its fittness 1 / f( zk) For the problem min f (x) where x is encoded as z 1/f (z) measures the fittness of the solution z

  12. Tournament selection operator • Each parent-solution is selected as the best solution in a subset of randomly chosen solutions in P: i) Select randomly N’ solutions one by one from P (i.e., the same solution can be selected more than once) to generate the subset P’ ii) Let z’ be the best solution in the subset P’: z’ = argmin zє P’ f(z) iii) Then z’ is selected as a parent-solution

  13. Elitist selection • The main drawback of using elitist selection operator like Roulette whell and Tournament selection operators is premature converge of the algorithm to a population of almost identical solutions far from being optimal. • Other selection operators have been proposed where the degree of elitism is in some sense proportional to the diversity of the population.

  14. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  15. Crossover (recombination) operators • Crossover operator is used to generate new solutions including interesting components contained in different solutions of the current population. • The objective is to guide the search toward promissing regions of the feasible domain X while maintaining some level of diversity in the population. • Pairs of parent-solutions are combined to generate offspring-solutions according to different crossover (recombination) operators.

  16. One point crossover • The one point crossover generates two offspring-solutions from the two parent-solutions z1 = [ z11, z21, …, zn1] z2 = [ z12, z22, …, zn2] as follows: i) Select randomly a position (index) ρ, 1 ≤ ρ≤ n. ii) Then the offspring-solutions are specified as follows: oz1 = [z11, z21, …, zρ1, zρ+12, …, zn2] oz2 = [z12, z22, …, zρ2, zρ+11, …, zn1] Hence the first ρcomponentsof offspring oz1 (offspring oz2) are the corresponding ones of parent 1 (parent 2), and the rest of the components are the corresponding ones of parent 2 (parent 1)

  17. Two points crossover • The two points crossover generates two offspring-solutions from the two parent-solutions z1 = [ z11, z21, …, zn1] z2 = [ z12, z22, …, zn2] as follows: i) Select randomly two positions (indices) μ,ν, 1 ≤ μ≤ν≤ n. ii) Then the offspring-soltions are specified as follows: oz1 = [z11, …, zμ-11, zμ2, …, zν2, zν+11, …, zn1] oz2 = [z12, …, zμ-12, zμ1, …, zν1, zν+12, …, zn2] Hence the offspring oz1 (offspring oz2) has components μ, μ+1, …, ν of parent 2 (parent 1), and the rest of the components are the corresponding ones of parent 1 (parent 2)

  18. Uniform crossover • The uniform crossover requires a vector of bits (0 or 1) of dimension n to generate two offspring-solutions from the two parent-solutions z1 = [ z11, z21, …, zn1] ,z2= [ z12, z22, …, zn2] : i) Generate randomly a vector of n bits, for example [0, 1, 1, 0, …, 1, 0] ii) Then the offspring-solutions are specified as follows: parent 1: [ z11, z21, z31, z41,…, zn-11, zn1] parent 2: [ z12, z22, z32, z42,…, zn-12, zn2] Vector of bits: [ 0 , 1 , 1 , 0 , …, 1 , 0 ] Offspring oz1: [ z11,z22,z32, z41,…,zn-12, zn1] Offspring oz2: [z12, z21, z31,z42,…, zn-11,zn2]

  19. Uniform crossover • The uniform crossover requires a vector of bits (0 or 1) of dimension m to generate two offspring-solutions from the two parent-solutions z1 = [ z11, z21, …, zn1] ,z2= [ z12, z22, …, zn2] : i) Generate randomly a vector of bits, for example [0, 1, 1, 0, …, 1, 0] ii) Then the offspring-solutions are specified as follows: parent 1: [ z11, z21, z31, z41,…, zn-11, zn1] parent 2: [ z12, z22, z32, z42,…, zn-12, zn2] Vector of bits: [ 0 , 1 , 1 , 0 , …, 1 , 0 ] Offspring oz1: [ z11,z22,z32, z41,…,zn-12, zn1] Offspring oz2: [z12, z21, z31,z42,…, zn-11,zn2] Hence the ithcomponent of oz1 (oz2) is the ithcomponent of parent 1 (parent 2) if the ith component of the vector of bits is 0, otherwise, itisequal to the ithcomponent of parent 2 (parent 1)

  20. Path relinking • The path relinking procedure generates a sequence of feasible solutions along a path linking two solutions x1and x2

  21. Ad hoc crossover operator The preceding crossover operators are sometimes too general to be efficient. Hence, whenever possible, we should rely on the structure of the problem to specify ad hoc problem dependent crossover operator in order to improve the efficiency of the algorithm.

  22. Recovery procedure Furthermore, whenever the structure of the problem is such that the offspring-solutions are not necessarily feasible, then an auxiliary procedure is required to recover feasibility. Such a procedure is used to transform the offspring-solution into a feasible solution in its neighborhood.

  23. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  24. Mutation operator • Mutation operator is an individual process to modify offspring-solutions • In traditional variants of Genetic Algorithm the mutation operator is used to modify arbitrarely each componenet ziwith a small probability: For i = 1 to n Generate a random numberβ[0, 1] If β < βmax then select randomly a new value for zi where βmax is small enough in order to modify zi with a small probability • Mutation operator simulates random events perturbating the natural evolution process • Mutation operatornot essential, but the randomness that it introduces in the process, promotes diversity in the current population and may prevent premature convergence to a bad local minimum

  25. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  26. Hybrid Methods • This is a good strategysinceitiswellknownthat in general, GeneticAlgorithmsGA(and population basedalgorithms in general) are very time consuming and generateworse solutions thanLSM • Strength of hybridmethodscomesfromcombiningcomplementarysearchstrategy to takeadvantage of their respective strength. For instance, - Intensify the search in a promissingregionwith the LSM - Diversify the searchthrough the selectionoperator, crossoveroperator of the GA

  27. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  28. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  29. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  30. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

  31. Genetic Algorithm (GA) • Population based algorithm • At each generation three different operators are first applied to generate a set of new (offspring) solutions using the N solutions of the current population P: selection operator: selecting from the current population parent-solutions that reproduce themselves crossover (reproduction) operator: producing offspring-solutions from each pair of parent-solutions mutation operator: modifying (improving) individual offspring-solution • A fourth operator (culling operator) is applied to determine a new population of size N by selecting among the solutions of the current population and the offspring-solutions according to some strategy

More Related