Chap 1 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 101

Metaheuristics : from Design to

Implementation

E-G. Talbi
Professor – Polytech’Lille -
Team manager –INRIA – University of
Lille - CNRS –
France
talbi@lifl.fr
Wiley, 2009 (596pp)
ISBN: 978-0-470-27858-1

Metaheuristics E-G. Talbi


Outline

Metaheuristics E-G. Talbi


Outline of the book

„ Common concepts for Metaheuristics


„ Single-solution based metaheuristics
z Common concepts for S-metaheuristics
z Local search
z Landscape analysis
z Advanced local search (Simulated annealing, Tabu search, VNS,
ILS, GLS, …)
„ Population-based metaheuristics
z Common concepts for P-metaheuristics
z Evolutionary algorithms (Genetic algorithms, GP, ES, EDA, …)
z Swarm inteeligence: Ant colonies, Particle swarm, …
z Bess, Immune systems, …
„ Metaheuristics for Multi-objective Optimization
„ Hybrid Metaheuristics
„ Parallel metaheuristics

Metaheuristics E-G. Talbi


Outline of the chapter 1

„ Optimization models
„ Optimization methods
z Exact algorithms / Approximate algorithms
z When using metaheuristics?
z Greedy heuristics
„ Main common concept of metaheuristics
z Representation
z Objective function
„ Constraint handling
„ Parameter tuning
„ Performance analysis of metaheuristics
„ Software frameworks for metaheuristics
z ParadisEO framework

Metaheuristics E-G. Talbi


From modeling to decision making

„ In practice, we find solutions for models representing


problems
„ Usually models are simplifications of the reality

Importance of models

Metaheuristics E-G. Talbi


Optimization problem

„ Definition (minimisation problem) : couple (S,f)


z Given a search space S which represents feasible solutions
z Given an objective function f: S Æ R
z Find s* ∈ S such as :
f ( s*) ≤ f ( s ) ∀s ∈ S
s* : global optimum

z Large scale and complex optimization problems in many areas of


science and industry (Telecommunications, Biology, Transportation-
Logistics, Environment, Finance, Design, ...).
z Problem size more and more important (combinatorial explosion) and/or
Delays more and more reduced.

Metaheuristics E-G. Talbi


Optimization models

Metaheuristics E-G. Talbi


Complexity theory: Algorithms

„ Polynomial-time algorithms: shortest paths,


spanning tree, network flow, …
„ Exponential-time algorithms

Metaheuristics E-G. Talbi


Complexity theory: Algorithms

• Two other notations to analyze algorithms

Metaheuristics E-G. Talbi


Complexity theory: Problems

„ Complexity of a problem = complexity of the best


algorithm solving that problem

„ Tractable (easy) = there exists a polynomial-time


algorithm to solve it

„ Intractable = if no polynomial-time algorithm exists

„ Most of real-life problems are intractable

Metaheuristics E-G. Talbi


Decision / Optimization problems

„ Decision problem has always « yes » or « no »


answer

„ Optimization problem can always be reduced to a


decision problem

Metaheuristics E-G. Talbi


Complexity classes

„ P class: decision problems


solved by a deterministic
machine in polynomial time
„ NP class: decision problems
solved by a non-
deterministic algorithm in
polynomial time
„ NP-complete: if all problems
of the class NP are reduced
polynomially to the problem
„ P=NP? Important open
question

Metaheuristics E-G. Talbi


Complexity classes: Examples

„ P class:
z Shortest path, network flow
z Spanning tree, bipartite matching, linear programming, …

„ NP-complete:
z Sequencing and scheduling problems: flow-shop, job-shop,
open-shop, …
z Assignment and location problems: QAP, GAP, p-median, …
z Grouping problems: clustering, graph partitioning, coloring, …
z Routing and covering problems: set covering, VRP, …
z Knapsack, cutting and packing problems

„ Open problems: e.g. graph isomorphism

