Constraint Optimization We are interested in the general non-linear programming problem like the...

36
Constraint Optimization We are interested in the general non-linear p rogramming problem like the following Find x which optimizes f(x) subject to gi(x)0, i=1,,n hj(x)=0, j=1, ,p

Transcript of Constraint Optimization We are interested in the general non-linear programming problem like the...

Constraint Optimization

We are interested in the general non-linear programming problem like the following

Find x which optimizes f(x)subject togi(x)0, i=1,,nhj(x)=0, j=1, ,p

How to solve

Penalty functions

Special representations and operators

Repair algorithms

Separation of objectives and constraints

Hybrid methods

Penalty functions

The most common approach to handle constraints (particularly, inequality constraints) is to use penalties. The basic idea is to transform a constrained-optimization problem into an unconstrained one by adding/substracting a certain value to/from the objective function based on the amount of constraint violation present in a certain solution.

General formulation of the penalty function

The general formulation of the penalty function is(x)=f(x)(riGi+ cjLj)where (x) is the new objective function to be optimized, G

i and Lj are functions of the constraints gi(x) and hj(x), respectively, and ri and cj are positive constants normally called “penalty factors”

The most common form of Gi and Lj isGi=max(0,gi(x)) Lj=|hj(x)|

where and are normally 1 or 2

Minimum penalty rule

The penalty should be kept as low as possible, just above the limit below which infeasible solutions are optimal.

If the penalty is too high and the optimum lies at the boundary of the feasible region, the GA will be pushed inside the feasible region very quickly and will not be able to move back towards the boundary with the infeasible region. If there are several disjoint feasible regions in the search space, the GA would tend to move to one of them and would not be able to move to a different feasible region.

If the penalty is too low, a lot of the search time will be spent exploring the infeasible region because the penalty will be negligible with respect to the objective functions.

Static Penalties

The penalty factors remain constant during the entire evolutionary process.

Fitness(x)=f(x)(Rimax[0,gi(x)]2)

Dynamic penalties

Current generation number is involved in the computation of the corresponding penalty factors

Fitness(x)=f(x)((Rit)max[0,gi(x)]2)

Annealing penalties

Penalty factors are changed once in many generations (after the algorithm has been trapped in a local optima)

Fitness(x)=f(x)max[0,gi(x)]2/where is the cooling schedule.

Adaptive penalties

Use a penalty function which takes a feedback from the search process.

Fitness(x)=f(x)(t)max[0,gi(x)]2

where (t) is updated at every generation t in the following way

If the best individual in the last k generations was always feasible: (t+1)= (t)/, >1

If the best individual in the last k generations was never feasible: (t+1)= (t), >1

Otherwise, there are some feasible and infeasible individuals tied as best in the population, the penalty does not change.

Segregated GA

Use two penalty parameters instead of one. These two values aim at achieving a balance between heavy and moderate penalties.

A population of size 2m is generated. These individuals are divided into two groups. Each group use one penalty parameter.

Choose m best individuals from these two groups to become parents for the next generation.

These m parents produce m offspring. The 2m individuals are combined together as a new generation.

Death penalty

The rejection of infeasible individuals is probably the easiest way to handle constraints.

Special Representations and operators

Solve a certain problem for which a generic representation scheme might not be appropriate

To simplify the shape of the search space

It is always difficult to locate at least a single feasible solution.

Linear constraints

Eliminate equality constraints together with an equal number of problem variables

The search space is a convex sets.

Crossover: linear combinations of individuals

Mutation: Re-define the domain.

Linear constraints: example

Optimize f(x1,x2,x3,x4,x5,x6)

2x1+x2+x3=6

x3+x5-3x6=10

x1+4x4=3

x2+x5120

-40 x1 20 50 x2 75

0 x3 10 5 x4 15

0 x5 20 -5 x6 5

Eliminate equality constraints

x1=3-4x4

x2=-10+8x4+x5-3x6

x3=10-x5+3x6

New problem

Optimize g(x4,x5,x6)=f(3-4x4,-10+8x4+x5-3x6,10-x5+3x6,x4,x5,x6)

-10+8x4+2x5-3x6120 (x2+x5120)-403-4x420 (-40x120)50-10+8x4+x5-3x675 (50x275)010-x5+3x610 (0x310)5x415 0x520 -5x65Combine 2nd and 5th: 5 x4 10.75

Mutation

If (x4,x5,x6)=(10,8,2), then

x4[7.25,10.375]

x5 [6,11]

x6 [1,2.666]

Heuristic crossover

Suppose f(x2) is better than f(x1)

x3=r(x2-x1)+x2

r[0,1]

Check if x3 satisfy all the constraints

Decoder

A chromosome “gives instructions” on how to build a feasible solution.

For each feasible solution there must be a decoded solution

Each decoded solution must correspond to a feasible solution

The transformation is computationally fast and it has locality feature in the sense that small changes in the decoded solution result in small changes in the solution itself

