global optimization simulated annealing and tabu search€¦ · zderived its name from the...

24
1 Global Optimization Simulated Annealing and Tabu Search Doron Pearl

Upload: phungdan

Post on 22-Apr-2018

221 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

1

Global OptimizationSimulated Annealing and Tabu Search

Doron Pearl

Page 2: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

2

A Greedy Approach

Iteratively minimize current state, by replacing it by successor state that has lower value.

When successor is higher – return.

Page 3: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

3

A Greedy Approach

ProblemMost Minimization strategies find thenearest local minimum.

startingpoint

descenddirection

local minimum

global minimum

barrier to local search

Page 4: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

4

Bouncing BallGoal: Find the lowest valley in a terrain.Approach: A bouncing ball.

Process1. At the beginning allow the ball to make high bounces.2. Slowly decreases the maximum bounce.

startingpoint

descenddirection

local minimum

global minimum

Will jump barrier

Page 5: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

5

Physical Annealing Process

Gradual cooling of liquid …At high temperatures, molecules move freelyAt low temperatures, molecules are "stuck“

if cooling is slowLow energy, organizedcrystal lattice formed.

Page 6: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

6

Simulated Annealing

A stochastic global optimization method that distinguishes between different local optima.

Derived its name from the annealing process used to re-crystallize metals.

Simulated annealing is summarized with the following idea:“When optimizing a very large and complex system (i.e., a system with many degrees of freedom) , instead of always going downhill, try to go downhill most of the times” [Haykin, 1999]

Page 7: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

7

Algorithm’s SketchStep 1: Initialize – Start with a random initial

placement. Initialize a very high “temperature”.

Step 2: Move – Perturb the placement through a defined move.

Step 3: Calculate score – calculate the change in the score due to the move made.

Step 4: Choose – Depending on the change in score, accept or reject the move. The probability of acceptance depending on the current “temperature”.

Step 5: Update and repeat– Update the temperaturevalue by lowering the temperature. Go back to Step 2.

The process is done until “Freezing Point” is reached.

Page 8: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

8

Basic Algorithm

1. Choose a random Xi, select the initial system temperature, and outline the cooling (ie. annealing) schedule.

2. Evaluate E(Xi) using a simulation model

3. Perturb Xi to obtain a neighboring Design Vector (Xi+1)

4. Evaluate E(Xi+1) using a simulation model

5. If E(Xi+1)< E(Xi), Xi+1 is the new current solution

6. If E(Xi+1)> E(Xi), then accept Xi+1 as the new current solution with a probability e(-Δ /T) where Δ = E(Xi+1) -E(Xi).

7. Reduce T according to the cooling schedule.

8. Terminate the algorithm.

T = System Temperature , E = Objective function

Page 9: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

9

Rosenbrock Function

2 2 22 1[(1 ) 100 ]f x x x= − + × −

SA’s performance on the Rosenbrock function (2D):

Search Pattern Objective reduction

Page 10: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

10

General SA Software Overview

Simulated AnnealingAlgorithm

Evaluationfunction e(x)

Perturbationfunction p(x)

Initial configuration X0 Xbest

Xhistory

Options(e.g. annealing schedule)

Page 11: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

11

Software: ASAAdaptive Simulated Annealing: C code that statistically finds the best global fit of a nonlinear constrained non-convex cost-function.Has over 100 options to provide robust tuning over many classes of nonlinear stochastic systems.Reannealing - periodically rescaling the annealing-time.ASAMIN – Matlab Interface for ASAReference: Lester Ingber, California Institute of Technologyhttp://www.ingber.com/ASA-README.html

Page 12: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

12

Software: parSA

parSA – Parralel Simulated Annealing Code in C/C++University of Paderborn, Germanyhttp://wwwcs.uni-paderborn.de/fachbereich/AG/monien/SOFTWARE/PARSA/

Public, Using MPI, Platform independent

Page 13: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

13

More Software

JSimul – Simulated Annealing Code in Java Taygeta Scientific Inc. http://www.theblueplanet.org/JSimul_readme.html