Metaheuristics E-G. Talbi


Other models for optimization

„ Optimization under uncertainty


z Input data subject to noise
z e.g VRP – stochastic demands, travel times, …

„ Dynamic optimization
z Deterministic objective function, varies over time
z e.g. VRP – new demand Æ Track the optimal solution
z Multi-periodic optimization: periodic change (change known
a priori)
z e.g. planning problem (traffic, incoming technology)

„ Robust optimization: engineering design problems


„ Multi-objective optimization problems

Metaheuristics E-G. Talbi


“Generic” problems
„ Ex: SAT, TSP, and NLP are 3 canonical forms of
models than can be applied to solve different
problems.

„ Quadratic Assignment Problem


„ Bin Packing and Generalised Assignment Problems
„ Hub allocation problems
„ Graph Colouring & Partitioning
„ Vehicle Routing
„ Single & Multiple Knapsack
„ Set Partitioning & Set Covering Problems
„ Processor Allocation Problem
„ Various Staff Scheduling Problems
„ Job Shop Scheduling

Metaheuristics E-G. Talbi


Size of the search space
ƒ SAT Problem : Boolean Satisfiability Problem (First NP-hard
problem).
ƒ Many applications : timetabling, routing, …
ƒ Find a set of boolean variables
X = ( X 1 ,..., X n )
such as the boolean expression F = TRUE
ƒ Boolean expression F = conjunction of clauses
ƒ Clauses are disjunctions of k variables (k-SAT) :
F ( X ) = ( X 1 ∨ X 3 ) ∧ ( X 1 ∨ X 2 ) ∧ ( X 4 ∨ X 2 ) ∧ ...
ƒ For n=100, size of the search space = 2100 ≈ 1030,
ƒ Evaluation of 1000 solutions / sec ; 15 billions of years (Big Bang) to
evaluate less than 1% of the search space.
ƒ k>2, NP-hard problem ; k=2, Polynomial problem

Metaheuristics E-G. Talbi


Size of the search space

ƒ TSP Problem : n cities, find a circuit which minimize the


total distance ; all cities must be visited once.
ƒ Symmetric TSP dist(x,y)=dist(y,x)
ƒ |S| = n!/2n = (n-1)! / 2 ; n>6 TSP > SAT
ƒ 10 cities = 181 000 solutions
ƒ 20 cities = 10 000 000 000 000 000 solutions
ƒ 50 cities = 100 000 000 000 000 000 000 000 000 000 000
000 000 000 000 000 000 000 000 000 000 solutions
ƒ There is 1 000 000 000 000 000 000 000 litres of water in
the planet
http://www.ing.unlp.edu.ar/cetad/mos/TSPBIB_home.html

Metaheuristics E-G. Talbi


The traveling salesman problem (from Chvatal’s
page)

• 1800-1900: first descriptions of the problem;


• 1920-1930: problem becomes well defined;
• 1940-50: it starts to be recognized as “hard”;
• 1954: an instance with 42 cities is solved to optimality.

Metaheuristics E-G. Talbi


Size of the search space

ƒ NLP problem : Non-Linear Programming Problem


ƒ Many applications : mechanics, aeronautics, …
ƒ Classical methods don’t give “good” results

n n


i =1
4
cos ( x i
)−2 ∏
i =1
cos 2 ( x)
i
Non linear Function
G 2( x ) = Global Optimum unknown
n

∑ix
2
i
i =1
n n

∏ x ≥ 0.75
i =1
i ∑ x ≤ 7.5n i
0≤ x ≤ 10
i
i =1

Non-linear Constraint + linear constraint


Metaheuristics E-G. Talbi
Size of the search space

ƒ Treated as a mathematical problem = infinite number of


solutions / dimension.
ƒ On machine : suppose a precision of six decimals, each
variable may take 10 000 000 different values.
ƒ |S| = 10 000 000n = 107n
ƒ Search space larger than TSP
ƒ Evaluation function and constraints ?
ƒ Maximize G2(x) ; Non feasible solutions = 0