TSP and ordinal expression

The ith gene belongs to the region [1,n-i+1]. It determines which city will be chosen from the city list.

Ordinal expression

City list (1 2 3 4 5 6 7 8 9)

Chromosome ( 1 1 2 1 4 1 3 1 1)

Then the path is (1 2 4 3 8 5 9 6 7)

Ordinal expression

City list (1 2 3 4 5 6 7 8 9) Chromosome ( 1 1 2 1 4 1 3 1 1)

Then the path is (1)

City list (2 3 4 5 6 7 8 9) Chromosome ( 1 1 2 1 4 1 3 1 1)

Then the path is (1 2)

City list (3 4 5 6 7 8 9) Chromosome ( 1 1 2 1 4 1 3 1 1)

Then the path is (1 2 4)

City list (3 5 6 7 8 9) Chromosome ( 1 1 2 1 4 1 3 1 1)

Then the path is (1 2 4 3)

City list (5 6 7 8 9) Chromosome ( 1 1 2 1 4 1 3 1 1)

Then the path is (1 2 4 3 8)

… ...

Crossover

The traditional one-point crossover can be used

p1=(1 1 2 1 . 4 1 3 1 1)

p2=(5 1 5 5 . 5 3 3 2 1)

which correspond to the paths

(1 2 4 3 8 5 9 6 7)

(5 1 7 8 9 4 6 3 2)

Crossover

After crossover

c1=(1 1 2 1 5 3 3 2 1)

c2=(5 1 5 5 4 1 3 1 1)

The new paths are

(1 2 4 3 9 7 8 6 5)

(5 1 7 8 6 2 9 3 4)

Repair algorithms

Repair an infeasible individual, i.e., to make feasible an infeasible individual.

Such a repaired version can be used either for evaluation only, or it can also replace (with some probability) the original individual in the population.

Basic rule

There are no standard heuristics for the design of repair algorithms

The success of this approach relies mainly on the ability of the user to come up with such a heuristics.

It is possible to use a greedy algorithm (i.e., an optimization algorithm that proceeds through a series of alternatives by making the best decision, as computed locally, at each point in the series), a random algorithm or any other heuristic which would guide the repair process.

Repair by random evolution

The main idea is to use random evolutionary search combined with a mathematical programming technique for unconstrained optimization. Whenever a solution is not feasible, the following constraint functional is minimized

C(x)=hj2(x)- gj(x)c1={i=1,,n| |hi(x)|>}c2={j=1, ,q| gj(x)<0}

Separation of constraints and objectives

Handle constraints and objectives separately

Superiority of feasible points

Behavioral memory

Superiority of feasible points

Evaluations of feasible solutions are mapped into a better interval, and infeasible solution into a worst interval

Modified tournament selection

A feasible solution is always better than an infeasible one

Between two feasible solutions, the one having a better objective function value is preferred.

Between two infeasible solutions, the one having smaller constraints violation is preferred

Behavioral memory

Constraints are handled in a particular orderStart with a random population of individualsSet j=1 (j is the constraint counter)Evolve this population to minimize the violation of the jth con

straint, until a given percentage of the population is feasible for this constraint. Points that do not satisfy at least one of the 1st, 2nd,, (j-1)th constraints are eliminated from the population.

j=j+1. If j<=m repeat the former step.Optimize the objective function and reject infeasible individua

ls.

Hybrid methods

In this section we are considering methods that are coupled with another technique (normally a numerical optimization approach) to handle constraints.

Fuzzy logic

Replace constraints of the form gi(x)bi by a set of fuzzy functions ci(x)

if gi(x)bi, ci(x)=1if bi<gi(x)bi+s, ci(x)=(exp(-p((x-bi)/s)^2)-exp(-p))/(1-exp(-

p))if gi(x)>bi+s, ci(x)=0This method allows a higher degree of tolerance if gi(x) is g

reater than bi but close to bi. The tolerance decrease rapidly when the error increase.

fitness(x)=f(x)min(c1(x),,cm(x))

Reliability of Communication System

Reliability of Communication System

R(k): valid probability of component k Q(k): invalid probability of component kRs: valid probability of the system Qs: invalid probability of the systemQs=(Q(1)Q(4))2R(3)+(Q(2)+R(2)Q(1)Q(4))2Q(3)C(k)=K(k)R(k)^a(k): cost of component kCs=2C(1)+2C(2)+C(3)+2C(4): cost of the system

Minimum cost problem

Min Css.t. RminRs Rmin(k) R(k) 1.0

We use penalty functionMin Cs+max[0, Rmin-Rs]s.t. Rmin(k) R(k) 1.0

Maximum reliability

min Qss.t. CsCmax Rmin(k) R(k) 1.0

We use variable replacement: x(k)=R(k)^a(k)Then the constraints are2K(1)X(1)+2K(2)X(2)+K(3)X(3)+2K(4)X(4) CmaxRmin(k)^a(k)X(k)1.0