GOFFE – Fortan implementationWilliam Goffe, Barkely Californiahttp://emlab.berkeley.edu/Software/abstracts/goffe895.html

simanneal – Simulated Annealing Code in C, C++ and ADATaygeta Scientific Inc. http://www.taygeta.com/annealing/simanneal.html

Page 14: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

14

Tabu Search(Giordano 96, based on Glover 89)

General idea: search a space by choosing a point, and going to its best neighbor that is not in the tabu list.

Tabu search is stochastic by nature: not guaranteed to always find an optimal solution even if one exists.

The Tabu restriction adds memory to local search- prevent cycles / revisiting- increase diversity of exploration- escape from local optima

Page 15: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

15

Tabu Restrictions

When we would tag a move as a Tabu ?Enforce tabu restrictions.

Example 1: After a move that changes the value of xifrom 0 to 1, we would like to prevent xi from taking the value of 0 in the next p iterations.

Example 2: After a move that exchanges the positions of element i and j in a sequence, we would like to prevent elements i and j from exchanging positions in the next p iterations

Tabu tenure -

Page 16: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

16

Basic Tabu Search Algorithm1. initialize current-solution c to some random solution2. for x 1 to num-iterations

1. generate and estimate neighbors of c2. prune neighbors that are in the tabu-list3. c best of remaining neighbors4. update tabu-list

3. return c

Best neighborTabu

Page 17: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

17

Tabu Move

Best neighborTabu

Page 18: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

18

Software

No “off the shelf” codes because generally each problemrequires particular implementation.

Some code framework are available -

OpenTS – Java Tabu Search.http://www.coin-or.org/OpenTS/, CPL LicenseMetslib – meta heuristics framework in C++- GNU, OOhttp://code.100allora.it/metslib

You would still need to add your own implementation(neighborhood generator, solution estimator etc…)

Page 19: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

19

Probabilistic Tabu Search

1. Instead of evaluating each neighbor consider only a random sample.

2. When 2 or more neighbors evaluated as “best move” –choose by random.

Benefit:

Reduce significantly the computational burden.Acts as an anti-cycling mechanism.Allows usage of shorter tabu lists.

Page 20: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

20

TS vs. SA

In 10 out 15 problems TS found a better (smaller) cost function

TS gives a better result for average costs

Page 21: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

21

TS vs. SAFor the problem 100.15.20.30:

Cos

t Val

ue

Number of MovesIterations per move for SA

SA needs more iterations as it

proceeds

TS always finds better solutions

Page 22: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

22

TS vs. SACPU time in seconds (averaged over 10 runs) required by TS and SA to carry out 200,000 moves

• Move=A better solution was found

• SA won’t find a move in most iterations

It takes about half the time for TS

Page 23: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

23

TS vs. SA

Influence of the initial temp. of SA on the cost function:

Bad results when the size is too small

or too big

Influence of the size of TS’list on the cost function:

For the problem 100.15.20.30:

SA is sensitive to initial temp.

Page 24: Global Optimization Simulated Annealing and Tabu Search€¦ · zDerived its name from the annealing process used to re-crystallize metals. zSimulated annealing is summarized with

24

Bibliography

Randomized Feature Selection, PRISM Texas A&M Universityhttp://research.cs.tamu.edu/prism/lectures/pr/pr_l12.pdf

Simulated Annealing, Statistical Computing, University of Michiganhttp://www.sph.umich.edu/csg/abecasis/class/2006/615.19.pdf

Artificial Intelligence Seminar, Adele Howe, Colarado State Universitywww.cs.colostate.edu/~howe/cs540/lectures/adv-search06.pdf

Tabu Search for Military Analysis, Ray Hill, Department of Operational Sciences Air Force Institute of Technologywww.mors.org/meetings/new_techniques/briefs/Hill.pdf

Simulated Annealing and Tabu Search for Constraint Solving, Jin-Kao-Hao and Jerome Pannier (1998), Parc Scientifique Georges Besse Nimes, France