Metaheuristics E-G. Talbi


Constraints
„ Most of the problems have constraints.

„ Ex : Timetabling :
z List of courses, classes, students / classes, professor /
classes, available rooms, capacity of rooms, logistics of
rooms (video, computer, microphone, …).

z Hard constraints (must be satisfied) :


z Each class must be assigned to a room with a sufficient
number of seats and required facilities.
z Students assigned to different classes must not be scheduled
at the same time.
z Professors must not be scheduled to courses in parallel.

Metaheuristics E-G. Talbi


Optimization + Simulation:
Cellular network design
Economical Challenge (Cost, Quality of service)
Network Design (Positioninig of antenna, Configuration of antenna

„ Objectives : „ Constraints :
z Min (number of sites) „ Covering
„ Handover
z Min (interferences)

z Min (traffic loss)

z Max (resource use)

Metaheuristics E-G. Talbi


Parameters of antennaes
Decision variables
Data Bounds
Power [26, 55] dBm
Diagram 3 types
Height [30, 50] m
Azimut [0, 359] °
Tilt [-15, 0] °
Transmitters [1, 7]

„ Search space :
568 sites candidates Î 23689160 solutions
and ~ 600.109 choices for one antenna !
„ Cost Evaluation (pop : 100, Gen : 105,
cost = more than one year !!)
1 omni or 1-3 sectorial
Metaheuristics E-G. Talbi
Impact of the parameters via
simulation
„ Cell = zone covered by a BTS
„ Limited Traffic for a site (technological constraint)
„ Many sites are necessary

Omni-directional Sectorial type 1 Sectorial type 2 Propagation Model ?:


60 dBm Free space

Azimut 50° PIRE -10 dBm Tilt -15°

Metaheuristics E-G. Talbi


Model : Constraints
„ A set of BTS satisfying the
constraints :

z Covering

z Handover (mobility)

Metaheuristics E-G. Talbi


Model : Objectives

„ Min Number of sites (cost)

„ Min Interferences

„ Max Trafic handled Zone géographique


Used Sites
Non-used Sites
Covered Zone
Handover Zone

Metaheuristics E-G. Talbi


Other standard problems
i Integer programming problem (IP); Commercially
available.
i (Weighted) constraint satisfaction problem (CSP,
WCSP)
i Maximum satisfiability problem (MAX SAT)
i Set covering problem (SCP)
Generalized assignment problem (GAP)
i Generalized quadratic assignment problem (GQAP)
i Resource constrained project scheduling problem
(RCPSP)
i Vehicle routing problem (VRP)
i Cutting stock problem (CSTP)
i 2-Dimensional Packing Problem (2PP)
i …
Metaheuristics E-G. Talbi
Ex : Knapsack Problem
„ The classic Knapsack problem is typically put
forth as:
z A thief breaks into a store and wants to fill his
knapsack with as much value in goods as possible
before making his escape. Given the following list
of items available, what should he take?
z Item A, weighting wA pounds and valued at vA
z Item B, weighting wB pounds and valued at vB
z Item C, weighting wC pounds and valued at vC
z •••

Metaheuristics E-G. Talbi


Ex : Knapsack Problem

„ Input
z Capacity K
z n items with weights wi and values vi
„ Goal
z Output a set of items S such that
z the sum of weights of items in S is at most K
z and the sum of values of items in S is maximized

Metaheuristics E-G. Talbi


The Simplest Versions…

Can items be divided up such that only a portion is taken?


The thief can hold 5 pounds and has to choose from:
3 pounds of gold dust at $379.22/pound
6 pounds of silver dust at $188.89/pound
1/9 pound of platinum dust at $433.25/pound

Are all of the weights or total values identical?


The thief breaks into a ring shop where all of the rings
weight 1oz. He can hold 12 ounces; which should he
take?
Metaheuristics E-G. Talbi
A Deceptively Hard Version…

What if each problem has the same price/pound?

This problem reduces to the bin-packing problem: we


want to fit as many pounds of material into the knapsack
as possible.

How can we approach this problem?

Metaheuristics E-G. Talbi


Optimization methods

Exact algorithms Approximate (Heuristics)

Branch Dynamic Specific


CP Metaheuristics
and X programming (ε-approximation)

Problems of small size


Single
Population
solution

Simulated Tabu Evolutionary Ants,


Hill-climbing
annealing search algorithms SS, PSO

Tendance in exploitation Tendance in exploration


(neighborhood)

Metaheuristics E-G. Talbi


Exact methods

„ Obtain global optimal solutions


„ Guarantee their optimality
• Useless for large problems (problem, instance).

Metaheuristics E-G. Talbi


Approximate algorithms
„ Approximate algorithms or Heuristics
z The word heuristic has its origin in the old Greek
word heuriskein: art of discovering new strategies
(rules) to solve problems
z Generate « high quality » solutions in a
reasonable time for practical use.
z No guarantee to find the global optimal solution
„ Approximation algorithms
z Guarantee on the bound of the obtained solution
from the global optimum.
z ε-approximation

Metaheuristics E-G. Talbi


Metaheuristics

„ The suffix meta also a Greek word: upper


level methodology.
„ Introduced by F. Glover in 1986
„ Metaheuristic: Upper level general
methodology (templates) that can be used as
guiding strategies in designing underlying
heuristics to solve specific optimization
problems

Metaheuristics E-G. Talbi


Application of Metaheuristics

Metaheuristics E-G. Talbi


Genealogy of Metaheuristics

Metaheuristics E-G. Talbi


Metaheuristic design
No “Super Method” for all problems (NFL Theorem)
„ Exploration / Exploitation
„ Intensification / Diversification

„ Nature inspired / Non nature inspired


„ Memory usage / Memory less
„ Deterministic / Stochastic
„ Population based / Single-solution based
„ Iterative / Greedy
ƒ Dynamic vs. static objective function
ƒ One vs. various neighborhood structures

Metaheuristics E-G. Talbi


Greedy heuristics
„ Start from scratch (empty solution) and constructs a
solution by assigning values to one decision variable at a
time until a complete solution is generated
„ Solution = presence/absence of a finite set of elements
E={e1,…,en}. Partial solution = subset of E
„ Objective function = f : 2E Æ R

Metaheuristics E-G. Talbi


Constructive algorithms (Greedy)

„ Two design questions


z Definition of the set of elements

z Element selection heuristic: which gives the best

“profit” at each iteration.

„ Assignment of decision variables one by one


„ At each iteration, choose the optimal decision for the
current decision variable
„ Take an optimal decision at each step does not
guarantee global optimality.
„ Popular (Simplicity)
„ Reduced complexity
Metaheuristics E-G. Talbi
Greedy for TSP: nearest neighbor

Metaheuristics E-G. Talbi


Greedy for knapsack

Metaheuristics E-G. Talbi


Greedy for spanning tree

Metaheuristics E-G. Talbi


Constructive algorithms (SAT)

„ Heuristic : For each variable from 1 to n, in a given order,


assign the value which satisfies the maximum number of non
satisfied clauses (current).
„ Example :
x1 ∧ ( x1 ∨ x2 ) ∧ ( x1 ∨ x3 ) ∧ ( x1 ∨ x4 )
„ Let us consider the variable x1, x1=TRUE (3 clauses)
„ … Clause 1 non satisfied.
„ Poor Performances.

„ Heuristic for order selection: Order all the variables based


on the frequencies (from small to large values)

Metaheuristics E-G. Talbi


Constructive algorithms (SAT)

„ Example :

( x1 ∨ x2 ) ∧ ( x1 ∨ x3 ) ∧ ( x1 ∨ x4 ) ∧ ( x 2 ∨ x 4 ) ∧ ( x2 ∨ x5 ) ∧ ( x2 ∨ x6 ) ∧ F

„ F does not contain the variables x1 and x2, but many


occurrences of the other variables.
„ Other variables = higher frequencies
„ x1=TRUE (2 clauses), x2=TRUE (2 clauses)
„ Impossible to satisfy the clauses 3 and 4
„ Other improvements : Forbid the assignment which
initializes a clause to FALSE, frequencies into non treated
clauses, size of the clauses in choosing the order, ...

Metaheuristics E-G. Talbi


Constructive algorithms (NLP)

„ No efficient greedy algorithms for NLP problems

„ Example : function of two variables x1 and x2


„ Initialize one variable (ex. x1) to a constant, and vary
x2 until optimum found.

„ When optimum found (x2=constant), vary x1 until


optimum found

„ Efficient when no or small interactions between


variables (decomposable function)

Metaheuristics E-G. Talbi


Ex : Constructive algorithms (Graph
coloring)
a
f b

e
Color Largest Degree First (LF Algorithm)
c
Welsh and Powell [1967] d

Order by degree

Node : b, e, a, f, c, d
Color : 1 2 3 3 2 1
Metaheuristics E-G. Talbi
Ex : Constructive algorithms (Graph
coloring)
Merging Non-adjacent vertices
Dutton and Brigham [1981]
DB Algorithm

Cluster successively non-adjacent nodes,


Until the existence of non adjacents nodes
i.e. resultant graph is complete.

Heuristic : cluster first adjacent nodes


Which have the maximum number of common adjacent nodes

Metaheuristics E-G. Talbi


Ex : Constructive algorithms (Graph
coloring)
f a
b

e
c
d
(a, c) (a, f) (b, d) (c, d) (c, e) (d, f)
1 2 2 0 2 1
2 1 2
{a,f} {a,f}
{a,f}
b
e e {b,d}
{c,e} {b,d}
d c Metaheuristics c E-G. Talbi
When using Metaheuristics?

„ An easy problem (e.g. P class) with VERY large


instances
„ An easy problem with hard real-time constraints
„ Difficult problem (e.g. NP-complete) with moderate
size and/or difficult input structures
„ Optimization problems with time-consuming objective
functions and/or constraints
„ Non-analytical models of optimization problems:
black box scenario (objective function).
„ Non deterministic complex models: uncertainty,
robust optimization, dynamic, multi-objective, …

Metaheuristics E-G. Talbi


Design / Control problems

Metaheuristics E-G. Talbi


Common design concepts for
iterative metaheuristics

„ Representation (Encoding) = search space


„ Objective function

„ Search space + objective function = landscape

Metaheuristics E-G. Talbi


Representation: Characteristics

„ Completeness: All solutions associated to the


problem must be represented.
„ Connexity: A search path may exist between
any two solutions (related also to the search
operators), especially the global optimal
solution.
„ Efficiency: easy to manipulate bu the search
operators (time and space complexities).

Metaheuristics E-G. Talbi


Types of Representations
„ Linear representation: strings of symbols of a
given alphabet
„ Non-linear representation: based generally on
graph structures (e.g. trees)

„ Representation-solution mapping
„ Direct versus indirect encodings

Metaheuristics E-G. Talbi


Classical linear representations

Metaheuristics E-G. Talbi


Representation
Representation ==> Search Space + Size

„ SAT Problem with n variables : Binary vector


of size n, element = variable
„ Size of the search space = 2n.
„ Each solution of the search space is feasible
„ TSP Problem of n cities : permutation of
integer numbers 1, …, n. element = city.
„ Size of the search space = n!
„ Symmetric TSP : n! / 2
„ Starting city: (n-1)! / 2

Metaheuristics E-G. Talbi


Representation
„ Problem NLP : all real numbers for all n
dimensions.

„ Floating numbers representation to approximate real


numbers : 6 digits of precision, 107n possible different
solutions.

„ Choice of the representation is important.

Metaheuristics E-G. Talbi


Example : 8 Queens

Problem : Place 8 queens on a 8x8 chess such that


two queens don’t overlap.

Metaheuristics E-G. Talbi


Example : 8 Queens

A permutation of the numbers from


1 to 8

1 3 5 2 6 4 7 8

Permutation : a configuration

Metaheuristics E-G. Talbi


Problem Representation

„ For example, in the 8-Queens problem, when every


state is an assignment of the 8 queens on the board:
z The number of possibilities with all 8 queens on the board is
64 choose 8, which is over 4 billion.
billion
z The solution of the problem prohibits more then one queen
per row, so we may assign each queen to a separate row,
now we’ll have 88 > 16 million possibilities.
z Same goes for not allowing 2 queens in the same column
either, this reduces the space to 8!, which is only 40,320
possibilities.

Metaheuristics E-G. Talbi


Non-traditional linear representations

„ Random keys encoding: real-values for permutations

„ Messy representations
„ Non-coding regions
„ Diploid representations
„ Quantum representations
„ Mixed representations

Metaheuristics E-G. Talbi


Representation / solution mapping
„ Transforms the encoding (genotype) to a
problem solution (phenotype).
z One-to-one: single solution = single encoding
z One-to-many: one solution = multiple encodings
(redundancy): e.g. symmetry in grouping problems
z Many-to-one: one encoding = multiple solutions

Metaheuristics E-G. Talbi


Direct/ Indirect representations

„ Indirect representation: encoding is not a complete


solution
„ A decoder is required: deterministic or non-
deterministic
„ Ex: Flow-shop scheduling problem: j jobs. Each job
has M operations (M machines).

Metaheuristics E-G. Talbi


Objective function

Formulation of the goal


„ Self-sufficient objective functions
„ Guiding objective functions
„ Representation decoding
„ Interactive optimization
„ Relative and competitive objective functions
„ Meta-modeling

Metaheuristics E-G. Talbi


Self-sufficient objective functions

„ Straightforward objective function = original


formulation of the problem

„ TSP : minimize the total distance min ∑ dist( x, y )


„ SAT : boolean formulae satisfied (TRUE).
„ NLP : minimize the function G2(x).

Metaheuristics E-G. Talbi


Guiding objective functions

„ Transform the original goal for a better


convergence (guide the search)

„ SAT : Non optimal solution = FALSE Æ


z No information on the quality of solutions,
z No indication on the improvement of solutions to
guide the search towards good solutions, ...
z New objective function = Number of satisfied
clauses

Metaheuristics E-G. Talbi


Graph coloring

G = (S,A)
coloring f : S → C such as (s,t) ∈ A ⇒
f(s) ≠ f(t)
Chr(G) = min card f(S), chromatic number
of G
f

Chr(G) = 3

Many applications : frequency assignment


(telecommunications), scheduling,
timetabling, register allocation, …

Metaheuristics E-G. Talbi


Representation decoding

„ Relationship between the representation and


the objective function

„ Decode the representation to compute the


objective function

Metaheuristics E-G. Talbi


Steiner problem in a graph
„ Steiner problem in a graph:
non-oriented graph G=(V,E),V: vertices, E: edges
T: terminals (obligatory)
ce: weight of the edge e ∈ E

„ Find a spanning tree of terminal nodes of minimum


weight
(particulier case: if T = V, spanning tree problem of
minimum weight)

„ Steiner vertices: non obligatory vertices which generate the


optimal solution.
„ Applications: Telecommunications, Phylogeny in biology, …

Metaheuristics E-G. Talbi


Steiner problem in a graph
1 1
a 1 b

2 1 2

2 2
2 3 4

2 1 2

c 5 d
1 1
Metaheuristics E-G. Talbi
Steiner problem in a graph
1 1
a 1 b

2 1 2

2 2
2 3 4

2 1 2

c 5 d
1 1
Metaheuristics E-G. Talbi
Steiner problem in a graph
„ Characterization of a solution
X ⊆ V: sub-set of non obligatory vertices

„ Steiner Tree
⇑⇓
Tree which connects the terminal vertices (obligatory using a sub-
set X of non-obligatory vertices

„ Each Steiner Tree may be characterized by the sub-set of used


non-obligatory vertices

„ Optimal Steiner Tree


⇑⇓
Spanning Tree with Minimum Weight connecting the terminal
vertices and using the optimal subset X* of non-obligatory vertices

Metaheuristics E-G. Talbi


Steiner problem in a graph

„ |V| = p
„ Solution: s = (s1,s2,…,si,…,sp) ⇔ X
„ Representation by a 0-1 indication of appartenance
„ si = 1, if the i-th vertice non-obligatory is used (i.e., if
vi ∈ X)
si = 0, otherwise

Metaheuristics E-G. Talbi


Interactive optimization
„ The user is involved on-line in the loop of a
metaheuristic
„ Motivations:
z User intervention to guide the search process:
user knowledge, decision making in multi-criteria
problems, …
z User intervention to evaluate a solution: human
preferences (subjective evaluation), …
z Taste of coffee, wine, …
z Visual appeal or attractiveness

Metaheuristics E-G. Talbi


Relative and competitive objective
functions

„ Impossible to have an absolute objective function f


z Ex: Game theory, co-evolution, learning classifier systems
z Game: Strategy A may be better than B, B better than C, C
better than A
„ Relative fitness: associates a rank to a solution into a
population
„ Competitive fitness: competition between solutions
z Bipartite
z Tournament
z Full

Metaheuristics E-G. Talbi


Meta-modeling
„ Time consuming part: evaluation of the
objective function
„ Approximate the objective function
z Extremely expensive objective functions: structural
design optimization (e.g. 3D aerodynamic system
design: computational fluid dynamics CFd
simulation)
z Approaches
z Neural networks
z Response surface methodology
z Kriging models, DACE, Gaussian techniques, machine
learning approaches (SVM, …)

Metaheuristics E-G. Talbi


Meta-modeling

Metaheuristics E-G. Talbi


Constraint handling

„ Not trivial to deal with contraints


z Reject strategies: only feasible solutions are kept
z Penalizing strategies: penalty functions
z Repairing strategies: repair infeasible solutions
z Decoding strategies: only feasible solutions are
generated
z Preserving strategies: specific representation and
search operators which preserve the feasibility

Metaheuristics E-G. Talbi


Parameter tuning

„ Many parameters have to be tuned for any


metaheuristics
„ Large flexibility and robustness but careful initialization
(efficiency and effectiveness of the search)
„ Optimal tuning depends on the problem and instance:
no universally optimal tuning

Metaheuristics E-G. Talbi


Meta-optimization

Metaheuristics E-G. Talbi


Performance analysis of
metaheuristics
„ Experimental design: goals of the
experiments, selected instances (real-life,
constructed) and factors to be defined
z Random instances may be controversial
„ Measurements: measures to compute Æ
statistical analysis
„ Reporting in a comprehensive way

Metaheuristics E-G. Talbi


Criteria
„ Quality of solutions

„ Computational effort: search time, …

„ Robustness (instances, problems,


parameters, …)

„ Easy of use, simplicity, flexibility,


development cost, …

Metaheuristics E-G. Talbi


Quality of solutions

Metaheuristics E-G. Talbi


Measurements
„ Statistical analysis: performance assessment and
estimante the confidence of the results to be
scientifically valid
„ Ordinal analysis: ranking metaheuristics (e.g. Borda
count voting method, Copeland’s method)
According to the characteristics of the measurements

Metaheuristics E-G. Talbi


Reporting: Interaction plots

Metaheuristics E-G. Talbi


Reporting: deviation bars, confidence
intervals

Metaheuristics E-G. Talbi


Why a software framework?
„ 3 major approaches are used for the
development of metaheuristics:
z From scratch or no reuse: costly (time,
manpower), error prone, difficult maintain and
evolve, …
z Code reuse: reuse third party code – application
dependent, error prone, time consuming, …
z Code and design reuse (design patterns): use of
generic templates, inheritance,
z Problem dependent part
z Invariant part

Metaheuristics E-G. Talbi


Why a software framework?
ƒ Optimization Problems in practice

ƒ Diversity

ƒ Continual evolution of the modeling (regards


needs, objectives, constraints, …)

ƒ Need to experiment many solving methods,


techniques of hybridization, parameters, …

Metaheuristics E-G. Talbi


Main characteristics of software
frameworks

„ Maximum design and code reuse


„ Flexibility and adaptability
„ Utility
„ Transparent and easy access to performance
and robustness
„ Portability
„ Ease of use and efficiency

Metaheuristics E-G. Talbi


ParadisEO framework

ƒ A templates-based, ANSI-C++ compliant Metaheuristic


Computation Framework.
ƒ GForge Project by INRIA Dolphin Team.
ƒ Paradigm Free (genetic algorithms, genetic programming,
particle swarm optimization, local search, TS, SA, ILS,
VNS, EDA, ES, …).
ƒ Hybrid, distributed and cooperative models.
ƒ Flexible / a considered problem.
ƒ Generic components (variation operators, selection,
replacement, termination, particle behaviors …).
ƒ Many services (visualization, managing command-line
parameters, saving/restarting, …).

Metaheuristics E-G. Talbi


ParadisEO framework

Metaheuristics E-G. Talbi


Frameworks: State of the art

Metaheuristics E-G. Talbi


Guideline in solving a given
optimization problem

Metaheuristics E-G. Talbi


Metaheuristics E-G. Talbi
Exercises

„ Representation and objective functions


for the following problems
„ Greedy heuristics

Metaheuristics E-G. Talbi


Ex : Magic Square

N=3

- Distinct N2 integers over a matrix N*N


- Magic square of order N : Arrangement such that the N numbers in
all rows, all columns, and both diagonals sum to the same constant
(magic sum)
- The magic sum has the value M(N) = (N3+N)/2.
- Magic squares of order n = 3, 4, 5, …, the magic constants are: 15,
34, 65, 111, 175, 260, ...

Metaheuristics E-G. Talbi


Ex : ‘Casse-tete’

A non feasible solution

- 2D grid of size 4*4 covered by 16 jetons


- Each row and each column of the grid there
will be a pair number of jetons.

Metaheuristics E-G. Talbi


Bin packing
w3

w1
w4

w2

w5 Items to pack

Bins and items have the same widht

Bin capacity C

Metaheuristics E-G. Talbi


VRP: Vehicle routing problem

customers
routes

Depot Depot

(a) (b)

„ Constraints :
„ Objectives :

Metaheuristics E-G. Talbi


Greedy for knapsack

Constructed solution = (3,5,7)

8
6
3
1 5 7
2
4

w1=5 w2=4 w3=6 w4=3 w5=5 w6=8 w7=5 w8=9 knapsack with a
u1=3 u2=5 u3=7 u4=4 u5=2 u6=9 u7=5 u8=8 capacity of 15

Metaheuristics E-G. Talbi


Greedy for spanning tree

13 16
A B C

14 3 4

Constructed solution

(B,E), (C,F), (D,G), (E,H), (F,I), (E,D), (A,B), (H,I)


10 2
D E F

6 8
5

19 15
I
G H

Metaheuristics E-G. Talbi

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy