metaheuristic methods and their applications lin-yu tseng ( 曾怜玉 ) institute of networking and...

56
Metaheuristic Methods a nd Their Applications Lin-Yu Tseng ( 曾曾曾 ) Institute of Networking and Multime dia Department of Computer Science and Engineering National Chung Hsing University

Upload: ashley-williamson

Post on 16-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Metaheuristic Methods and Their Applications

Lin-Yu Tseng ( 曾怜玉 )

Institute of Networking and MultimediaDepartment of Computer Science and EngineeringNational Chung Hsing University

Page 2: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

OUTLINE

I. Optimization ProblemsII. Strategies for Solving NP-hard Optimization

ProblemsIII. What is a Metaheuristic Method?IV. Trajectory MethodsV . Population-Based MethodsVI. Multiple Trajectory SearchVII. The Applications of Metaheuristic MethodsVIII. Conclusions

Page 3: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

I. Optimization Problems

Computer Science Traveling Salesman Problem Maximum Clique Problem

Operational Research Flow Shop Scheduling Problem P – Median Problem

Many optimization problems are NP-hard.

Page 4: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Optimization problems

Calculus-based method

Page 5: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Hill climbing

Page 6: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

How about this?

Page 7: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

An example : TSP (Traveling Salesman Problem)

18

1

2

3

5

4

23

10 5

3

7

15206

A solution A sequence

12345 Tour length = 31

13452 Tour length = 63

There are (n-1)! tours in total

Page 8: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

II. Strategies for Solving NP-hard Optimization Problems

• Branch-and-Bound Find exact solution

• Approximation Algorithms– e.g. There is an approximation algorithm for TSP which can f

ind a tour with tour length 1.5× (optimal tour length) in O≦(n3) time.

• Heuristic Methods Deterministic

• Metaheuristic Methods Heuristic + Randomization

Page 9: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

III. What is a Metaheruistic Method?

• Meta : in an upper level

• Heuristic : to findA metaheuristic is formally defined as an iterative generation process which guides a subordinate heuristic by combining intelligently different concepts for exploring and exploiting the search space, learning strategies are used to structure information in order to find efficiently near-optimal solutions. [Osman and Laporte 1996].

Page 10: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Fundamental Properties of Metaheuristics [Blum and Roli 2003]

• Metaheuristics are strategies that “guide” the search process.

• The goal is to efficiently explore the search space in order to find (near-)optimal solutions.

• Techniques which constitute metaheuristic algorithms range from simple local search procedures to complex learning processes.

• Metaheuristic algorithms are approximate and usually non-deterministic.

Page 11: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Fundamental Properties of Metaheuristics (cont.)

• They may incorporate mechanisms to avoid getting trapped in confined areas of the search space.

• The basic concepts of metaheuristics permit an abstract level description.

• Metaheuristics are not problem-specific.• Metaheuristics may make use of domain-specific k

nowledge in the form of heuristics that are controlled by the upper level strategy.

• Today’s more advanced metaheuristics use search experience (embodied in some form of memory) to guide the search.

Page 12: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

IV. Trajectory Methods

1. Basic Local Search : Iterative Improvement

Improve (N(S)) can be① First improvement② Best improvement③ Intermediate option

Page 13: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Trajectory Methods

x1

x2

x3 X4

X5

Page 14: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

2. Simulated Annealing – Kirkpatrick (Science 1983)

• Probability

• Temperature T may be defined as

• Random walk + iterative improvement

T

