Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints:...

23
Chapter 7 Handling Constraints

Transcript of Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints:...

Page 1: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Chapter 7Handling Constraints

Page 2: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

NLP with linear constraints:Optimize

Domain constraints:

Equalities:

Inequalities:

for ,iii uxl qi ,,1

bAx ,,, where 1

qq Rxx x ,)( ijaA pbbb ,,1

pi 1,1 qj

Rxxf q ),...,( 1

dCx ,,, where 1 qxx x ,)( ijcC mddd ,,1

mi 1,1 qj

NonLinear Programming Problem

Page 3: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

GENOCOP I

Original GENOCOP (GEnetic algorithm, for Numerical Optimization for COnstrained Problems):

With linear constrain An elimination of the equalities (convex) Special “genetic” operators

Page 4: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Example Optimize a function of six variables:

subject to the following constraints

Express four variables as functions of the remaining two:

),,,,,( 654321 xxxxxxf

0,0,0,0,0,0

4

3

10

5

654321

52

41

654

321

xxxxxx

xx

xx

xxx

xxx

216

25

14

213

3

4

3

5

xxx

xx

xx

xxx

Page 5: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Reduce the original problem to the optimization problem of a function of two variables and :

Subject to the following constraints (inequalities only):

These inequalities can be further reduced to:

))3(),4(),3(),5(,,(),( 2121212121 xxxxxxxxfxxg

.03

04

03

05

0,0

21

2

1

21

21

xx

x

x

xx

xx

.5

04

03

21

2

1

xx

x

x

Page 6: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Equality constraint set:

Split A:

New set of inequalities (after removal ):

Split C:

bAX

bXAXA 22

11

22

11

11

1 XAAbAX

equations)equality t independen (,,, where

21

1

pxxxX

piii

12

21

11

11 uXAAbAl

1X

dCX dXCXC 2

21

1

bACdXAACC 111

22

1112 )(

Elimination of Equalities

Page 7: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Final set of constraints:

original domain constraints:

new inequalities:

original inequalities (after removal of variables):

112

211 uAXAblA

bACdXAACC 111

22

1112 )(

222 uXl

1X

Page 8: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Example (1) Optimize a function of six variables:

subject to the following constraintsDomain constraints:

Equalities:

Inequalities:

),,,,,( 654321 xxxxxxf

120

34

103

62

55 ,020 ,515

,010 ,5075 ,4020

52

41

653

321

654

321

xx

xx

xxx

xxx

xxx

xxx

Page 9: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Example (2)

Transportation problem:

1211109

8765

4321

1211108765431 )181614209712112010(

xxxx

xxxx

xxxx

xxxxxxxxxx

5

25

15

1015155

minimize

Page 10: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Representationfloating point representation  

Initialization process A subset of potential solutions -- the space of the

whole feasible region (randomly) The remaining subset -- the boundary of the

solution space.

  Genetic operators

dynamic non-uniform.

Page 11: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Mutation

Uniform mutation

Boundary mutation

Non-uniform mutation

mk vvvx ,,,1 mk vvvx ,,,, '1

'

],[ )()(' t

vtv s

kskk ulv

},{ )()(' t

vtv s

kskk ulv

vv t u v

v t v lkk k k

k k k

' ( , )

( , )

if a random digit is 0

if a random digit is 1

( , ) ( )( )

t y y rt

Tb

11

Page 12: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Crossover Arithmetical crossover

Simple crossover

Heuristic crossover

)1(

)1(

12'2

21'1

axaxx

axaxx

)()(

:

]1..0[:

)(

12

2123

xfxf

w

r

xxxrx

thanbetter is

number attemp

number random

)1(,),1(,,,

)1(,),1(,,,

111'2

111'1

ayaxayaxyyx

axayaxayxxx

qqkkk

qqkkk

Page 13: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

GENOCOP II

With non-linear constrain Distinguish between linear and nonlinear

constraints A single starting point Quadratic penalty function Iterative execution of GENOCOP

Page 14: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Algorithm

Procedure GENOCOP II

begin

split the set of constraints C into

select a starting point ( need not be feasible.)

set the set of active constraints, A to (V: violated constraints

at point )

set penalty

 

C L N Ne i

xsxs

r r 0

t 0

A N Ve xs

Page 15: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

while (not termination-condition) dobegin

execute GENOCOP I for the function

with linear constraints L and the starting point save the best individual :

update A:

decrease penalty r:

(where ; end

end

xs

t t 1

AAxfrxF Tr2

1)(),(

x*

x xs *

VSAA

r g r t ( , )

);1,(),( trgrtrg ,0r ) 1)0,( rg

Page 16: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Example

Minimize

s.t.

yxyxf ),(

369688324:2

2882:1234

234

xxxxyc

xxxyc

IterationNumber

01234

The bestpoint(0,0)(3,4)

(2.06, 3.98)(2.3298, 3.1839)

(2.3295, 3.1790)

ActiveConstraints

nonec2

c1 , c2

c1 , c2

c1 , c2

Page 17: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Other Techniques

Homaifar

Joines and Houck

mjqxh

qjxgxf

xpxfxeval

,m,qjxh

,q,ixg

xf

j

j

j

j

i

1)(

1)}(,0max{)(

)()()(

10)(

10)(

)(

if ,

if ,

s.t.

min

m

j jij xfRxp1

2 )()(

m

j j xftCxp1

)()()(

Page 18: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Schoenauer and Xanthakis1. Start with a random population of individuals

(feasible or infeasible)

2. Set ( j is a constraint counter)

3. Evolve this population with , until a given percentage of population (flip threshold ) is feasible for this constraint

4. Set

5. The current population is the starting point for the next phase of the evolution, where .

6. If , repeat the last two steps, otherwise optimize the objective function ,

1 jj

1j

)()( xfxeval j

)()( xfxeval jmj )( mj

)()( xfxeval

Page 19: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Powell and Skolnick

otherwise

if

m

j jFx

Fx

m

j j

xfrxf

xf

Fx

xt

xtxfrxP

1

1

)}},()({min

)}({max,0max{

,0

),(

),()()(

Page 20: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Bean and Hadj-Alouane

otherwise (t),

allfor if (t),

allfor if (t),)1/

2

1

tiktFiB

tiktFiB

t

XfXPm

j j

1)(

1)((

)1(

)()(1

2

Page 21: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

GENOCOP III Two separate populations

(search point): satisfy linear constraints

(reference point): satisfy all constraints Repair:

Feasible points: (reference point )

Infeasible search points: (search point )

( : better reference points)

( is feasible)

( :probability of replacement)

(if is better than )

( :probability of replacement)

Ps

Pr

R

eval R f R( ) ( )

Z aS a R ( )1 Reval S eval Z f Z( ) ( ) ( ) Z

S Z

pr

R Z f Z( ) f R( )

S Z

pr

S

Page 22: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.
Page 23: Chapter 7 Handling Constraints. NLP with linear constraints: Optimize Domain constraints: Equalities: Inequalities: NonLinear Programming Problem.

Extend GENOCOP III

Nonlinear equations 0)( Xh j

)(Xh j