Successfully reported this slideshow.
Penalty function methods
A constrained optimization problem is usually written as a nonlinear optimization
x is the vector of solutions,
F is the feasible region and S is the whole search space
There are q inequality and m-q equality constraints
f(x) is usually called the objective function or criterion function.
Objective function and constraints could be linear or nonlinear in the problem.
Vector x that satisfies all the constraints is a feasible solution of the problem.
nonlinear programming problem is to find a point x* ∈ F such that F(x *) ≤f(x) for
all x ∈F
Category 1: Methods based on penalty functions
- Death Penalty
- Static Penalties
- Dynamic Penalties
- Annealing Penalties
- Adaptive Penalties
- Segregated GA
- Co-evolutionary Penalties
Category 2: Methods based on a search of feasible solutions
- Repairing unfeasible individuals
- Superiority of feasible points
- Behavioral memory
Category 3: Methods based on preserving feasibility of solutions
- The GENOCOP system
- Searching the boundary of feasible region
- Homomorphous mapping
Category 4: Hybrid methods
CONSTRAINT HANDLING in GAs
rejects unfeasible solutions from the population
considering only the points that are in feasible
when the problem is highly constrained, the algorithm
will spend a lot of time to find too few feasible solutions.
region of the search space prevents to find better
to penalize infeasible solutions is to apply a constant penalty to those
solutions which violate feasibility in any way.
penalty parameters don’t depend on the current generation number and a
constant penalty is applied to unfeasible solutions.
The penalty function for a problem with m constraints
fp(x) is the penalized objective function,
f(x) is the unpenalized objective function,
Ci is a constant imposed for violation of constraint i.
More common and more effective is to penalize according of distance to
assuming distance = number of constraints violated.
A more sophisticated and more effective penalty includes a distance metric for
each constraint, and adds a penalty which becomes more severe with distance
distance metric , provides information concerning the nearness of the solution to
this nearness to feasibility is relevant in the same magnitude to the fitness of the
A general formulation is as follows for a minimization problem:
di is the distance metric of constraint i applied to solution x
k is user defined exponent, with values of k of 1 or 2 often used.
Selection of Ci is more difficult.
Homaifar, Lai, & Qi method
Generate l levels of violation for each constraint,
Generate penalty coefficient Rij (i=1,...,l ; j=1,…,m) for
each level of violation and each constraint.
The bigger coefficients are given to the bigger violation levels,
Generate a random population using both feasible and
Evaluate individuals using
Rij indicates the penalty coefficient corresponding to jth constraint
and ith violation level. m is the number of constraints.
si(t) is a monotonically non-decreasing in
value with t.
Metrics for t include number of generations
or the number of solutions searched.
Recent uses of this approach include Joines and Houck
penalty parameters are usually dependent on the current generation
Joines and Houck
Michalewicz and Attia : simulated annealing
Separate all constraints into four subsets:
linear equations, linear inequalities,nonlinear equations and nonlinear inequalities,
starting point =a random single point that satisfies linear constraints.
initial population = of copies of this single point
Create a set of active constraints A =
nonlinear equations and violated nonlinear inequalities,
Evolve the population,
If τ<τf (freezing point) stop the procedure, otherwise,
- Diminish τ,
- Use the best solution as a starting point for next generation,
- Update A,
-Repeat the previous step of the main part.
The algorithm is terminated at a previously determined freezing point τf .
Michalewicz and Attia used τ0=1, τi+1=0.1τi , τf=0.000001
not adaptive to the ongoing success of the search and
cannot guide the search to particularly attractive regions
or away from unattractive regions based on what has
already been observed.
Bean and Hadj-Alouane (1992) propose penalty functions which are
revised based on the feasibility or infeasibility of the best, penalized
solution during recent generations
Smith and Tate (1993).
•NFT is the threshold distance from the feasible region at which the user would
consider the search as “getting warm.”
• Unfeasible solutions at this distance are considered to be reasonable since they are
very close to the feasible region.
•The penalty function encourages the evolutionary algorithm to explore within the
feasible region and the NFT-neighborhood of the feasible region, and discourage
search beyond that threshold.
Fall(t) denotes the unpenalized value of the best solution yet found,
Ffeas(t) denotes the value of the best feasible solution yet found.
set two penalty parameters (say, p1 and p2) in two different populations.
aim : to overcome the problem of too high and too low penalties
If a small value is selected for p1 and a large value for p2, a simultaneous
convergence from feasible and unfeasible sides can be achieved.
- Generate 2 x pop individuals at random (pop is the population size),
- Design two different evaluation functions:
- Evaluate each individual according to two evaluation functions,
- Create two ranked lists according to f1(x) and f2 (x),
- Combine two ranked lists in a single one ranked population with size pop,
- Apply genetic operators,
- Evaluate the new population using both penalty parameters,
- From the old and new populations generate two populations of the size pop
- Repeat the last four steps of the process.