sfsfssTp

)()'(exp),',(

10 ,1 αTT kk

Page 15: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

3. Tabu Search – Glover 1986

• Simple Tabu Search

• Tabu list• Tabu tenure: the length of the tabu list• Aspiration condition

Page 16: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Tabu Search

Page 17: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

4. Variable Neighborhood Search – Hansen and Mladenović 1999

• Composed of three phase ① shaking ② local search ③ move

• A set of neighborhood structures, max

...21 kNNN

'max

' ,...,1, kkN k

'maxkk

'x ))('( ' xNxx k

''x ''xx

1k

1 kk1k

'x''x

Initialization: Select the set of neighborhood structures ; Find an initial solution x; Choose a stopping condition;

Repeat the following until no improvement is obtained: (1) Set ; (2) Until , repeat the following steps; (a) Shaking phase: Generate a random point of ;

(b) Local search: Apply some local search method with as initial solution; denote with the so obtained local optimum;

(c) Move or not: If the is better than x, set and , otherwise set

Page 18: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Variable Neighborhood Search

x’’N1

x

x’

Bestx

x’’

N1

x

x’

Best

x’’

N2

x

Best

x’

x’’x x’’

N1

x

Best

x’

x’’

Page 19: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

V. Population-Based Methods

1. Genetic Algorithm – Holland 1975

Coding of a solution --- Chromosome

Fitness function --- Related to objective function

Initial population

Page 20: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

An example : TSP (Traveling Salesman Problem)

18

1

2

3

5

4

23

10 5

3

7

15206

A solution A sequence

12345 Tour length = 31

13452 Tour length = 63

Page 21: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

• Reproduction (Selection)

• Crossover

• Mutation

Genetic Algorithm

Page 22: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Example 1

Maximize f(x) = x2 where x I and 0 x 31

Page 23: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

1. Coding of a solution : A five-bit integer, e.g. 01101

2. Fitness function : F(x) = f(x) = x2

3. Initial population : (Randomly generated) 0110111000 0100010011

Page 24: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Reproduction

Roulette Wheel

Page 25: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Reproduction

Page 26: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Crossover

Page 27: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Mutation

The probability of mutation

Pm = 0.001

20 bits * 0.001 = 0.02 bits

Page 28: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering
Page 29: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Example 2 Word matching problem

• “to be or not to be” “tobeornottobe”

• (1/26)13 = 4.03038 10-19

• The lowercase letters in ASCII are represented by numbers in the range [97, 122]

[116,111,98,101,114,110, 116, 116, 111, 98,101]

Page 30: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Initial population

Page 31: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

The corresponding strings

rzfqdhujardbeniedwrvrjahfjcyueisosqvcbfbfvgramtekuvskbuqrtjtjensbfwyqykktzyojhtbxblsoizggwmdtriusrgkmbgjvpbgemtpjalq

Page 32: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering
Page 33: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

2. Ant Colony Optimization – Dorigo 1992

Pheromone

Page 34: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

InitializationLoop

Loop Each ant applies a state transition rule to incrementally build a solution and applies a local updating rule to the pheromone

Until each of all ants has built a complete solution

A global pheromone updating rule is applied

Until End_Condition

Page 35: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Example : TSPA simple heuristics – a greedy method: choose

the shortest edge to go out of a node

1

2

3

5

4

23

10 5

3

7

15206

18

Solution : 15432

Page 36: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

• Each ant builds a solution using a step by step constructive decision policy.

• How ant k choose the next city to visit?

otherwiseS

qqifs ruruJu r

,

})({maxarg 0

r

r

Jururu

rsrs

krs

Jsif

Jsifp

r

0

)(

)(

Where , be a distance measure associated with edge (r,s)

1 rs

Page 37: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Local update of pheromone

10,)1( rsrsrs

,0 rs 0where is the initial pheromone level

Global update of pheromone

10,)1( rsrsrs

where globally best tour

otherwise

srifLgbrs,0

),(,1

Page 38: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

3. Particle Swarm Optimization – Kennedy and Eberhart 1995

• Population initialized by assigning random positpositionsions and velocitiesvelocities; potential solutions are then flown through hyperspace.

• Each particle keeps track of its “best” (highest fitness) position in hyperspace.– This is called “pBestpBest” for an individual particle.– It is called “gBestgBest” for the best in the population.

• At each time step, each particle stochastically accelerates toward its pBest pBest and gBestgBest.

Page 39: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Particle Swarm Optimization Process

1. Initialize population in hyperspace. Includes position and velocity.

2. Evaluate fitness of individual particle.

3. Modify velocities based on personal best and global best.

4. Terminate on some condition.

5. Go to step 2.

Page 40: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Initialization:- Positions and velocities

Page 41: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Modify velocities - based on personal best and global best.

xt gBest

pBest

vxt+1

Here I am, now!

New Position !

Page 42: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Particle Swarm Optimization

Modification of velocities and positions

vt+1 = vt + c1 * rand() * (pBest - xt ) + c2 * rand() * (gBest - xt ) xt+1 = xt + vt+1

Page 43: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

VI. Multiple Trajectory Search (MTS)

1.MTS begins with multiple initial solutions, so multiple trajectories will be produced in the search process.

2.Initial solutions will be classified as foreground solutions and background solutions, and the search will be focused mainly on foreground solutions.

Page 44: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

3.The search neighborhood begins with a large-scale neighborhood, then it contracts step by step until it reaches the pre-defined tiny size. At this time, it is reset to its original size.

4.Three candidate local search methods were designed. When we want to search the neighborhood of a solution, they will be tested first in order we can choose the one that best fits the landscape of the solution.

Page 45: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

• The MTS focuses its search mainly on foreground solutions. It does an iterated local search using one of three candidate local search methods. By choosing a local search method that best fits the landscape of a solution’s neighborhood, the MTS may find its way to a local optimum or the global optimum

Page 46: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

• Step 1 : Find M initial solutions that are uniformly distributed over the solution space.

• Step 2 : Iteratively apply local search to all these M initial solutions.

• Step 3 : Choose K foreground solutions based on the grades of the solutions.

• Step 4: Iteratively apply local search to K foreground solutions.

• Step 5 : If termination condition is met then stop else go to Step 3.

Page 47: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

• Three local search methods begin their search in a very large “neighborhood”. Then the neighborhood contracts step by step until it reaches a pre-defined tiny size, after then, it is reset to its original size.

Page 48: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

• Local Search 1This local search method searches along each of n dimensions in a randomly permuted order.

• Local Search 2This local search method searches along a direction by considering about n/4 dimensions.

Three Local Search Methods

Page 49: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

• Local Search 3This local search method also searches along each of n dimension in a randomly permuted order, but it evaluate multiple solutions along each dimension within a pre-specified range.

Three Local Search Methods

Page 50: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Multiple Trajectory Search for Large Scale Global Optimization

Winner of 2008 IEEE World Congress on Computational Intelligence Competition on Large Scale Global Optimization

Page 51: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

Multiple Trajectory Search for Unconstrained/Constrained

Multi-Objective Optimization

The Second and the Third Places of 2009 IEEE Congress on Evolutionary ComputationCompetition on Performance Assessment of Constrained/Bound Constrained Multi-Objective Optimization Algorithm

Page 52: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

VII. The Applications of Metaheuristics

1. Solving NP-hard Optimization Problems• Traveling Salesman Problem• Maximum Clique Problem• Flow Shop Scheduling Problem• P-Median Problem

2. Search Problems in Many Applications• Feature Selection in Pattern Recognition• Automatic Clustering• Machine Learning (e.g. Neural Network

Training)

Page 53: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

VIII. Conclusions• For NP-hard optimization problems and compli

cated search problems, metaheuristic methods are very good choices for solving these problems.

• More efficient than branch-and-bound.• Obtain better quality solutions than heuristic me

thods.• Hybridization of metaheuristics• How to make the search more systematic ?• How to make the search more controllable ?• How to make the performance scalable?

Page 54: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

References1. Osman, I.H., and Laporte,G. “Metaheuristics:A bibliography”. Ann. Oper. Res. 63, 51

3–623, 1996.2. Blum, C., and Andrea R. “Metaheuristics in Combinatorial Optimization: Overview an

d Conceptual Comparison”. ACM Computing Surveys, 35(3), 268–308, 2003.3. Kirkpatrick, S., Gelatt. C. D., and Vecchi, M. P. “Optimization by simulated annealing

”, Science, 13 May 1983 220, 4598, 671–680, 1983.4. Glover, F. “Future paths for integer programming and links to artificial intelligence”,

Comput. Oper. Res. 13, 533–549, 1986.5. Hansen, P. and Mladenović, N. An introduction to variable neighborhood search. In M

etaheuristics: Advances and trends in local search paradigms for optimization, S. Voß, S. Martello, I. Osman, and C. Roucairol, Eds. Kluwer Academic Publishers, Chapter 30, 433–458, 1999.

6. Holland, J. H. Adaption in natural and artificial systems. The University of Michigan Press,Ann Harbor, MI. 1975.

7. Dorigo, M. Optimization, learning and natural algorithms (in italian). Ph.D. thesis, DEI, Politecnico di Milano, Italy. pp. 140, 1992.

8. Kennedy, J. and Eberhart, R. “Particle Swarm Optimization”, Proceedings of the 1995 IEEE International Conference on Neural Networks, pp. 1942-1948, IEEE Press, 1995.

Page 55: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

References

9. Lin-Yu Tseng* and Chun Chen, (2008) “Multiple Trajectory Search for Large Scale Global Optimization,” Proceedings of the 2008 IEEE Congress on Evolutionary Computation, June 2-6, 2008, Hong Kong.

10. Lin-Yu Tseng* and Chun Chen, (2009) “Multiple Trajectory Search for Unconstrained/Constrained Multi-Objective Optimization,” Proceedings of the 2009 IEEE Congress on Evolutionary Computation, May 18-21, Trondheim, Norway.

Page 56: Metaheuristic Methods and Their Applications Lin-Yu Tseng ( 曾怜玉 ) Institute of Networking and Multimedia Department of Computer Science and Engineering

謝謝 !

祝各位 身體健康 心情愉快 !