ocw.snu.ac.kr · 1 computer aided ship design, i-7 constrained nonlinear optimization method, fall...

125
1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh Naval Architecture & Ocean Engineering Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh Computer Aided Ship Design Part I. Optimization Method Ch. 7 Constrained Nonlinear Optimization Method September, 2013 Prof. Myung-Il Roh Department of Naval Architecture and Ocean Engineering, Seoul National University of College of Engineering Computer Aided Ship Design Lecture Note

Upload: others

Post on 14-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

1Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Computer Aided Ship Design

Part I. Optimization MethodCh. 7 Constrained Nonlinear Optimization Method

September, 2013Prof. Myung-Il Roh

Department of Naval Architecture and Ocean Engineering,Seoul National University of College of Engineering

Computer Aided Ship Design Lecture Note

Page 2: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

2Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Ch. 7 Constrained Nonlinear Optimization Method

7.1 Quadratic Programming(QP)7.2 Sequential Linear Programming(SLP)7.3 Sequential Quadratic Programming(SQP)7.4 Determine the Search Direction of the Quadratic Programming Problem by Using the Simplex Method7.5 Summary of the Sequential Quadratic Programming(SQP)

Page 3: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

3Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

7.1 Quadratic Programming(QP)

Page 4: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

4Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

042)(042)(

212

211

£+--=£+--=

xxgxxg

xx

MinimizeSubject to

222)( 2122

21 +--+= xxxxf x

Minimum point: 92*

34

34* )(),,( == xx f

0,0 21 ³³ xx

x1

x2

1 2 3 4

1

2

3

4

A

g2 = 0

g1 = 0

92*

34

34* )(),,( == xx f

Minimum at Point A

Feasible region

f = 1.32

f = 0.64

042)(042)(

212

211

£+--=£+--=

xxgxxg

xx

MinimizeSubject to

222)( 2122

21 +--+= xxxxf x

1 20, 0x x- £ - £

21 1 2 1

22 1 2 2

( ) 2 4 0( ) 2 4 0

g x x sg x x s

= - - + + =

= - - + + =

xx

MinimizeSubject to

222)( 2122

21 +--+= xxxxf x

2 21 1 2 20, 0x xd d- + = - + =

Inequality constraints are transformed to equality constraints by introducing the slack variable.

[Review] 4.3: Finding the optimal solution for the quadratic objective function with linear inequality constraints problem by using the Kuhn-Tucker Necessary Condition, where xi are nonnegative (1/4)

Quadratic programming problem- Objective function: quadratic form- Constraint: linear form

Page 5: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

5Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

x1

x2

1 2 3 4

1

2

3

4

A

g2 = 0

g1 = 092*

34

34* )(),,( == xx f

Minimum at Point A

Feasible region

f = 1.32

f = 0.64

21 1 2 1

22 1 2 2

( ) 2 4 0( ) 2 4 0

g x x sg x x s

= - - + + =

= - - + + =

xx

MinimizeSubject to

222)( 2122

21 +--+= xxxxf x

2 21 1 2 20, 0x xd d- + = - + =

Lagrange function2 21 2 1 2

21 1 2 1

22 1 2 2

2 21 1 1 2 2 2

( , , , , ) 2 2 2( 2 4 )( 2 4 )( ) ( )

L x x x xu x x su x x s

x xz d z d

= + - - +

+ - - + +

+ - - + +

+ - + + - +

x u s ζ δ

Kuhn-Tucker necessary condition: ( , , , , )LÑ =x u s ζ δ 0

21 1

1

0L xdz¶

= - =¶

22 2

2

0L xdz¶

= - =¶

1 1 2 11

2 2 2 0L x u ux

z¶= - - - - =

¶ 2 1 2 22

2 2 2 0L x u ux

z¶= - - - - =

¶2

1 2 11

2 4 0L x x su¶

= - - + + =¶

21 2 1

2

2 4 0L x x su¶

= - - + + =¶

1 11

2 0L u ss

¶= =

¶ 2 22

2 0L u ss¶

= =¶

1 11

2 0L z dd¶

= =¶ 1 1

1

2 0L z dd¶

= =¶

[Review] 4.3: Finding the optimal solution for the quadratic objective function with linear inequality constraints problem by using the Kuhn-Tucker Necessary Condition, where xi are nonnegative (2/4)

Page 6: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

6Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

, 0, 1, 2i iu iz ³ =1 1

1

2 0L z dd¶

= =¶

Kuhn-Tucker necessary condition: ( , , , , )LÑ =x u s ζ δ 0

21 1

1

0L xdz¶

= - =¶

22 2

2

0L xdz¶

= - =¶

1 11

2 0L z dd¶

= =¶

1 1 2 11

2 2 2 0L x u ux

z¶= - - - - =

¶ 2 1 2 22

2 2 2 0L x u ux

z¶= - - - - =

¶2

1 2 11

2 4 0L x x su¶

= - - + + =¶

21 2 2

2

2 4 0L x x su¶

= - - + + =¶

1 11

2 0L u ss

¶= =

¶ 2 22

2 0L u ss¶

= =¶

21 1xd® = 2

2 2xd® =Substitute Substitute

Multiply both sides by 1d

21 12 0z d® = 2

2 22 0z d® =

Multiply both sides by 2d

2 22 0xz =

1 1 2 11

2 2 2 0L x u ux

z¶= - - - - =

¶ 2 1 2 22

2 2 2 0L x u ux

z¶= - - - - =

¶2

1 2 11

2 4 0L x x su¶

= - - + + =¶

21 2 2

2

2 4 0L x x su¶

= - - + + =¶

1 11

2 0L u ss

¶= =

¶ 2 22

2 0L u ss¶

= =¶

1 12 0xz =

Reformulated Kuhn-Tucker necessary condition:

, , 0, 1, 2i i iu iz d ³ =

[Review] 4.3: Finding the optimal solution for the quadratic objective function with linear inequality constraints problem by using the Kuhn-Tucker Necessary Condition, where xi are nonnegative (3/4)

We eliminate two variables , and two equations.1d 2d

Page 7: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

7Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Review] 4.3: Finding the optimal solution for the quadratic objective function with linear inequality constraints problem by using the Kuhn-Tucker Necessary Condition, where xi are nonnegative (4/4)

Lagrangian function

x1

x2

1 2 3 4

1

2

3

4

AB

Cg2 = 0

g1 = 0

92*

34

34* )(),,( == xx f

Minimum at Point A

Feasible region

f = 1.32

f = 0.64

Case #1: s1=s2=z1=z2=0, (Point A)

92

2134

21 , ==== uuxxCase #2: u1=s2=z1=z2=0, (Point B)

512

152

257

256

1 ,,, -==== suxxCase #3: u2=s1=z1=z2=0 , (Point C)

512

252

156

257

1 ,,, -==== suxxCase #4: u1=u2=z1=z2=0 , (Point D)

1,1 22

2121 -==== ssxx

D

E

Case #5: u1=u2=x1=x2=0 , (Point E)

2,4,0

21

22

2121

-==-====

zzssxx

Case #6: u1=s2=x1=x2=0 , (Point E)

042,4,0

2221

2121

¹++--

-===

sxxsxx

Case #7: u2=s1=x1=x2=0 , (Point E)

042,4,0

2121

2221

¹++--

-===

sxxsxx

Case #8: s1=s2=x1=x2=0 , (Point E)

042,042,0

2221

212121

¹++--

¹++--==

sxxsxxxx

F

H

G I

Case #9: u1=s2=z2=x1=0 , (Point F)

3,2,1,2,0

121

221

-=-=

===

zsuxx

Case #10: u2=s1=z1=x2=0 , (Point G)

3,2,1,0,2

2

22121

-=-====

zsuxx

Case #11: s1=s2=z1=x2=0 , (Point G)

042,0,2

2221

21

¹++--

==

sxxxx

Case #12: u2=s1=z2=x1=0 , (Point H)

14,4,6,4,0

122

121

-==

===

zsuxx

Case #13: s1=s2=z2=x1=0 , (Point H)

042,4,0

2221

21

¹++--

==

sxxxx

Case #14: u1=s2=z1=x2=0 , (Point I)

14,4,6,0,4

221

221

-==

===

zsuxx

Case #15: u1=u2=z2=x1=0 , (Point J)

2,2,3,1,0

122

2121

-=-=

-===

zssxx

Case #16: u1=u2=z1=x2=0 , (Point K)

2,3,2,0,1

222

2121

-=-=

-===

zssxx

J

K

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

It has to be nonnegative.

The constraint is violated.

The constraint is violated.

The constraint is violated.

The constraint is violated.

The constraint is violated.

2 21 2 1 2

21 1 2 1

22 1 2 2

2 21 1 1 2 2 2

( , , , , ) 2 2 2( 2 4 )( 2 4 )( ) ( )

L x x x xu x x su x x s

x xz d z d

= + - - +

+ - - + +

+ - - + +

+ - + + - +

x u s ζ δ

Page 8: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

8Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Minimize

Subject to

2 21 2 1 2( ) 2 2 2f x x x x= + - - +x

0,04242

21

21

21

³³-£---£--

xxxxxx

Æ0,0

042042

222

211

2221

2121

=+-=+-

=++--

=++--

dd xxsxxsxx

Kuhn-Tucker necessary condition:

,0222 12111

=---+-=¶¶ zuuxxL 0222 2212

2

=---+-=¶¶ zuuxxL

042 2221

2

=++--=¶¶ sxxuL,042 2

1211

=++--=¶¶ sxxuL

0),,,,( =Ñ δζsuxL

,02 111

==¶¶ susL 02 22

2

==¶¶ susL

0211

1

=+-=¶¶ dz

xL

0222

2

=+-=¶¶ dz

xL,02 111

==¶¶ dzdL 02 22

2

==¶¶ dzdL

where 0, ³iiu z

2 21 2 1 2

2 21 1 2 1 2 1 2 2

2 21 1 1 2 2 2

( , , , , ) 2 2 2( 2 4 ) ( 2 4 )( ) ( )

L x x x xu x x s u x x s

x xz d z d

= + - - +

+ - - + + + - - + +

+ - + + - +

x u s ζ δLagrange function

0, ³iiu zwhere,

Equation ①

Multiply both side of each equation ①, ②by , respectively21, ss

Equation ②

Multiply both side of each equation ③, ④by , respectively21,dd

Equation ③ Equation ④

Summary for Solution of QP ProblemUsing the Kuhn-Tucker Necessary Condition

Page 9: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

9Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solution Procedure of Quadratic Programming(QP) Problem- Approximate the Original Problem as a Quadratic Programming Problem

Define:

ii

ijijijijii

jjjj

xdxgaxhnxfc

gbhefff

D=

¶¶=¶¶=¶¶=

-=-=-D+=

,/)( ,/)( ,/)(),( ),( ),()(

xxxxxxxx

Matrix form

Minimize

Subject to

)1()()1()1()1(21

´´´´´ += nnnnT

nnTf dHddc

)1()1()(

)1()1()(

´´´

´´´

£

=

mnnmT

pnnpT

bdA

edN

xHxxxxxx DD+DÑ+@D+ TTfff 5.0)()()(Minimize

mtojggg

ptojhhhTjjj

Tjjj

1;0)()()(

1;0)()()(

=£DÑ+@D+

==DÑ+@D+

xxxxx

xxxxxSubject toThe first-order(linear) Taylor series expansion of the equality constraints

The first-order(linear) Taylor series expansion of the inequality constraints

The second-order Taylor series expansion of the objective function

: Quadratic objective function

: Linear equality constraints

: Linear inequality constraints

Page 10: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

10Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solution Procedure of Quadratic Programming(QP) Problem- Construction of Lagrange Function

Minimize

Subject to

)1()()1()1()1(21

´´´´´ += nnnnT

nnTf dHddc

)1()1()(

)1()1()(

´´´

´´´

£

=

mnnmT

pnnpT

bdA

edN

Lagrange Function

)(

)(21

)1()1()()1(

)1(2

)1()1()()1(

)1()()1()1()1(

´´´´

´´´´´

´´´´´

-+

-++

+=

pnnpT

pT

mmnnmT

mT

nnnnT

nnTL

edNv

bsdAu

dHddc

( ) ( 1) ( 1)2

( 1)Tm n mn m´ ´ ´ ´- + =A sd b 0Æ

Simplex 방법을 이용한 2차 계획 문제의 풀이 방법

Page 11: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

11Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Lagrange Function

)(

)(21),,,(

)1()1()()1(

)1(2

)1()1()()1(

)1()()1()1()1(

´´´´

´´´´´

´´´´´

-+

-++

+=

pnnpT

pT

mmnnmT

mT

nnnnT

nnTL

edNv

bsdAu

dHddcusvd

Kuhn-Tucker Necessary Condition: ( , , , )LÑ =d v s u 0

( , , , ) 0,i ii

L u ss

¶= =

¶d v s u

0),,,()1(

2)1()1()(

)1(

=-+=¶

¶´´´´

´mmnnm

T

n

L bsdAu

usvd

0vNuAdHcd

usvd=+++=

¶¶

´´´´´´´´

)1()()1()()1()()1()1(

),,,(ppnmmnnnnn

n

L

0edNv

usvd=-=

¶¶

´´´

´)1()1()(

)1(

),,,(pnnp

T

p

L

0i to m=

Solution Procedure of Quadratic Programming(QP) Problem- Apply the K-T Necessary Condition to the Lagrange Function

Page 12: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

12Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solution Procedure of Quadratic Programming(QP) Problem- Method 1: Direct Solving the Eqs. from the K-T Conditions

Optimization problem

* *

1 10, 1, ... ,

p mi i

i ii ij j j j

h gL f v u j nx x x x= =

¶ ¶¶ ¶= + + = =

¶ ¶ ¶ ¶å å*( ) 0, 1, ... ,i

i

L h i pv

¶= = =

¶x

* *2( ) 0, 1, ... ,mi ii

L g s iu¶

= + = =¶

x

* * 0, 1, ... ,i ii

L u s i ms

¶= = =

miui , ... ,1 ,0* =³

Kuhn-Tucker necessary condition: 0suvx =Ñ ),,,(L

Minimize ) , , ,()( 21 nxxxff L=x,...,pihi 1 ,0)( ==xSubject to

( ) 0, 1ig i ,...,m£ =xEquality constraint

Inequality constraint

2

1 1( , , , ) ( ) ( ) ( ( ) )

p m

i i i i ii i

L f v h u g s= =

= + + +å åx v u s x x xDefinition of Lagrange function vi : Lagrange multiplier for the equality constraint(It is free in sign.)

ui : Lagrange multiplier for the inequality constraint(Nonnegative)si : Slack variable transforming an inequality constraint to an equality constraint

Linear indeterminate equations

Nonlinear indeterminate equations

Method 1:- Find the solutions which satisfy the nonlinear indeterminate equations.- Check whether the solutions satisfy the linear indeterminate equations and determine the solution of this problem.- Human can find the solution of this problem easily by using this method.

Method 1:- Find the solutions which satisfy the nonlinear indeterminate equations.- Check whether the solutions satisfy the linear indeterminate equations and determine the solution of this problem.- Human can find the solution of this problem easily by using this method.

Page 13: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

13Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

0)1(2

)1()1()()1(

=-+=¶¶

´´´´´

mmnT

nmn

L bsdAu

,)1()()1()()1()()1()1(

0vNuAdHcd

=+++=¶¶

´´´´´´´´

ppnmmnnnnnn

L 0edNv

=-=¶¶

´´´

´)1()1()(

)1(pnnp

T

p

L

Kuhn-Tucker Necessary Condition:

Multiply both side of the Equation ①is

0i iu s =

Although the Equation ① is multiplied by , the solution( ) is not changed.Although the Equation ① is multiplied by , the solution( ) is not changed.

is0 0i iu or s= =

2 0i iu s =Æ

0)1(2

)1()1()()1(

=-+=¶¶

´´´´´

mmnT

nmn

L bsdAu

,)1()()1()()1()()1()1(

0vNuAdHcd

=+++=¶¶

´´´´´´´´

ppnmmnnnnnn

L 0edNv

=-=¶¶

´´´

´)1()1()(

)1(pnnp

T

p

L

Transform Kuhn-Tucker Necessary Condition:

①’

( , , , )LÑ =d v u s 0

0suvd =Ñ ),,,(L

0,i ii

L u ss

¶= =

¶0i to m=

2 0,i ii

L u ss

¶= =

¶0i to m=

Solution Procedure of Quadratic Programming(QP) Problem- Method 2: Formulate the Problem of the K-T Condition as a LP Problem (1/3)

Page 14: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

14Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

0)1(2

)1()1()()1(

=-+=¶¶

´´´´´

mmnT

nmn

L bsdAu

,)1()()1()()1()()1()1(

0vNuAdHcd

=+++=¶¶

´´´´´´´´

ppnmmnnnnnn

L 0edNv

=-=¶¶

´´´

´)1()1()(

)1(pnnp

T

p

LKuhn-Tucker Necessary Condition:

Replace with (where ) 2is is¢ 0is¢ ³

0)1()1()1()()1(

=-¢+=¶¶

´´´´´

mmnT

nmn

L bsdAu

,)1()()1()()1()()1()1(

0vNuAdHcd

=+++=¶¶

´´´´´´´´

ppnmmnnnnnn

L 0edNv

=-=¶¶

´´´

´)1()1()(

)1(pnnp

T

p

L

where mtoisu ii 1 ;0, =³¢

Check whether the solution obtained from the linear indeterminate equations satisfies the nonlinear indeterminate equations and determine the solution.

Check whether the solution obtained from the linear indeterminate equations satisfies the nonlinear indeterminate equations and determine the solution.

Since these equations are linear in the variables d, s’, u, v, this problem is a linear programming problem only having the equality constraints.

Since these equations are linear in the variables d, s’, u, v, this problem is a linear programming problem only having the equality constraints.

( , , , )LÑ =d v u s 0

2 0,i ii

L u ss

¶= =

¶0i to m=

0,i ii

L u ss

¶ ¢= =¶

0i to m=Linear indeterminate equationsNonlinear indeterminate equations

Solution Procedure of Quadratic Programming(QP) Problem- Method 2: Formulate the Problem of the K-T Condition as a LP Problem (2/3)

①’

Page 15: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

15Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

0)1()1()1()()1(

=-¢+=¶¶

´´´´´

mmnT

nmn

L bsdAu

,)1()()1()()1()()1()1(

0vNuAdHcd

=+++=¶¶

´´´´´´´´

ppnmmnnnnnn

L 0edNv

=-=¶¶

´´´

´)1()1()(

)1(pnnp

T

p

L

where mtoisu ii 1 ;0, =³¢

Check whether the solution obtained from the linear indeterminate equations satisfies the nonlinear indeterminate equations and determine the solution.

Check whether the solution obtained from the linear indeterminate equations satisfies the nonlinear indeterminate equations and determine the solution.

Since these equations are linear in the variables d, s’, u, v, this problem is a linear programming problem only having the equality constraints.

Since these equations are linear in the variables d, s’, u, v, this problem is a linear programming problem only having the equality constraints.

0,i ii

L u ss

¶ ¢= =¶

0i to m=Linear indeterminate equationsNonlinear indeterminate equations

,)1()1()1( ´´´ -= ppp zyv

Also, the Lagrange multipliers for the equality constraints are free in sign, we may decompose them as follows to use the Simplex method.

Since the design variables d(n×1) are free in sign, we may decompose them as follows to use the Simplex method.

)1;0,0(,)1()1()1( ntoidd iinnn =³³-= -+-´

+´´ ddd

( 1)p´v

)1;0,0( ptoizy ii =³³

Kuhn-Tucker Necessary Condition: ( , , , )LÑ =d v u s 0

Solution Procedure of Quadratic Programming(QP) Problem- Method 2: Formulate the Problem of the K-T Condition as a LP Problem (3/3)

Page 16: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

16Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Matrix From

úúú

û

ù

êêê

ë

é-=

úúúúúúúú

û

ù

êêêêêêêê

ë

é

¢úúú

û

ù

êêê

ë

é

--

--

´

´

´

´

´

´

´

´´´´´´

´´´´´´

´´´´´´

)1(

)1(

)1(

)1(

)1(

)1(

)1(

)1(

)1(

)()()()()()(

)()()()()()(

)()()()()()(

p

m

n

p

p

m

m

n

n

ppppmpmpnpT

npT

pmpmmmmmnmT

nmT

pnpnmnmnnnnn

ebc

zysudd

0000NN00I0AANN0AHH

,)1()1()1( ´´´ -= ppp zyv )1;0,0( ptoizy ii =³³)1;0,0(,)1()1()1( ntoidd iinnn =³³-= -+-

´+

´´ dddBecause d and v are free in sign.Because d and v are free in sign.

Introduce the artificial variables, define the artificial objective function, and solve the linear programming problem by using the Simplex method.Introduce the artificial variables, define the artificial objective function, and solve the linear programming problem by using the Simplex method.

Solution Procedure of Quadratic Programming(QP) Problem- Method 2: Simplex Method for Solving Quadratic Programming Problem (1/2)

0)1()1()1()()1(

=-¢+=¶¶

´´´´´

mmnT

nmn

L bsdAu

,)1()()1()()1()()1()1(

0vNuAdHcd

=+++=¶¶

´´´´´´´´

ppnmmnnnnnn

L 0edNv

=-=¶¶

´´´

´)1()1()(

)1(pnnp

T

p

L

where mtoisu ii 1 ;0, =³¢

Check whether the solution obtained from the linear indeterminate equations satisfies the nonlinear indeterminate equations and determine the solution.

Check whether the solution obtained from the linear indeterminate equations satisfies the nonlinear indeterminate equations and determine the solution.

Since these equations are linear in the variables d, s’, u, v, this problem is a linear programming problem only having the equality constraints.

Since these equations are linear in the variables d, s’, u, v, this problem is a linear programming problem only having the equality constraints.

0,i ii

L u ss

¶ ¢= =¶

0i to m=Linear indeterminate equationsNonlinear indeterminate equations

Kuhn-Tucker Necessary Condition: ( , , , )LÑ =d v u s 0

Page 17: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

17Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Matrix From

( 1)

( 1)( ) ( ) ( ) ( ) ( ) ( ) ( 1)

( 1)( ) ( ) ( ) ( ) ( ) ( ) ( 1)

( 1)( ) ( ) ( ) ( ) ( ) ( )

( 1)

( 1)

n

nn n n n n m n m n p n p n

mT Tm n m n m m m m m p m p m

mT Tp n p n p m p m p p p p

p

p

´ ´ ´ ´ ´ ´ ´´

´ ´ ´ ´ ´ ´ ´´

´ ´ ´ ´ ´ ´´

´

é ùê úê úé ù- - -ê úê ú- =ê úê ú ¢ê úê ú-ë û ê úê úê úë û

dd

H H A 0 N N cu

A A 0 I 0 0 bs

N N 0 0 0 0 eyz

( 1)p´

é ùê úê úê úë û

Introduce the artificial variables, define the artificial objective function, and solve the linear programming problem by using the Simplex method.Introduce the artificial variables, define the artificial objective function, and solve the linear programming problem by using the Simplex method.

1

2

n m p

YY

Y + +

é ùê úê ú+ê úê úê úë û

M

Artificial variables

How to define the artificial objective function1. Define an one equation by sum of all the equations from the 1st row to (n+m+p)th row.2. Define the sum of the all artificial variables(Y1+Y2+…+Yn+m+p) as an objective function(w).

0,i ii

L u ss

¶ ¢= =¶

0i to m=

- Determine an initial basic feasible solution (to satisfy the artificial objective function(w) to be zero) for the linear programming problem by using the Simplex method (Phase 1).

- Check whether the initial basic feasible solutions satisfy the following nonlinear indeterminate equations and determine that as a solution.

Solution Procedure of Quadratic Programming(QP) Problem- Method 2: Simplex Method for Solving Quadratic Programming Problem (2/2)

Page 18: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

18Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

)1)(()1)222(())222()(( ´++´++++´++ = pmnpmnpmnpmn DXBSimplex Method for Solving Quadratic Programming Problem

Kuhn-Tucker Necessary Condition(Matrix form)

)1)(()1)(()1)222(())222()(( ´++´++´++++´++ =+ pmnpmnpmnpmnpmn DYXBIf any of the elements in D is(are) negative, the corresponding equation must be multiplied by -1 to have a nonnegative element on the right side.

3. The artificial objective function is defined as follows.

åå ååå++

=

++

=

++

=

++

=

++

=

+=-==)(2

10

)(2

1 111

pmn

jjj

pmn

j

pmn

ijij

pmn

ii

pmn

ii XCwXBDYw

where åå++

=

++

=

=-=pmn

ii

pmn

iijj DwBC

10

1,

Add the elements of the j th column of the matrix B and change its sign.(Initial relative objective coefficient).

4. Solve the linear programming problem by using the Simplex and check whether the solution satisfies the following equation.

Initial value of the artificial objective function

1. The problem to solve the Kuhn-Tucker necessary condition is same with the problem having only the equality constraints(linear programming problem).

mtoisu ii 1 ;0 ==¢ : This equation is used to check whether the solution satisfies this equation.

Solution Procedure of Quadratic Programming(QP) Problem- Summary of Method 2 of Simplex Method for Solving Quadratic Programming Problem

2. To solve the linear indeterminate equations, we introduce the artificial variables, define the artificial objective function, and determine the initial basic feasible solution by using the Simplex method.

Page 19: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

19Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Optimization problem

* *

1 10, 1, ... ,

p mi i

i ii ij j j j

h gL f v u j nx x x x= =

¶ ¶¶ ¶= + + = =

¶ ¶ ¶ ¶å å*( ) 0, 1, ... ,i

i

L h i pv

¶= = =

¶x

* *2( ) 0, 1, ... ,mi ii

L g s iu¶

= + = =¶

x

* * 0, 1, ... ,i ii

L u s i ms

¶= = =

miui , ... ,1 ,0* =³

Kuhn-Tucker necessary condition: 0suvx =Ñ ),,,(L

Minimize ) , , ,()( 21 nxxxff L=x,...,pihi 1 ,0)( ==xSubject to

( ) 10,i i ,. .,mg .==xEquality constraint

Inequality constraint

2

1 1( , , , ) ( ) ( ) ( ( ) )

p m

i i i i ii i

L f v h u g s= =

= + + +å åx v u s x x xDefinition of Lagrange function vi : Lagrange multiplier for the equality constraint(It is free in sign.)

ui : Lagrange multiplier for the inequality constraint(Nonnegative)si : Slack variable transforming an inequality constraint to an equality constraint

Linear indeterminate equations

Nonlinear indeterminate equations

Method 1: - Find the solutions to satisfy the nonlinear indeterminate equations.- Check whether the solutions satisfy the linear indeterminate equations and determine the solution of this problem.- Human can find the solution of this problem easily by using this method.

Method 1: - Find the solutions to satisfy the nonlinear indeterminate equations.- Check whether the solutions satisfy the linear indeterminate equations and determine the solution of this problem.- Human can find the solution of this problem easily by using this method.

Method 2: - Find the solutions to satisfy the linear indeterminate equations by using the Simplex method.- Check whether the solutions satisfy the nonlinear indeterminate equations and determine the solution of this problem.- Since the algorithm of this method is more systematical, this method is useful for the computational approach.

Method 2: - Find the solutions to satisfy the linear indeterminate equations by using the Simplex method.- Check whether the solutions satisfy the nonlinear indeterminate equations and determine the solution of this problem.- Since the algorithm of this method is more systematical, this method is useful for the computational approach.

Solution Procedure of Quadratic Programming(QP) Problem- Comparison between Method 1 and 2

Page 20: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

20Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

7.2 Sequential Linear Programming(SLP)

Page 21: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

21Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Sequential Linear Programming(SLP)

§ Define the linear programming(LP) problem by linearizing the objective function and the constraints in the current design point.

§ Compute the design change by solving the linear programming problem and obtain the improved design point.

§ This method is to find the optimal solution by solving the linear programming problem sequentially.

)()()1( kkk dxx +=+

Current design point

Design change obtained by solving the LP problem.Improved design point

SLP(Sequential Linear Programming)

Page 22: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

22Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

0)(0)(

00.161

61)(

13

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

The optimal solution:

3)(),3,3( ** -== xx f

The starting design point: ),1,1()0( =x001.021 == ee

Choose move limits such that a 15% design change is permissible.

1 2 3 4

1

2

3

4

x1

x2

AB

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25f = -20

f = -10f = -3

f = -1

Sequential Linear Programming(SLP)- [Example] Problem with Inequality Constraints (1)

Page 23: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

23Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

0)(0)(

00.161

61)(

13

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

1 2 3 4

1

2

3

4

x1

x2

A B

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25f = -20

f = -10f = -3

(1) Iteration 1(k = 0)(i) Step 1

(0)1 2(1,1), 0.001e e= = =x

From the given point(starting point), the current design point is as follows.

21 3

2

3

(1,1) 1(1,1) 0(1,1) 1 0(1,1) 1 0

fggg

= -= - <

= - <= - <

Æ Constraint is satisfied.

Æ Constraint is satisfied.

Æ Constraint is satisfied.

(ii) Step 2: Evaluate the objective and constraint function at the current design point.

f = -1

Sequential Linear Programming(SLP)- [Example] Problem with Inequality Constraints (2)

Page 24: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

24Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

2 21 1 2

2 1

3 2

1 1( ) 1.0 06 6

( ) 0( ) 0

g x x

g xg x

= + - £

= - £= - £

x

xx

Minimize

Subject to

2122

21 3)( xxxxf -+=x

(1) Iteration 1(k = 0)

(iii) Step 3: Define the LP problem(linearize the objective function).1 2 3 4

1

2

3

4

x1

x2

A B

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25 f = -

20 f = -10 f = -

3f = -1

(0) (0) (0) (0) (0)( ) ( ) ( )Tf f f+ D @ +Ñ Dx x x x x The first-order(linear) Taylor series expansion of the objective functionMinimize:

001.0),1,1( 21)0( === eex

(0) (0) (0) (0) (0)( ) ( ) ( )Tf f f+ D - @ Ñ Dx x x x xMinimize:

[ ] (0)

(0)(0) (0) (0) 1

1 2 2 1 (0)2

( ) ( ) 2 3 2 3d

f f x x x xd

é ù+ - @ - - ê ú

ë ûx

x d xMinimize:

(0) (0) (0) (0) (0) (0) (0)1 2 1 2 1 2( ) (2 3 ) (2 3 )f x x d x x d@ - + -d

(0) (0) (0)1 2( )f d d@ - -d

1 2

(0) (0) , f fTx xf ¶ ¶

¶ ¶é ùD = Ñ = ë ûx d

The linearized objective function

(0) (1,1)=xSubstitute

( ) ( ) ( )1 2

Tk k kx xé ù= ë ûx

)()()1( kkk dxx +=+

( ) ( ) ( )1 2

( ) ( )1 2

Tk k k

Tk k

d d

x x

é ù= ë û

é ù= D Dë û

d

Sequential Linear Programming(SLP)- [Example] Problem with Inequality Constraints (3)

Page 25: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

25Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

2 21 1 2

2 1

3 2

1 1( ) 1.0 06 6

( ) 0( ) 0

g x x

g xg x

= + - £

= - £= - £

x

xx

Minimize

Subject to

2122

21 3)( xxxxf -+=x

(1) Iteration 1(k = 0)

(iii) Step 3: Define the LP problem(linearize the constraints).

001.0),1,1( 21)0( === eex

(0) (0) (0)( ) ( ); 1 Tj jg g j to mÑ D £ - =x x x

1 2

(0) (0) (0) (0) (0) (0), , ( ) ( ) ( )j jg gT Tj j j jx xg g g g¶ ¶

¶ ¶é ùD = Ñ = Ñ D = D =ë ûx d x x x d

Subject to:( ) ( )

( )

( )

(0)2 2(0) (0) (0) (0) (0)11 1

1 2 1 21 3 3 (0)2

(0)(0) (0) (0)1

1 12 (0)2

(0)(0) (0) (0)1

2 23 (0)2

1 1( ) 1.06 6

( ) 0

( ) 0

dg x x x x

d

dg x x

d

dg x x

d

é ù æ öé ùÞ £ - + -ê ú ç ÷ë û è øë ûé ù

é ùÞ - £ - -ê úë ûë ûé ù

é ùÞ - £ - -ê úë ûë û

d

d

d

21 3

2

3

(1,1)(1,1) 1(1,1) 1

ggg

= -

= -= -

(0) (0) (0)1 11 21 3 3

(0) (0)12

(0) (0)23

2( )3

( ) 1

( ) 1

g d d

g d

g d

= + £

= - £

= - £

d

d

dThe linearized constraints

The first-order(linear) Taylor series expansion of the constraintsSubject to: (0) (0) (0) (0) (0)( ) ( ) ( ) 0; 1 T

j j jg g g j to m+ D Þ +Ñ D £ =x x x x x

)()()1( kkk dxx +=+

(0) (1,1)=xSubstitute

Sequential Linear Programming(SLP)- [Example] Problem with Inequality Constraints (4)

1 2 3 4

1

2

3

4

x1

x2

A B

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25 f = -

20 f = -10 f = -

3f = -1

Page 26: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

26Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Minimize

Subject to

21 ddf --=

15.015.015.015.0

11

2

1

2

1

32

231

131

££-££-

£-£-

£+

dd

dd

dd

0)(0)(

00.161

61)(

13

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

)1,0(),0,1(),,(),1,1(

1)1,1(,1)1,1(,)1,1(,1)1,1(

32

31

31

1

32

32

1

-=Ñ-=Ñ

=Ñ--=Ñ

-=-=

-=-=

gggf

gggf

Limits must be imposed on changes in design called move limit The graphical solution for

the linearized subproblemis as follows.

15.0,15.0 21 == dd

To solve the problem, the Simplex method can be used.

6 d1

d2

1 2 3 4 5-1-2

-1

-2

1

2

3

4

A B

C

d1=-1

d2=-1d1+d2=2

1 2 0f d d= - - =

0.15

move limit

1 2 0.3f d d= - - = -

(iv) Step 4: Solve LP problem for the design change(d(0)).Linearize the objective function and constraints.

The design change is obtained.

Sequential Linear Programming(SLP)- [Example] Problem with Inequality Constraints (5)

Page 27: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

27Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

(vi) Step 6: Update the design point as x(k+1) = x + d(k). Set k = k+1 and go to Step 2.

(v) Step 5: Check for convergence by using the obtained design change d(0).)15.0,15.0(),( 21

)0( == dddSince , the criterion for convergence is not satisfied.

)15.1,15.1()15.0 ,15.0()1,1()0()0()1,1()1( =+=+== dxxx

11=+= kk

Sequential Linear Programming(SLP)- [Example] Problem with Inequality Constraints (6)

)001.0(212.015.015.0 222)0( =>=+= ed

Page 28: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

28Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

where

)()()()()( )()()( kkTkkk fff xxxxx DÑ+@D+Minimize

mtojggg

ptojhhhkkT

jk

jkk

j

kkTj

kj

kkj

1;0)()()(

1;0)()()()()()()()(

)()()()()(

=£DÑ+@D+

==DÑ+@D+

xxxxx

xxxxxSubject to

The first-order(linear) Taylor series expansion of the objective function

The first-order(linear) Taylor series expansion of the equality constraints

The first-order(linear) Taylor series expansion of the inequality constraints

å=

=n

iiidcf

1Minimize

mtojbda

ptojedn

ji

n

iij

ji

n

iij

1;

1;

1

1

==

å

å

=

=

Subject to

Matrix form

Minimize

Subject to

)1()1( ´´= nnTf dc

)1()1()(

)1()1()(

´´´

´´´

£

=

mnnmT

pnnpT

bdA

edN

Æ Linear Programming ProblemÆ It can be solved by using the Simplex method.

)( )()()( kiu

ki

kiliuiil xxxddd D£D£D££

: Linearized objective function

: Linearized equality constraint

: Linearized inequality constraint

Summary of Sequential Linear Programming(SLP)

Define:

ii

ijijijijii

jjjj

xdxgaxhnxfc

gbhefff

D=

¶¶=¶¶=¶¶=

-=-=-D+=

,/)( ,/)( ,/)(),( ),( ),()(

xxxxxxxx

Page 29: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

29Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Summary of the SLP Algorithm (1)

§ Step 1: Estimate a starting design point as x(0). Set k = 0. Specify two small numbers, e1, e2(criterion for violating the constraints and convergence).

§ Step 2: Evaluate objective and constraint function at current design point x(k). Also evaluate the objective and constraint function gradients at the current design point.

§ Step 3: Select the proper move limits Dxil(k) and Dxiu

(k) as some fraction of the current design point. Define the linear programming problem.

)()()( kiu

ki

kil xxx D£D£D

Page 30: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

30Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Summary of the SLP Algorithm (2)

§ Step 4: Solve the linear programming problem for d(k) by using the Simplex method.

§ Step 5: Check for convergence. If, gi £ e1 (i = 1 to m), |hi| £ e1 (i = 1 to p), and ççd(k)çç£ e2, then stop and the current design point x(k) is the optimal solution. Otherwise, continue.

§ Step 6: Update the design point as x(k+1) = x + Dx(k), Set k = k+1 and go to Step 2.

Page 31: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

31Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Limitations of SLP Method

þ The move limits of the design variables should be defined by the user.þ If the move limits are too small, it take much time to find the optimal

solution.þ If the move limits are too large, it can cause oscillations in the design

point during iterations.þ Thus performance of the method depends heavily on selection of

move limits. )(xf

x)1( +nx)(nx)2( +nx

Original objective function

Linearized objective function Linearized objective function

Æ The optimal solution cannot be obtained, because of the oscillations in the design point during iterations.

Page 32: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

32Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

7.3 Sequential Quadratic Programming(SQP)

Page 33: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

33Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Sequential Quadratic Programming(SQP)

§ Define the Quadratic programming(QP) problem by approximating quadratic form of the objective function and linear form of the constraints at the current design point.

§ Compute the design change by solving the quadratic programming problem and obtain the improved design point.

§ This method is to find the optimal solution by solving the Quadratic programming problem sequentially.

)()()1( kkk dxx +=+

Current design point

Design change obtained by solving the QP problem.Improved design point

SLP(Sequential Linear Programming)

Page 34: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

34Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Define:

ii

ijijijijii

jjjj

xdxgaxhnxfc

gbhefff

D=

¶¶=¶¶=¶¶=

-=-=-D+=

,/)( ,/)( ,/)(),( ),( ),()(

xxxxxxxx

Matrix form

Minimize

Subject to

)1()()1()1()1(21

´´´´´ += nnnnT

nnTf dHddc

)1()1()(

)1()1()(

´´´

´´´

£

=

mnnmT

pnnpT

bdA

edN

xHxxxxxx DD+DÑ+@D+ TTfff 5.0)()()(Minimize

mtojggg

ptojhhhTjjj

Tjjj

1;0)()()(

1;0)()()(

=£DÑ+@D+

==DÑ+@D+

xxxxx

xxxxxSubject to

: Quadratic objective function

: Linear equality constraints

: Linear inequality constraints

The first-order(linear) Taylor series expansion of the equality constraints

The first-order(linear) Taylor series expansion of the inequality constraints

The second-order Taylor series expansion of the objective function

Formulation of the Quadratic Programming Problemto Determine the Search Direction

Page 35: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

35Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Algorithm of SQP

x1

x2

Optimal solution

x1

x2

Current design point

d(0)

x1

x2

d(0)

Go to the Step 1 at the improved design point.

Stopping criteriaIf the magnitude of the search direction |d(0)| is smaller than a small value (epsilon), then stop.

Calculate the search direction(d(0)) by solving the quadratic programming problem.

Step 2

Define the quadratic programming problem at the current point.

Step 1

Transform the constrained optimal design problem to the unconstrained problem by modifying the objective function which has added penalty for possible constraint violations to the current value of the objective function.Then calculate the step size using the one dimensional search method, e.g., Golden section search method.

Step 3

Improved design point

Linearized Constraint Improved design point

x1

x2

Current design point

Objective function is approximated to the quadratic form.

Quadratic programming problem- Objective function: quadratic form- Constraint: linear form

Page 36: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

36Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Difference between Sequential Quadratic Programming(SQP) and CSD(Constrained Steepest Descent) Method

þ Sequential Quadratic Programming(SQP)n ① First, we define a quadratic programming problem for the

objective function and constraints at the current design point, and find the search direction d(k).

n ② We define the penalty function by adding a penalty for possible constraint violations to the current value of the objective function, and calculate the step size αk to minimize the penalty function. For determination of the step size, one dimensional search method, e.g., Golden section search method can be used. And we determine the improved design point.

n ③ At the improved design point, we go to ①n The method is to find the optimal solution by solving the

quadratic programming problem sequentially.

þ CSD(Constrained Steepest Descent) methodn This method is a kind of the SQP method.n When defining the quadratic programming problem, the Hessian

matrix is assumed to be equal to the identity Matrix.n This method uses the Pshenichny’s penalty function.

Page 37: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

37Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Reference] If the Hessian matrix is equal to the Identity matrix, then the objective function is approximated as a centric circle form.

Define the QP problem

(0) (0) (0) (0) (0) (0) (0)( ) ( ) ( ) 0.5T Tf f f+ D - @ Ñ D + D Dx x x x x x H xMinimize:

(0)

(0)(0) (0) (0) (0)2 (0)21

1 2(0)1 2 2

( ) ( ) 0.5( )df ff f d d

x x dé ùé ù¶ ¶

+ - @ + +ê úê ú¶ ¶ë û ë ûx

x d xMinimize:

(0) (0)(0) (0) (0) (0)2 (0)2

1 2 1 21 2

( ) ( )( ) 0.5( )f ff d d d dx x

¶ ¶@ + + +

¶ ¶x xd

To find the search direction(d(0)), we define the QP problem at current design point.To find the search direction(d(0)), we define the QP problem at current design point.

(0) (0) (0) (0) (0) (0) (0)( ) ( ) ( ) 0.5T Tf f f+ D @ +Ñ D + D Dx x x x x x H xMinimize:The second-order Taylor series expansion of the objective function

1 2

(0) (0) , ,f fTx xf ¶ ¶

¶ ¶é ùD = Ñ = ë ûx d =H I (In the CSD method, the Hessian matrix is assumed to

be equal to the identity matrix.)

constant constant

(0) (0) (0) (0)2 (0)21 1 2 2 1 2( ) 0.5( )f c d c d d d@ + + +dIt has the same form of the equation of circle.

2 21 2 1 1 2 2 3 0x x c x c x c+ + + + =Form of the equation of circle:

Page 38: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

38Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solution Procedure of SQP Using the Example- Determination of the Search Direction (1/5) [Iteration 1]

2 21 1 2

2 1

3 2

1 1( ) 1.0 06 6

( ) 0( ) 0

g x x

g xg x

= + - £

= - £= - £

x

xx

Minimize

Subject to

2122

21 3)( xxxxf -+=x Optimal solution: 3)(),3,3( ** -== xx f

1 2 3 4

1

2

3

4

x1

x2

AB

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25f = -20

f = -10f = -3

21 3

2

3

(1,1) 1(1,1) 0(1,1) 1 0(1,1) 1 0

fggg

= -= - <

= - <= - <

Æ Constraint is satisfied.

Æ Constraint is satisfied.

Æ Constraint is satisfied.

(i) Step 1: Evaluate the objective function and constraints at the current design point.

(1) Iteration 1(k = 0)

Assume the starting point is .(0) (1,1)=x

Page 39: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

39Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

2 21 1 2

2 1

3 2

1 1( ) 1.0 06 6

( ) 0( ) 0

g x x

g xg x

= + - £

= - £= - £

x

xx

Minimize

Subject to

2122

21 3)( xxxxf -+=x

(1) Iteration 1(k = 0)(ii) Step 2: Define a QP problem(The objective function is approximated to the quadratic form.).

1 2 3 4

1

2

3

4

x1

x2

A B

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25f = -20

f = -10f = -3

f = -1(0) (1,1)=x

(0) (0) (0) (0) (0) (0) (0)( ) ( ) ( ) 0.5T Tf f f+ D - @ Ñ D + D Dx x x x x x H xMinimize:

[ ] (0)

(0)(0) (0) (0) (0)2 (0)21

1 2 2 1 1 2(0)2

( ) ( ) 2 3 2 3 0.5( )d

f f x x x x d dd

é ù+ - @ - - + +ê ú

ë ûx

x d xMinimize:

(0) (0) (0) (0) (0) (0) (0) (0)2 (0)21 2 1 2 1 2 1 2( ) (2 3 ) (2 3 ) 0.5( )f x x d x x d d d@ - + - + +d

(0) (0) (0) (0)2 (0)21 2 1 2( ) 0.5( )f d d d d@ - - + +d

(0) (0) (0) (0) (0) (0) (0)( ) ( ) ( ) 0.5T Tf f f+ D @ +Ñ D + D Dx x x x x x H xMinimize:

1 2

(0) (0) , ,f fTx xf ¶ ¶

¶ ¶é ùD = Ñ = ë ûx d =H I

Objective function is approximated to the first order term. Objective function is approximated to the second order term.

Solution Procedure of SQP Using the Example- Determination of the Search Direction (2/5)

Page 40: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

40Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

2 21 1 2

2 1

3 2

1 1( ) 1.0 06 6

( ) 0( ) 0

g x x

g xg x

= + - £

= - £= - £

x

xx

Minimize

Subject to

2122

21 3)( xxxxf -+=x

(1) Iteration 1(k = 0)

1 2 3 4

1

2

3

4

x1

x2

A B

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25f = -20

f = -10f = -3

f = -1(0) (1,1)=x

The first-order(linear) Taylor series expansion of the constraints

Subject to: (0) (0) (0) (0) (0)( ) ( ) ( ) 0; 1 Tj j jg g g j to m+ D @ +Ñ D £ =x x x x x

(0) (0) (0)( ) ( ); 1 Tj jg g j to mÑ D £ - =x x x

1 2

(0) (0) , j jg gTj x xg ¶ ¶

¶ ¶é ùD = Ñ = ë ûx d

Subject to:( ) ( )

( )

( )

(0)2 2(0) (0) (0) (0) (0)11 1

1 2 1 21 3 3 (0)2

(0)(0) (0) (0)1

1 12 (0)2

(0)(0) (0) (0)1

2 23 (0)2

1 1( ) : 1.06 6

( ) : 0

( ) : 0

dg x x x x

d

dg x x

d

dg x x

d

é ù æ öé ù £ - + -ê ú ç ÷ë û è øë ûé ù

é ù- £ - -ê úë ûë ûé ù

é ù- £ - -ê úë ûë û

d

d

d

The constraints are linearized

(0) (1,1)=xSubstitute

(0) (0)1 11 23 3

(0)1(0)2

23

11

d d

dd

+ £

- £

- £

Solution Procedure of SQP Using the Example- Determination of the Search Direction (3/5)

Page 41: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

41Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

(iii) Step 3: Solve the QP problem to find the search direction(d(0)).

Minimize

Subject to

)(5.0)( 22

2121 ddddf ++--=

11

2

1

32

231

131

£-£-

£+

dd

dd

)1()1(

])2([)(5.0)(

2323

2212

21213

11

22

2121

sdusdu

sdduddddL

+--+

+--+

+-++

++--=Lagrange function Kuhn-Tucker necessary condition:

j

l(0)

1 2 3(0)

1 2 3

(0)1 2

( , , ) (0,0,0),( , , )(0, 1.414, 1.414),( , ) (1,1)

u u us s s

d d

= =

==

= =

us

d

The search direction is

)1,0(),0,1(),,(),1,1(

1)1,1(,1)1,1(,)1,1(,1)1,1(

32

31

31

1

32

32

1

-=Ñ-=Ñ

=Ñ--=Ñ

-=-=

-=-=

gggf

gggf

* The search direction also can be determined using the Simplex method.

0sud =Ñ ),,(L

( )

1

2

1

2

3

11 1 23

12 1 33

211 2 13

21 2

22 3

1 0

1 0

2 0

1 0

1 0

0, 0, 1, 2,3i

Ld

Ld

Lu

Lu

Lu

Li is

d u u

d u u

d d s

d s

d s

u s u i

¶¶

¶¶

¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - + =

= - - + =

= - - + =

= = ³ =

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

Constrained Optimal Design Problem(Original problem)

Quadratic Programming Problem

k

Solution Procedure of SQP Using the Example- Determination of the Search Direction (4/5)

Page 42: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

42Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

(1) (0)0

(0)a= +x x d

Current design point

Search direction obtained from the QP problem

Improved design point

Find αk : Minimize ( )(1)f x ( )(0) )0

(0f a= + dx ( )0f a=

Given

Find

1 2 3 4

1

2

3

4

x1

x2

A B

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0x(0) = (1, 1)

f = -25

f = -20

f = -10

f = -3

f = -1

(iv) Step 4: After the search direction(d(0)) is determined,calculate the step size.

Calculate step size minimizing the value of the objective function along the search direction

The improved design point can be found along the search direction by minimizing the objective function. However, it may violate the original constraints.

(0)1 2( , ) (1,1)d d= =d The search direction is

determined.

(0)d

00

( )a d

Minimum point in the objective function

Therefore, a penalty function should be constructed by adding the penalty for possible constraint violations to the current value of the objective function.

(0)1 2 3

(0)1 2

( , , ) (0,0,0),

( , ) (1,1)

u u u

d d

= =

= =

u

d

By property of the nature, the objective function is decreased when the constraints is violated.

Solution Procedure of SQP Using the Example- Determination of the Search Direction (5/5)

Page 43: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

43Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

( ) ( ) ( )( ) ( ) ( )k k kkf R VF = + ×x x x

{ }0max ,k kR R r=Rk is a positive number called the penalty parameter.

By adding a penalty for possible constraint violations to the current value of the objective function, the constrained optimal design problem is transformed into the unconstrained optimal design problem:

Solution Procedure of SQP Using the Example- Definition of Penalty Function(Pshenichny’s Descent Function) (1/2)

Penalty function(Pshenichny’s descent function, )( )( )kF x

k: iteration number how many times the QP problem is defined approximatelywhere,

( )( )kf x : current(kth iteration) value of the objective functionV(x(k)) is either the maximum constraint violation among all the constraints or zero.V(x(k)) is nonnegative. If all the constraints are satisfied, the value of the V(x(k)) is zero.

},,,;,,,;0max{)( 2121)(

mpk ggghhhV LL=x

where,hp: value of the equality constraint function at the design point x(k)

gp: value of the inequality constraint function at the design point x(k)

Initial value of Rk is specified by the user.

Summation of all the Lagrange multipliers

( ) ( )

1 1

p mk k

k i ii i

r v u= =

= +å å( )kiv : Lagrange multipliers for the equality constraints(free in sign)

: Lagrange multiplier for the inequality constraints(nonnegative)( )kiu

Page 44: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

44Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

(v) Step 5: Calculate the penalty parameter Rk(In this example, the initial penalty parameter is assumed as R0=10.).

åå==

+=m

i

ki

p

i

kik uvr

1

)(

1

)()0,0,0(),,( 321)0( == uuuu and å

=

==m

iiur

1

)0(0 0

Therefore, 0 0 0max{ , } max{10,0} 10R R r= = =( ) ( ) ( )

2 2 ( )1 2 1 2

( ) ( ) ( )

3 10 ( ),

k k kk

k

f R V

x x x x V

F = + ×

= + - + ×

x x x

x ( ) ( ) ( ) ( )1 2 3( ) max{0, ( ), ( ), ( )}k k k kV g g g=x x x x , (k=0)

Solution Procedure of SQP Using the Example- Definition of Penalty Function(Pshenichny’s Descent Function) (2/2)

Since this problem does not have the equality constraints, we do not consider the vi.

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

2122

21 3)( xxxxf -+=x

)(2

)(3

)(1

)(2

2)(2

2)(1

)(1

)()(

0.1)(61)(

61)(

kk

kk

kkk

xgxg

xxg

-=

-=

-+=

xx

x

Page 45: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

45Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

After the k-th search direction is found, one dimensional search for the step size is started.

( ) ( ) ( )( , ) ( , ) ( , ) ,k j k j k jkf R VF = + ×x x x

( ) ( ) ( )

2 2 ( )1 2 1 2

( ) ( ) ( )

3 10 ( )

k k kk

k

f R V

x x x x V

F = + ×

= + - + ×

x x x

x

( ) ( ) ( ) ( )1 2 3( ) max{0, ( ), ( ), ( )}k k k kV g g g=x x x x

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x21

22

21 3)( xxxxf -+=x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0d

A

B

( , ) ( ) ( )( , )

k j k kk ja= +x x d

x(0,0)=(1, 1)

The iteration number k does not change during the one dimensional search for the step size.

(vi) Step 6: By using the one dimensional search method, e.g., Golden section search method, calculate the step size to minimize the penalty function along the search direction(d(0)),and determine the improved design point.

After completing the one dimensional search, k is changed to k+1:

is changed to .( , )k jx ( 1)k+x

, (k=0)

Solution Procedure of SQP Using the Example- Determination of the Step Size

( , ) ( , ) ( , ) ( , )1 2 3( ) max{0, ( ), ( ), ( )}k j k j k j k jV g g g=x x x x

The iteration number k does not change during the one dimensional search method.

Page 46: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

46Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

( ) ( ) ( )(0, ) (0, ) (0, )0 1 10 0 1j j jf R VF = + × = - + ´ = -x x x

0 (1,1),=dSearch direction:

(0, ) (0, ) (0, ) (0, )1 2 323

, ( ) max{0, ( ), ( ), ( )}max{0, , 1, 1} 0

j j j jwhere V g g g=

= - - - =

x x x x

(0, ) (0) (0)(0, ) (1,1) 0 (1,1) (1,1)j

j da= + × = + × =x x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0d

0.0 a

F(0, ) 0.0ja =When

A

B

x(0,0)=(1, 1)-1

x(0,0)=(1, 1)

0, 0k j= =

(vi) Step 6:

Solution Procedure of SQP Using the Example- Determination of the Step Size Usingthe Golden Section Search Method (1/6)

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

2122

21 3)( xxxxf -+=x 0 0 0max{ , }

max{10,0} 10R R r=

= =)0,0,0(),,( 321

)0( == uuuu

å=

==m

iiur

1

)0(0 0

Page 47: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

47Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

( ) ( ) ( )(0, ) (0, ) (0, )0 1.21 10 0 1.21j j jf R VF = + × = - + ´ = -x x x

(0, ) (0, ) (0, ) (0, )1 2 3, ( ) max{0, ( ), ( ), ( )}

max{0, 0.57, 1.1, 1.1} 0

j j j jwhere V g g g=

= - - - =

x x x x

(0, ) (0) (0)(0, ) (1,1) 0.1 (1,1) (1.1,1.1)j

j da= + × = + × =x x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0.0 a

F(0, ) 0.1ja =Assume *,

A

B

x(0,0)=(1, 1)-1

x(0,0)=(1, 1)x(0,1)=(1.1, 1.1)

0.1

x(0,1)=(1.1, 1.1)-1.21

* The initial value of (0.1) is given by the user. It can be given as another value, e.g., 0.5.

( , )k ja

(vi) Step 6:

0 (1,1),=dSearch direction: 0, 1k j= =

Solution Procedure of SQP Using the Example- Determination of the Step Size Usingthe Golden Section Search Method (2/6)

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

2122

21 3)( xxxxf -+=x 0 0 0max{ , }

max{10,0} 10R R r=

= =)0,0,0(),,( 321

)0( == uuuu

å=

==m

iiur

1

)0(0 0

Page 48: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

48Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

( ) ( ) ( )(0, ) (0, ) (0, )0 1.592 10 0 1.592j j jf R VF = + × = - + ´ = -x x x

(0,2) (0,2) (0,2) (0,2)1 2 3, ( ) max{0, ( ), ( ), ( )}

max{0, 0.469, 1.262, 1.262} 0where V g g g=

= - - - =

x x x x

(0, ) (0) (0)(0, ) (1,1) 0.262 (1,1) (1.262,1.262)j

j da= + × = + × =x x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0.0 a

F(0, ) 0.1 1.618(0.1) 0.2618ja = + =When

A

B

x(0,0)=(1, 1)-1

x(0,0)=(1, 1)x(0,1)=(1.1, 1.1)

0.1

x(0,1)=(1.1, 1.1)

x(0,2)=(1.262, 1.262)

0.2618

x(0,2)=(1.262, 1.262)-1.592

-1.21

(vi) Step 6:

0 (1,1),=dSearch direction: 0, 2k j= =

Solution Procedure of SQP Using the Example- Determination of the Step Size Usingthe Golden Section Search Method (3/6)

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

2122

21 3)( xxxxf -+=x 0 0 0max{ , }

max{10,0} 10R R r=

= =)0,0,0(),,( 321

)0( == uuuu

å=

==m

iiur

1

)0(0 0

Page 49: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

49Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

( ) ( ) ( )(0, ) (0, ) (0, )0 2.321 10 0 2.321j j jf R VF = + × = - + ´ = -x x x

(0, ) (0, ) (0, ) (0, )1 2 3, ( ) max{0, ( ), ( ), ( )}

max{0, 0.226, 1.524, 1.524} 0

j j j jwhere V g g g=

= - - - =

x x x x

(0, ) (0) (0)(0, ) (1,1) 0.524 (1,1) (1.524,1.524)j

j da= + × = + × =x x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0.0 a

F2(0, ) 0.1 1.618(0.1) 1.618 (0.1) 0.5236ja = + + =When

A

B

x(0,0)=(1, 1)-1

x(0,0)=(1, 1)x(0,1)=(1.1, 1.1)

0.1

x(0,1)=(1.1, 1.1)

x(0,2)=(1.262, 1.262)

0.2618

x(0,2)=(1.262, 1.262)-1.592

-1.21

x(0,3)=(1.524, 1.524)

0.5236

x(0,3)=(1.524, 1.524)-2.321

(vi) Step 6:

Solution Procedure of SQP Using the Example- Determination of the Step Size Usingthe Golden Section Search Method (4/6)

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

2122

21 3)( xxxxf -+=x 0 0 0max{ , }

max{10,0} 10R R r=

= =)0,0,0(),,( 321

)0( == uuuu

å=

==m

iiur

1

)0(0 0

0 (1,1),=dSearch direction: 0, 3k j= =

Page 50: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

50Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

( ) ( ) ( )(0, ) (0, ) (0, )0 3.792 10 0.2638 1.154j j jf R VF = + × = - + ´ = -x x x

(0,4) (0,4) (0,4) (0,4)1 2 3, ( ) max{0, ( ), ( ), ( )}

max{0,0.2638, 1.947, 1.947} 0.2638where V g g g=

= - - =

x x x x

(0, ) (0) (0)(0, ) (1,1) 0.947 (1,1) (1.947,1.947)j

j da= + × = + × =x x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0.0 a

F2 3(0, ) 0.1 1.618(0.1) 1.618 (0.1) 1.618 (0.1)

0.9472ja = + + +

=

When

A

B

x(0,0)=(1, 1)-1

x(0,0)=(1, 1)x(0,1)=(1.1, 1.1)

0.1

x(0,1)=(1.1, 1.1)

x(0,2)=(1.262, 1.262)

0.2618

x(0,2)=(1.262, 1.262)-1.592

-1.21

x(0,3)=(1.524, 1.524)

0.5236

x(0,3)=(1.524, 1.524)-2.321

x(0,4)=(1.947, 1.947)

0.9472

x(0,4)=(1.947, 1.947)-1.154

The minimum point exists.0 (1,1),=dSearch direction: 0, 4k j= =

(vi) Step 6:

Solution Procedure of SQP Using the Example- Determination of the Step Size Usingthe Golden Section Search Method (5/6)

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

2122

21 3)( xxxxf -+=x 0 0 0max{ , }

max{10,0} 10R R r=

= =)0,0,0(),,( 321

)0( == uuuu

å=

==m

iiur

1

)0(0 0

Page 51: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

51Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

The value of the is found at which the penalty function is minimized in the interval between and .

(1) (0) (0)0 (1,1) 0.732 (1,1) (1.732,1.732)a= + × = + × =x x d

(0,2)x (0,4)x

( )(1)f x ( )1.732,1.732 3f= = -

0 0.732a =

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x21

22

21 3)( xxxxf -+=x

BA

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0.0 a

F

A

B

x(0,0)=(1, 1)-1

x(0,0)=(1, 1)x(0,1)=(1.1, 1.1)

0.1

x(0,1)=(1.1, 1.1)

x(0,2)=(1.262, 1.262)

0.2618

x(0,2)=(1.262, 1.262)-1.592

-1.21

x(0,3)=(1.524, 1.524)

0.5236

x(0,3)=(1.524, 1.524)-2.321

x(0,4)=(1.947, 1.947)

0.9472

x(0,4)=(1.947, 1.947)-1.154

The minimum point exists.

(vi) Step 6:

Solution Procedure of SQP Using the Example- Determination of the Step Size Usingthe Golden Section Search Method (6/6)

x(0,62)=(1.732, 1.732)-3.000

0.732

Page 52: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

52Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

( ) ( )( )( ) ( )( )( )( )( )

( )( )

(1)

1 51 1

12

13

1 51

1.732,1.732 2.999824

1.732,1.732 5.866 10

1.732

1.732

max{0; 5.866 10 , 1.732, 1.732} 0

f f

g g

g

g

V V

-

-

= = -

= = - ´

= -

= -

= = - ´ - - =

x

x

x

x

x

(2) Iteration 2(k = 1)(i) Step 1: Calculate maximum constraint violation of all the constraints.

From the previous stage,)732.1,732.1()1( =x

)1,0(),0,1(),577.0,577.0(),()()732.1,732.1()32,32()(

32231

131)1(

1

1221)1(

-=Ñ-=Ñ==Ñ

--=--=Ñ

ggxxgxxxxf

xx

And,

Æ Constraint is satisfied.

Æ Constraint is satisfied.

Æ Constraint is satisfied.

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

Solution Procedure of SQP Using the Example- Determination of the Search Direction (1/3) [Iteration 2]

Page 53: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

53Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

(ii&iii) Step 2&3: Define and solve the QP problem to determine the search direction(d(1)).

Quadratic Programming Problem

Minimize

Subject to

)(5.0)732.1732.1( 22

2121 ddddf ++--=

732.1732.1

10866.5577.0577.0

2

1

521

£-£-

´£+ -

dd

dd

Constrained Optimal Design Problem(Original problem)

0)(0)(

00.161

61)(

13

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

)732.1()732.1(

]10866.5)(577.0[)(5.0)732.1732.1(

2323

2212

21

5211

22

2121

sdusdu

sdduddddL

+--+

+--+

+´-++

++--=-

Lagrange function Kuhn-Tucker necessary condition:

j

l

(1)1 2

5

5

(1)1 2 3

(1)1 2 3

( , )(5.081 10 ,5.081 10 )

( , , )(3,0,0)( , , )(0, 1.316, 1.316)

d d

u u u

s s s

-

-

=

= ´

´

==

==

d

u

s

The search direction is0sud =Ñ ),,(L

732.1,732.1

22

11

-=-=

xdxd

where,

( )

1

2

1

2

3

1 1 2

2 1 3

6 21 2 1

21 2

22 3

1.732 0.577 0

1.732 0.577 0

0.577 5.866 10 0

1.732 0

1.732 0

0, 0, 1,2,3i

Ld

Ld

Lu

Lu

Lu

Li is

d u u

d u u

d d s

d s

d s

u s u i

¶¶

¶¶

-¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - ´ + =

= - - + =

= - - + =

= = ³ =

Quadratic programming problem- Objective function: quadratic form- Constraint: linear form

Solution Procedure of SQP Using the Example- Determination of the Search Direction (2/3)

k

* The search direction also can be determined using the Simplex method.

)1,0(,732.1)732.1,732.1()0,1(,732.1)732.1,732.1(

)577.0,577.0(,10866.5)732.1,732.1()732.1,732.1(,3)732.1,732.1(

33

22

15

1

-=Ñ-=-=Ñ-=

=Ñ´-=

--=Ñ-=-

gggg

ggff

Page 54: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

54Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

(iv) Step 4: Check for the following stopping criteria.

The stopping criteria is satisfied.

( ) ( ) )001.0(10186.710081.510081.5

)10081.5,10081.5(),(

252525)1(

5521

)1(

=<´=´+´=

´´==

---

--

ed

d dd

(v) Step 5: Stop the iteration.

The candidate minimum solution: 3)(),3,3( ** -== xx f

where the Lagrange multiplier are:* (3,0,0),=u * (0, 1.316, 1.316)=s

Quadratic programming problem- Objective function: quadratic form- Constraint: linear form

Solution Procedure of SQP Using the Example- Determination of the Search Direction (3/3)

Page 55: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

55Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Improveddesign point

Currentdesign point

Summary of Sequential Quadratic Programming(SQP)

Minimize ) , , ,()( 21 nxxxff L=x,...,pihi 1 ,0)( ==xSubject to

,...,migi 1 ,0)( ==xEquality constraints

Inequality constraints

Optimization Problem

( 1) ( ) ( )k k kka+ = + ×x x d

The improved design point is determined as follows:

Step size calculated by one dimensional search method(ex. Golden section search method)

Search direction obtained from the QP problem

Pshenichny’s descent function:( ) ( ) ( )( ) ( ) ( )k k k

kf R VF = + ×x x xV(x(k)) is either the maximum constraint violation of all the constraints or zero.V(x(k)) is nonnegative. If all the constraints are satisfied, the value of the V(x(k)) is zero.

},,,;,,,;0max{)( 2121)(

mpk ggghhhV LL=x

( ) ( )0

1 1max , ( )

p mk k

k k i ii i

R R r v u= =

ì ü= = +í ý

î þå å: Summation of all the Lagrange multipliers

Rk is a positive number called the penalty parameter(initially specified by the user).

(k is the iteration number how many times the QP problem is defined.)

the penalty function is constructed by adding a penalty for possible constraint violations to the current value of the objective function

Page 56: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

56Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

7.4 Determine the Search Direction of the Quadratic Programming Problem

by Using the Simplex Method

Page 57: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

57Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solve the QP problem to determine the search direction(d(0))

Minimize

Subject to

)(5.0)( 22

2121 ddddf ++--=

11

2

1

32

231

131

£-£-

£+

dd

dd

)1()1(

])2([)(5.0)(

2323

2212

21213

11

22

2121

sdusdu

sdduddddL

+--+

+--+

+-++

++--=Lagrange function Kuhn-Tucker necessary condition

j

l

)1,0(),0,1(),,(),1,1(

1)1,1(,1)1,1(,)1,1(,1)1,1(

32

31

31

1

32

32

1

-=Ñ-=Ñ

=Ñ--=Ñ

-=-=

-=-=

gggf

gggf

1 ,1 2211 -=-= xdxdwhere

( )

1

2

1

2

3

11 1 23

12 1 33

211 2 13

21 2

22 3

1 0

1 0

2 0

0

1 0

1 0

0, , 1, 2,3i

Ld

Ld

Lu

Lu

Lu

iL

i is

d u u

d u u

d d s

d s

d s

u s iu

¶¶

¶¶

¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - + =

= - - + =

= - -

= =³

+ =

=

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

Constrained Optimal Design Problem(Original problem)

Quadratic Programming Problem

6 d1

d2

1 2 3 4 5-1-2

-1

-2

1

2

3

4

5

6

8.05.0

2.01.0

0.1-0.8

A B

C

D

d1=-1

d2=-1d1+d2=2

f

ÆGraphical Representation

Quadratic programming problem- Objective function: quadratic form- Constraint: linear form

Formulation of the Quadratic Programming Problem (1/5)

k

Page 58: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

58Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Kuhn-Tucker necessary condition

Replace with2is is¢

Kuhn-Tucker necessary condition

( )

1

2

1

2

3

11 1 23

12 1 33

211 2 13

21 2

22 3

1 0

1 0

2 0

0

1 0

1 0

0, , 1, 2,3i

Ld

Ld

Lu

Lu

Lu

iL

i is

d u u

d u u

d d s

d s

d s

u s iu

¶¶

¶¶

¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - + =

= - - + =

= - -

= =³

+ =

=

Multiply the both side of equations by si

2 0, 0, 1,2,3i i iu s u i= ³ =

Kuhn-Tucker necessary condition

( )

1

2

1

2

3

11 1 23

12 1 33

11 2 13

1 2

2 3

1 0

1 0

2 0

1 0

1 0

0

, 1,2,3, 0i

Ld

Ld

Lu

Lu

Lu

Li i

i i

s

d u u

d u u

d d s

d s

d

s

s

s

iu

u

¶¶

¶¶

¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

¢= + - + =

¢= - - + =

¢= - - + =

¢

=¢ ³

= =

Represent tofor the

convenience

is¢is ( )

1

2

1

2

3

11 1 23

12 1 33

11 2 13

1 2

2 3

1 0

1 0

2 0

1 0

1 0

0

, 1,2, 0 ,3i

i i

Ld

Ld

Lu

Lu

Lu

Li is

d u u

d u u

d d s

d s

d s

u s

iu s

¶¶

¶¶

¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - + =

= - - + =

= - -

=

+ =

=

Minimize

Subject to

)(5.0)( 22

2121 ddddf ++--=

11

2

1

32

231

131

£-£-

£+

dd

dd

Quadratic Programming Problem

2 0i is s¢= ³

Formulation of the Quadratic Programming Problem (2/5)

Page 59: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

59Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Kuhn-Tucker necessary condition

( )

1

2

1

2

3

11 1 23

12 1 33

11 2 13

1 2

2 3

1 0

1 0

2 0

1 0

1 0

0

, 0, 1,2,3i

Ld

Ld

Lu

Lu

Lu

Li is

i i

d u u

d u u

d d s

d s

d s

u s

u s i

¶¶

¶¶

¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - + =

= - - + =

= - - + =

= =

³ =

Minimize

Subject to

)(5.0)( 22

2121 ddddf ++--=

11

2

1

32

231

131

£-£-

£+

dd

dd

Matrix form

where,

úúú

û

ù

êêê

ë

é=ú

û

ùêë

é-

-=

úû

ùêë

é=ú

û

ùêë

é--

=úû

ùêë

é=

´´

´´´

11,

1001

,1001

,11

,

32

)13(3131

)32(

)22()12(2

1)12(

bA

Hcddd

(3 2) (2 1) (3 1)T

´ ´ ´£A d b

Minimize

Subject to)12()22()21()12()21(

21

´´´´´ += dHddc TTfHow can we express the Kuhn-Tucker necessary condition in matrix form(d, c, H, A, b)?

(2 2)´H (2 2)´IAssume that is equal to .

Formulation of the Quadratic Programming Problem (3/5)

Quadratic Programming Problem

Page 60: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

60Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Matrix form

Kuhn-Tucker necessary condition

( )

1

2

1

2

3

11 1 23

12 1 33

11 2 13

1 2

2 3

1 0

1 0

2 0

1 0

1 0

0

, 0, 1,2,3i

Ld

Ld

Lu

Lu

Lu

Li is

i i

d u u

d u u

d d s

d s

d s

u s

u s i

¶¶

¶¶

¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - + =

= - - + =

= - - + =

= =

³ =

úúú

û

ù

êêê

ë

é=ú

û

ùêë

é-

-=

úû

ùêë

é=ú

û

ùêë

é--

=úû

ùêë

é=

´´

´´´

11,

1001

,1001

,11

,

32

)13(3131

)32(

)22()12(2

1)12(

bA

Hcddd

11 1 23

12 1 33

111 3

212 3

3

(2 1) (2 2) (2 1) (2 3) (3 1)

11

1 01 1 00 11 0 1

d u ud u u

ud

ud

u

´ ´ ´ ´ ´

- + + -é ùê ú- + + -ë û

é ù-- é ùé ùé ù é ù ê ú= + + ê úê úê ú ê ú ê ú--ë û ë û ë û ë û ê úë û

= + + =c H d A u 0

1 1 1 21 2 1 13 3 3 3

11 2 2

22 3 3

(3 2) (2 1) (3 1) (3 1)

( 2)1 1 0 11 0 1 1

T

d d s sd

d s sd

d s s

´ ´ ´ ´

+ - +é ù é ù é ùé ùé ùê ú ê ú ê úê ú- - + = - + -ê úê ú ê ú ê úê úë ûê ú ê ú ê úê ú- - + - ë ûë û ë û ë û

= + - =A d s b 0

Formulation of the Quadratic ProgrammingProblem (4/5)

Page 61: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

61Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

úû

ùêë

é-=

úúúúú

û

ù

êêêêê

ë

é

úû

ùêë

é--

´

´

´

´

´´´´

´´´´

)13(

)12(

)13(

)13(

)12(

)12(

)33()33()23()23(

)32()32()22()22(

bc

sudd

I0AA0AHH

TT

where

úúúúúú

û

ù

êêêêêê

ë

é

--

----

--

10000010100100000101001000000101010000010101

31

31

31

31

3131

)105(B

[ ] [ ]1111, 32

)51(3213212121)101( == ´--++

´TT sssuuudddd DX

Kuhn-Tucker necessary condition in Matrix form: 0sudd =Ñ -+ ),,,(L

)105( ´B= )15( ´D=

)110( ´X=

úúú

û

ù

êêê

ë

é=ú

û

ùêë

é-

-=ú

û

ùêë

é=ú

û

ùêë

é--

=úû

ùêë

é=ú

û

ùêë

é= ´´´´-

--

´+

++

´

11,

1001

,1001

,11

,,32

)13(3131

)32()22()12(2

1)12(

2

1)12( bAHcdd

dd

dd

Formulation of the Quadratic Programming Problem (5/5)

+´´ -= )12()12()12( ddd

In order to use the Simplex method, we decompose into two variables, because the design variables d(n×1) are free in sign:

Page 62: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

62Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

)15()110()105( ´´´ = DXB

Kuhn-Tucker necessary condition(matrix form)

Æ This problem is to find X in the linear programming problem only having the equality constraints.

Æ : Check whether the solution obtained from the linear indeterminate equation satisfies the nonlinear indeterminate equation and determine the solution.

3 1;0 toisu ii ==

We want to find.

úúúúúú

û

ù

êêêêêê

ë

é

=

úúúúúúúúúúúúúú

û

ù

êêêêêêêêêêêêêê

ë

é

úúúúúú

û

ù

êêêêêê

ë

é

--

----

-- -

-

+

+

11

11

10000010100100000101001000000101010000010101

32

3

2

1

3

2

1

2

1

2

1

31

31

31

31

3131

sssuuudddd

Formulation of the Quadratic Programming Problemto Find the Search Direction by Using the Simplex Method

Page 63: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

63Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

1. The problem to solve the Kuhn-Tucker necessary condition is the same with the problem having only the equality constraints (Linear Programming problem).2. To solve the linear indeterminate equation, we introduce the artificial variables, define the artificial objective function , and then determine the initial basic feasible solution by using the Simplex method.

3. The artificial objective function is defined as follows.

ååååå== ===

+=-==10

10

10

1

5

1

5

1

5

1 jjj

j ijij

ii

ii XCwXBDYw

where

314

32

5

10

5

1

1111 =++++==

-=

å

å

=

=

ii

iijj

Dw

BC : Add the elements of the j th column of the matrix B and change the its sign.(Initial relative objective coefficient).

4. Solve the linear programming problem by using the Simplex and check whether the solution satisfies the following nonlinear equation.

: Initial value of the artificial objective function (summation of the all elements of the matrix D)

)15()15()110()105( ´´´´ =+ DYXBArtificial variables

3 1;0 toisu ii == : Check whether the solution obtained from the linear indeterminate equation satisfies the nonlinear indeterminate equation and determine the solution.

Determine the Search Direction by Using the Simplex Method- Iteration 1 (1/6)

Simplex method to solve the quadratic programming problem

Page 64: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

64Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Artificial objective function

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

Y1 1 0 -1 0 1/3 -1 0 0 0 0 1 0 0 0 0 1 -

Y2 0 1 0 -1 1/3 0 -1 0 0 0 0 1 0 0 0 1 -

Y3 1/3 1/3 -1/3 -1/3 0 0 0 1 0 0 0 0 1 0 0 2/3 2/3

Y4 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 -

Y5 0 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 -

A. Obj. -1/3 -1/3 1/3 1/3 -2/3 1 1 -1 -1 -1 0 0 0 0 0 w-14/3 -

1

Sum all the elements of the row and change the its sign (ex. Row 1: -(1+0+1/3-1+0)=-1/3)

Artificial variables

)15()15()110()105( ´´´´ =+ DYXB Æ

úúúúúú

û

ù

êêêêêê

ë

é

=

úúúúúú

û

ù

êêêêêê

ë

é

+

úúúúúúúúúúúúúú

û

ù

êêêêêêêêêêêêêê

ë

é

==========

úúúúúú

û

ù

êêêêêê

ë

é

--

----

-- -

-

+

+

11

11

)()()()()()()()()()(

10000010100100000101001000000101010000010101

32

5

4

3

2

1

103

92

81

73

62

51

42

31

22

11

31

31

31

31

3131

YYYYY

XsXsXsXuXuXuXdXdXdXd

Define the artificial objective function for using the Simplex method:1 1 1 1 2 14

1 2 3 4 5 6 7 8 9 10 1 2 3 4 53 3 3 3 3 3X X X X X X X X X X Y Y Y Y Y+ - - + - - + + + + + + + + =Sum all the rows(1~5):

Express the artificial function as w and rearrange:

w1 1 1 1 2 14

1 2 3 4 5 6 7 8 9 103 3 3 3 3 3X X X X X X X X X X w- - + + - + + - - - = -

Determine the Search Direction by Using the Simplex Method- Iteration 1 (2/6)

Page 65: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

65Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

Y1 1 0 -1 0 1/3 -1 0 0 0 0 1 0 0 0 0 1 1

Y2 0 1 0 -1 1/3 0 -1 0 0 0 0 1 0 0 0 1 -

X8 1/3 1/3 -1/3 -1/3 0 0 0 1 0 0 0 0 1 0 0 2/3 2

X9 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 -

X10 0 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 -

A. Obj. -1 -1 1 1 -2/3 1 1 0 0 0 0 0 1 1 1 w-2 -

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

Y1 1 0 -1 0 1/3 -1 0 0 0 0 1 0 0 0 0 1 -

Y2 0 1 0 -1 1/3 0 -1 0 0 0 0 1 0 0 0 1 -

X8 1/3 1/3 -1/3 -1/3 0 0 0 1 0 0 0 0 1 0 0 2/3 -

Y4 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1

Y5 0 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 -

A. Obj. 0 0 0 0 -2/3 1 1 0 -1 -1 0 0 1 0 0 w-4 -

2

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

Y1 1 0 -1 0 1/3 -1 0 0 0 0 1 0 0 0 0 1 -

Y2 0 1 0 -1 1/3 0 -1 0 0 0 0 1 0 0 0 1 -

X8 1/3 1/3 -1/3 -1/3 0 0 0 1 0 0 0 0 1 0 0 2/3 -

X9 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 -

Y5 0 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1

A. Obj. -1 0 1 0 -2/3 1 1 0 0 -1 0 0 1 1 0 w-3 -

3

4

Determine the Search Direction by Using the Simplex Method- Iteration 1 (3/6)

Page 66: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

66Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X1 1 0 -1 0 1/3 -1 0 0 0 0 1 0 0 0 0 1 -

Y2 0 1 0 -1 1/3 0 -1 0 0 0 0 1 0 0 0 1 1

X8 0 1/3 0 -1/3 -1/9 1/3 0 1 0 0 -1/3 0 1 0 0 1/3 1

X9 0 0 0 0 1/3 -1 0 0 1 0 1 0 0 1 0 2 -

X10 0 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 1 -

A. Obj. 0 -1 0 1 -1/3 0 1 0 0 0 1 0 1 1 1 w-1 -

5

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X1 1 0 -1 0 1/3 -1 0 0 0 0 1 0 0 0 0 1 -

X2 0 1 0 -1 1/3 0 -1 0 0 0 0 1 0 0 0 1 -

X8 0 0 0 0 -2/9 1/3 1/3 1 0 0 -1/3 -1/3 1 0 0 0 -

X9 0 0 0 0 1/3 -1 0 0 1 0 1 0 0 1 0 2 -

X10 0 0 0 0 1/3 0 -1 0 0 1 0 1 0 0 1 2 -

A. Obj. 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 w-0 -

6

Since the value of the objective function becomes zero, the initial basic feasible solution is obtained.

Determine the Search Direction by Using the Simplex Method- Iteration 1 (4/6)

Page 67: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

67Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X1 1 0 -1 0 1/3 -1 0 0 0 0 1 0 0 0 0 1 -

X2 0 1 0 -1 1/3 0 -1 0 0 0 0 1 0 0 0 1 -

X8 0 0 0 0 -2/9 1/3 1/3 1 0 0 -1/3 -1/3 1 0 0 0 -

X9 0 0 0 0 1/3 -1 0 0 1 0 1 0 0 1 0 2 -

X10 0 0 0 0 1/3 0 -1 0 0 1 0 1 0 0 1 2 -

A. Obj. 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 w-0 -

6

Since the value of the objective function becomes zero, the initial basic feasible solution is obtained.

So, the optimal solution is .2,0,0,1 32132121 ======== sssuuuddThis solution satisfies the nonlinear indeterminate equation( )01 1;0,7 5;03 toiXtoiXX iii =³==+

[ ]3213212121)101( sssuuuddddT --++´ =X

Æ Caution: In the Pivot step, if the smallest(i.e., the most negative) coefficient of the artificial objective functionor the smallest positive ratio“bi/ai” appears more than one time, the initial basic feasible solution can bechanged depending on the selection of the pivot element in the pivot procedure.

Æ We have to check the solution until the nonlinear indeterminate equation(ui*si=0) are satisfied.

1 1,X = 2 1,X = 8 0,X = 9 2,X = 10 2X =Basic solution:

Nonbasic solution:

3 4 5 6 7 0X X X X X= = = = =

Determine the Search Direction by Using the Simplex Method- Iteration 1 (5/6)

Page 68: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

68Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

6 d1

d2

1 2 3 4 5-1-2

-1

-2

1

2

3

4

5

6

8.05.0

2.01.0

0.1-0.8

A B

C

D

d1=-1d2=-1

d1+d2=2

fThis example is graphically represented in the right side.

1 0s =However, fortunately, the optimal solution is onthe linearized inequality constraint(g1(x), d1+d2=2).

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

The optimal solution for this problem is .Why are the values of u1 and s1 are zero at the same time?

2,0,0,1 32132121 ======== sssuuudd

Minimize

Subject to

)(5.0)( 22

2121 ddddf ++--=

11

2

1

32

231

131

£-£-

£+

dd

dd

Quadratic Programming Problem

Optimal solution

2 3 0u u= =The optimal solution is in the region satisfying the inequality constraints of d1 = -1 > 0, d2 = -1 > 0 which are inactive.

The optimal solution is on the inequality constraint(g1(x)) and is equal to the optimal solution of the objective function to be approximated to the second order. Therefore, although we do not consider the inequality constraint g1(x), the optimal solution of QP problem is not changed. (g1(x) does not affect the optimal solution of this problem.)

1 0u =

Determine the Search Direction by Using the Simplex Method- Iteration 1 (6/6)

Page 69: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

69Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

The value of the is found at which the penalty function is minimized in the interval between and .

(1) (0) (0)0 (1,1) 0.732 (1,1) (1.732,1.732)a= + × = + × =x x d

(0,2)x (0,4)x

( )(1)f x ( )1.732,1.732 3f= = -

0 0.732a =

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x21

22

21 3)( xxxxf -+=x

BA

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0.0 a

F

A

B

x(0,0)=(1, 1)-1

x(0,0)=(1, 1)x(0,1)=(1.1, 1.1)

0.1

x(0,1)=(1.1, 1.1)

x(0,2)=(1.262, 1.262)

0.2618

x(0,2)=(1.262, 1.262)-1.592

-1.21

x(0,3)=(1.524, 1.524)

0.5236

x(0,3)=(1.524, 1.524)-2.321

x(0,4)=(1.947, 1.947)

0.9472

x(0,4)=(1.947, 1.947)-1.154

The minimum point exists.

Determination of the Step Size for the Penalty Function of the Pshenichny’s Descent Function by Using the Golden Section Search Method

x(0,62)=(1.732, 1.732)-3.000

0.732

Page 70: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

70Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solve the QP problem to determine the search direction(d(0))

Quadratic Programming Problem

Minimize

Subject to

)(5.0)732.1732.1( 22

2121 ddddf ++--=

732.1732.1

10866.5577.0577.0

2

1

521

£-£-

´£+ -

dd

dd

Constrained Optimal Design Problem(Original problem)

0)(0)(

00.161

61)(

13

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to21

22

21 3)( xxxxf -+=x

)732.1()732.1(

]10866.5)(577.0[)(5.0)732.1732.1(

2323

2212

21

5211

22

2121

sdusdu

sdduddddL

+--+

+--+

+´-++

++--=-

Lagrange function Kuhn-Tucker necessary condition:

j

l

0sud =Ñ ),,(L

732.1,732.1

22

11

-=-=

xdxd

where

( )

1

2

1

2

3

1 1 2

2 1 3

6 21 2 1

21 2

22 3

1.732 0.577 0

1.732 0.577 0

0.577 5.866 10 0

1.732 0

1.732 0

0, 0, 1,2,3i

Ld

Ld

Lu

Lu

Lu

Li is

d u u

d u u

d d s

d s

d s

u s u i

¶¶

¶¶

-¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - ´ + =

= - - + =

= - - + =

= = ³ =

)1,0(,732.1)732.1,732.1()0,1(,732.1)732.1,732.1(

)577.0,577.0(,10866.5)732.1,732.1()732.1,732.1(,3)732.1,732.1(

33

22

15

1

-=Ñ-=-=Ñ-=

=Ñ´-=

--=Ñ-=-

gggg

ggff

1. Multiply the both side by si and replace si

2 with si’.

2. Represent si’ to si for the convenience.

Quadratic programming problem- Objective function: quadratic form- Constraint: linear form

Determine the Search Direction by Using the Simplex Method- Iteration 2 (1/10)

k

Page 71: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

71Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

(3 2) (2 1) (3 1)T

´ ´ ´£A d b

Minimize

Subject to

Minimize

Subject to

where

Matrix form

1(2 1) (2 1) (2 2)

2

(2 3) (3 1)

1.732 1 0, , ,

1.732 0 1

00.577 1 0

, 1.7320.577 0 1

1.732

dd´ ´ ´

´ ´

-é ù é ù é ù= = =ê ú ê ú ê ú-ë û ë ûë û

é ù-é ù ê ú= =ê ú ê ú-ë û ê úë û

d c H

A b

)12()22()21()12()21(21

´´´´´ += dHddc TTf

2 21 2 1 2( 1.732 1.732 ) 0.5( )f d d d d= - - + +

1 2

1

2

0.577 0.577 01.7321.732

d ddd

+ £- £- £

Quadratic Programming ProblemKuhn-Tucker necessary condition

( )

1

2

1

2

3

1 1 2

2 1 3

61 2 1

1 2

2 3

1.732 0.577 0

1.732 0.577 0

0.577 5.866 10 0

1.732 0

1.732 0

0, , 0, 1, 2,3i

Ld

Ld

Lu

Lu

Lu

Li i i is

d u u

d u u

d d s

d s

d s

u s u s i

¶¶

¶¶

-¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - ´ + =

= - - + =

= - - + =

= = ³ =

(2 2)´H (2 2)´IAssume that is equal to .

Determine the Search Direction by Using the Simplex Method- Iteration 2 (2/10)

Page 72: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

72Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Matrix form

1 1 2

2 1 3

11

22

3

(2 1) (2 2) (2 1) (2 3) (3 1)

1.732 0.5771.732 0.577

1.732 1 0 0.577 1 01.732 0 1 0.577 0 1

d u ud u u

ud

ud

u

´ ´ ´ ´ ´

- + + -é ùê ú- + + -ë û

é ù- -é ùé ù é ù é ù ê ú= + +ê úê ú ê ú ê ú ê ú- -ë û ë û ë ûë û ê úë û

= + + =c H d A u 0

úû

ùêë

é-=

úúúúú

û

ù

êêêêê

ë

é

úû

ùêë

é--

´

´

´

´

´´´´

´´´´

)13(

)12(

)13(

)13(

)12(

)12(

)33()33()23()23(

)32()32()22()22(

bc

sudd

I0AA0AHH

TT

)105( ´B= )15( ´D=)110( ´X=

1(2 1) (2 1) (2 2)

2

(2 3) (3 1)

1.732 1 0, , ,

1.732 0 1

00.577 1 0

, 1.7320.577 0 1

1.732

dd´ ´ ´

´ ´

-é ù é ù é ù= = =ê ú ê ú ê ú-ë û ë ûë û

é ù-é ù ê ú= =ê ú ê ú-ë û ê úë û

d c H

A b

Kuhn-Tucker necessary condition

( )

1

2

1

2

3

1 1 2

2 1 3

61 2 1

1 2

2 3

1.732 0.577 0

1.732 0.577 0

0.577 5.866 10 0

1.732 0

1.732 0

0, , 0, 1, 2,3i

Ld

Ld

Lu

Lu

Lu

Li i i is

d u u

d u u

d d s

d s

d s

u s u s i

¶¶

¶¶

-¶¶

¶¶

¶¶

¶¶

= - + + - =

= - + + - =

= + - ´ + =

= - - + =

= - - + =

= = ³ =1 2 1 1

11 2 2

22 3 3

(3 2) (2 1) (3 1) (3 1)

0.577 0.577 0.577 0.577 01.732 1 0 1.7321.732 0 1 1.732

T

d d s sd

d s sd

d s s

´ ´ ´ ´

é ù é ù- - + é ù é ùé ùê ú ê úê ú ê ú- - + = - + -ê úê ú ê úê ú ê úë ûê ú ê úê ú ê ú- - + -ë û ë ûë û ë û

= + - =A d s b 0

+´´ -= )12()12()12( ddd

Since the design variables d(n×1) are free in sign, we may decompose them as follows for using the Simplex method.

Determine the Search Direction by Using the Simplex Method- Iteration 2 (3/10)

Page 73: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

73Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

úû

ùêë

é-=

úúúúú

û

ù

êêêêê

ë

é

úû

ùêë

é--

´

´

´

´

´´´´

´´´´

)13(

)12(

)13(

)13(

)12(

)12(

)33()33()23()23(

)32()32()22()22(

bc

sudd

I0AA0AHH

TT

where,

(5 10)

1 0 1 0 0.577 1 0 0 0 00 1 0 1 0.577 0 1 0 0 0

0.577 0.577 0.577 0.577 0 0 0 1 0 01 0 1 0 0 0 0 0 1 0

0 1 0 1 0 0 0 0 0 1

´

- -é ùê ú- -ê úê ú= - -ê ú-ê úê ú-ë û

B

[ ](1 10) 1 2 1 2 1 2 3 1 2 3 (1 5), 1.732 1.732 0 1.732 1.732T Td d d d u u u s s s+ + - -´ ´é ù= =ë ûX D

Kuhn-Tucker necessary condition: 0sudd =Ñ -+ ),,,(L

)105( ´B= )15( ´D=

)110( ´X=

1 1(2 1) (2 1) (2 1) (2 2) (2 3) (3 1)

2 2

01.732 1 0 0.577 1 0

, , , , , 1.7321.732 0 1 0.577 0 1

1.732

d dd d

+ -+ -

´ ´ ´ ´ ´ ´+ -

é ùé ù é ù - -é ù é ù é ù ê ú= = = = = =ê ú ê ú ê ú ê ú ê ú ê ú- -ë û ë û ë ûë û ë û ê úë û

d d c H A b

Determine the Search Direction by Using the Simplex Method- Iteration 2 (4/10)

Page 74: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

74Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

)15()110()105( ´´´ = DXB

Kuhn-Tucker necessary condition(matrix form)

1

2

1

2

1

2

3

1

2

3

1 0 1 0 0.577 1 0 0 0 0 1.7320 1 0 1 0.577 0 1 0 0 0 1.732

0.577 0.577 0.577 0.577 0 0 0 1 0 0 01 0 1 0 0 0 0 0 1 0 1.732

0 1 0 1 0 0 0 0 0 1 1.732

dddduuusss

+

+

-

-

é ùê úê úê ú

- -é ù é ùê úê ú ê úê ú- -ê ú ê úê úê ú ê úê ú =- -ê ú ê úê ú-ê ú ê úê úê ú ê úê ú-ë û ë ûê ú

ê úê úê úë û

Determine the Search Direction by Using the Simplex Method- Iteration 2 (5/10)

Æ This problem is to find X in the linear programming problem only having the equality constraints.

Æ : Check whether the solution obtained from the linear indeterminate equation satisfies the nonlinear indeterminate equation and determine the solution.

3 1;0 toisu ii ==

We want to find.

Page 75: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

75Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Simplex method to solve the quadratic programming problem1. The problem to solve the Kuhn-Tucker necessary condition is the same with the problem having only the equality constraints(linear programming problem).2. To solve the linear indeterminate equation, we introduce the artificial variables, define the artificial objective function and determine the initial basic feasible solution by using the Simplex method.

3. The artificial objective function is defined as follows.

ååååå== ===

+=-==10

10

10

1

5

1

5

1

5

1 jjj

j ijij

ii

ii XCwXBDYw

where

314

32

5

10

5

1

1111 =++++==

-=

å

å

=

=

ii

iijj

Dw

BC : Add the elements of the j th column of the matrix B and change the its sign.(Initial relative objective coefficient).

4. Solve the linear programming problem by using the Simplex and check whether the solution satisfies the following equation.

: Initial value of the artificial objective function (summation of the all elements of the matrix D)

)15()15()110()105( ´´´´ =+ DYXBArtificial variables

3 1;0 toisu ii == : Check whether the solution obtained from the linear indeterminate equation satisfies the nonlinear indeterminate equation and determine the solution.

Determine the Search Direction by Using the Simplex Method- Iteration 2 (6/10)

Page 76: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

76Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

Y1 1 0 -1 0 0.577 -1 0 0 0 0 1 0 0 0 0 1.732 3

Y2 0 1 0 -1 0.577 0 -1 0 0 0 0 1 0 0 0 1.732 3

Y3 0.577 0.577 -0.577 -0.577 0 0 0 1 0 0 0 0 1 0 0 0 -

Y4 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1.732 -

Y5 0 -1 0 1 0 0 0 0 0 1 0 0 0 0 1 1.732 -

A. Obj. -0.577 -0.577 0.577 0.577 -1.154 1 1 -1 -1 -1 0 0 0 0 0 w-6.928 -

1

Sum all the elements of the row and change the its sign (ex. 1 row: -(1+0+1/3-1+0)=-1/3)Artificial objective function

Artificial variables)15()15()110()105( ´´´´ =+ DYXB Æ

1

2

1

2

1

2

3

1

2

3

1 0 1 0 0.577 1 0 0 0 0 1.7320 1 0 1 0.577 0 1 0 0 0 1.732

0.577 0.577 0.577 0.577 0 0 0 1 0 0 01 0 1 0 0 0 0 0 1 0 1.732

0 1 0 1 0 0 0 0 0 1 1.732

dddduuusss

+

+

-

-

é ùê úê úê ú

- -é ù é ùê úê ú ê úê ú- -ê ú ê úê úê ú ê úê ú =- -ê ú ê úê ú-ê ú ê úê úê ú ê úê ú-ë û ë ûê ú

ê úê úê úë ûDefine the artificial objective function for using the Simplex method

1 2 3 4 5 6 7 8 9 10 1 2 3 4 50.577 0.577 0.577 0.577 1.154 6.928X X X X X X X X X X Y Y Y Y Y+ - - + - - + + + + + + + + =Sum the all rows(1~5):

Replace the summation of the all artificial to w and rearrange:

w1 2 3 4 5 6 7 8 9 100.577 0.577 0.577 0.577 1.154 6.928X X X X X X X X X X w- - + + - + + - - - = -

Determine the Search Direction by Using the Simplex Method- Iteration 2 (7/10)

Page 77: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

77Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X5 1.732 0.000 -1.732 0.000 1.000 -1.732 0.000 0.000 0.000 0.000 1.732 0.000 0.000 0.000 0.000 3.000 -1.732

Y2 -1.000 1.000 1.000 -1.000 0.000 1.000 -1.000 0.000 0.000 0.000 -1.000 1.000 0.000 0.000 0.000 0.000 0.000

Y3 0.577 0.577 -0.577 -0.577 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000

Y4 -1.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 0.000 1.732 1.732

Y5 0.000 -1.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 1.732 -

A. Obj. 1.423 -0.577 -1.423 0.577 0.000 -1.000 1.000 -1.000 -1.000 -1.000 2.000 0.000 0.000 0.000 0.000 w-3.464

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X5 0.000 1.732 0.000 -1.732 1.000 0.000 -1.732 0.000 0.000 0.000 0.000 1.732 0.000 0.000 0.000 3.000 -

X3 -1.000 1.000 1.000 -1.000 0.000 1.000 -1.000 0.000 0.000 0.000 -1.000 1.000 0.000 0.000 0.000 0.000 -

Y3 0.000 1.155 0.000 -1.155 0.000 0.577 -0.577 1.000 0.000 0.000 -0.577 0.577 1.000 0.000 0.000 0.000 -

Y4 0.000 -1.000 0.000 1.000 0.000 -1.000 1.000 0.000 1.000 0.000 1.000 -1.000 0.000 1.000 0.000 1.732 1.732

X10 0.000 -1.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 1.732 -

A. Obj. 0.000 -0.155 0.000 0.155 0.000 0.423 -0.423 -1.000 -1.000 0.000 0.577 1.423 0.000 0.000 1.000 w-1.732

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X5 0.000 1.732 0.000 -1.732 1.000 0.000 -1.732 0.000 0.000 0.000 0.000 1.732 0.000 0.000 0.000 3.000 -

X3 -1.000 1.000 1.000 -1.000 0.000 1.000 -1.000 0.000 0.000 0.000 -1.000 1.000 0.000 0.000 0.000 0.000 -

Y3 0.000 1.155 0.000 -1.155 0.000 0.577 -0.577 1.000 0.000 0.000 -0.577 0.577 1.000 0.000 0.000 0.000 -

Y4 0.000 -1.000 0.000 1.000 0.000 -1.000 1.000 0.000 1.000 0.000 1.000 -1.000 0.000 1.000 0.000 1.732 -

Y5 0.000 -1.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 1.732 1.732

A. Obj. 0.000 0.845 0.000 -0.845 0.000 0.423 -0.423 -1.000 -1.000 -1.000 0.577 1.423 0.000 0.000 0.000 w-3.464

2

3

4

Determine the Search Direction by Using the Simplex Method- Iteration 2 (8/10)

Page 78: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

78Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X5 0.000 1.732 0.000 -1.732 1.000 0.000 -1.732 0.000 0.000 0.000 0.000 1.732 0.000 0.000 0.000 3.000 1.732

X3 -1.000 1.000 1.000 -1.000 0.000 1.000 -1.000 0.000 0.000 0.000 -1.000 1.000 0.000 0.000 0.000 0.000 0.000

Y3 0.000 1.155 0.000 -1.155 0.000 0.577 -0.577 1.000 0.000 0.000 -0.577 0.577 1.000 0.000 0.000 0.000 0.000

X9 0.000 -1.000 0.000 1.000 0.000 -1.000 1.000 0.000 1.000 0.000 1.000 -1.000 0.000 1.000 0.000 1.732 -1.732

X10 0.000 -1.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 1.732 -1.732

A. Obj. 0.000 -1.155 0.000 1.155 0.000 -0.577 0.577 -1.000 0.000 0.000 1.577 0.423 0.000 1.000 1.000 w-0.000

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X5 0.000 0.000 0.000 0.000 1.000 -0.866 -0.866 -1.500 0.000 0.000 0.866 0.866 -1.500 0.000 0.000 3.000

X2 0.000 1.000 0.000 -1.000 0.000 0.500 -0.500 0.866 0.000 0.000 -0.500 0.500 0.866 0.000 0.000 0.000

X1 1.000 0.000 -1.000 0.000 0.000 -0.500 0.500 0.866 0.000 0.000 0.500 -0.500 0.866 0.000 0.000 0.000

X9 0.000 0.000 0.000 0.000 0.000 -0.500 0.500 0.866 1.000 0.000 0.500 -0.500 0.866 1.000 0.000 1.732

X10 0.000 0.000 0.000 0.000 0.000 0.500 -0.500 0.866 0.000 1.000 -0.500 0.500 0.866 0.000 1.000 1.732

A. Obj. 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 w-0.000

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X5 1.732 0.000 -1.732 0.000 1.000 -1.732 0.000 0.000 0.000 0.000 1.732 0.000 0.000 0.000 0.000 3.000 1.732

X2 -1.000 1.000 1.000 -1.000 0.000 1.000 -1.000 0.000 0.000 0.000 -1.000 1.000 0.000 0.000 0.000 0.000 0.000

Y3 1.155 0.000 -1.155 0.000 0.000 -0.577 0.577 1.000 0.000 0.000 0.577 -0.577 1.000 0.000 0.000 0.000 0.000

X9 -1.000 0.000 1.000 0.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 0.000 1.732 -1.732

X10 -1.000 0.000 1.000 0.000 0.000 1.000 -1.000 0.000 0.000 1.000 -1.000 1.000 0.000 0.000 1.000 1.732 -1.732

A. Obj. -1.155 0.000 1.155 0.000 0.000 0.577 -0.577 -1.000 0.000 0.000 0.423 1.577 0.000 1.000 1.000 w-0.000

Determine the Search Direction by Using the Simplex Method- Iteration 2 (9/10)

5

6

7

Page 79: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

79Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

So, the optimal solution is .1 2 1 2 3 1 2 30, 3, 0, 0, 1.732d d u u u s s s= = = = = = = =This solution satisfy the nonlinear indeterminate equation( ).01 1;0,7 5;03 toiXtoiXX iii =³==+

Æ In the Pivot step, if the smallest(i.e., the most negative) coefficient of the artificial objective function or the smallest positive ratio “bi/ai” appears more than one time, the initial basic feasible solution can be changed by depending on the selection of the pivot element in the pivot procedure.

Æ We have to find and check the solution until the nonlinear indeterminate equation(ui*si=0) is satisfied.

X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Y1 Y2 Y3 Y4 Y5 bi bi/ai

X5 0.000 0.000 0.000 0.000 1.000 -0.866 -0.866 -1.500 0.000 0.000 0.866 0.866 -1.500 0.000 0.000 3.000

X2 0.000 1.000 0.000 -1.000 0.000 0.500 -0.500 0.866 0.000 0.000 -0.500 0.500 0.866 0.000 0.000 0.000

X1 1.000 0.000 -1.000 0.000 0.000 -0.500 0.500 0.866 0.000 0.000 0.500 -0.500 0.866 0.000 0.000 0.000

X9 0.000 0.000 0.000 0.000 0.000 -0.500 0.500 0.866 1.000 0.000 0.500 -0.500 0.866 1.000 0.000 1.732

X10 0.000 0.000 0.000 0.000 0.000 0.500 -0.500 0.866 0.000 1.000 -0.500 0.500 0.866 0.000 1.000 1.732

A. Obj. 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 1.000 1.000 1.000 1.000 w-0.000

[ ]3213212121)101( sssuuuddddT --++´ =X

5 3,X = 2 0,X = 1 0,X = 9 1.732,X = 10 1.732X =Basic solution:

Nonbasic solution:

3 4 6 7 8 0X X X X X= = = = =

Determine the Search Direction by Using the Simplex Method- Iteration 2 (10/10)

7

Page 80: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

80Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

7.5 Summary of the Sequential Quadratic Programming(SQP)

Page 81: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

81Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Define:

ii

ijijijijii

jjjj

xdxgaxhnxfc

gbhefff

D=

¶¶=¶¶=¶¶=

-=-=-D+=

,/)( ,/)( ,/)(),( ),( ),()(

xxxxxxxx

Matrix form

Minimize

Subject to

)1()()1()1()1(21

´´´´´ += nnnnT

nnTf dHddc

)1()1()(

)1()1()(

´´´

´´´

£

=

mnnmT

pnnpT

bdA

edN

xHxxxxxx DD+DÑ+@D+ TTfff 5.0)()()(Minimize

mtojggg

ptojhhhTjjj

Tjjj

1;0)()()(

1;0)()()(

=£DÑ+@D+

==DÑ+@D+

xxxxx

xxxxxSubject to

: Quadratic objective function

: Linear equality constraints

: Linear inequality constraints

The first-order(linear) Taylor series expansion of the equality constraints

The first-order(linear) Taylor series expansion of the inequality constraints

The second-order Taylor series expansion of the objective function

Formulation of the Quadratic Programming Problemto Determine the Search Direction

Page 82: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

82Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Trial design point for which the descent condition is checked

Determination of the improved design point by using the one dimensional search method such as the Golden section search method( is changed to .)

( , ) ( ) ( )( , )

k j k kk ja= +x x d Æ How can we determine the value of the a(k,j) to find the improved design point?

Find the improved design point which minimizes the descent function more than the current point by changing a(k,j). (One dimensional search method, such as the Golden section search method, can be used.)

After finding the interval in which the minimum lies, find the minimum point, x, by reducing the interval(Golden section search method).

0 d 2.618d5.236d 9.472d

421q = 0 …

16.326d

3

al aa au

= = =

The interval in which the minimum lies

)(xF

I

al aa au aUpper limitLower limit

The interval in which the minimum lies

ab

0.618I 0.382I

)(xF

)1( +kx

)1( +kx( , )k jx )1( +kx

Determination of the Step Sizeby Using the Golden Section Search Method

Page 83: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

83Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Minimize

Subject to

)1()1()1()1()1()()1()1()1(21

21

´´´´´´´´´ +=+= nnT

nnT

nnnnT

nnTf dddcdIddc

)1()1()(

)1()1()(

´´´

´´´

£

=

mnnmT

pnnpT

bdA

edN

Minimize

Subject to

Assumption: H(nÍn) = I(nÍn)

)1()()1()1()1(21

´´´´´ += nnnnT

nnTf dHddc

)1()1()(

)1()1()(

´´´

´´´

£

=

mnnmT

pnnpT

bdA

edN

Æ Since H(nÍn) = I(nÍn), the objective function is a quadratic form.

Æ All constraints are linear.Æ This problem is called the convex

programming problem and any local optimum solution is also a global optimum solution.

Formulation of the Quadratic Programming Problem

Page 84: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

84Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Define the QP problem to determine the search direction d(k) and calculate the Lagrange multiplier

at the given design point x(k).

Solve the QP problem(solution: search direction d(k), Lagrange multiplier) by using the Lagrange function and Kuhn-Tucker necessary condition.

k = k + 1Yes

Check for the stopping criteria çd(k)ç£ e2 and the maximum constraint violation Vk£ e1.

Set x* = x(k)

and stop.Yes

No

SequentialQuadraticProgramming

Find the improved design point(x(k+1)) to minimize thedescent function along the search direction(d(k)) byusing the one dimensional search method(ex: Goldensection search method)

Flow Diagram of the SQP Algorithm

Page 85: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

85Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Summary of the SQP Algorithm (1/2)

þ Step 1: Set k = 0. Estimate the initial value for the design variables as x(0). Select an appropriate initial value for the penalty parameter R0, and two small number e1, e2 that define the permissible constraint violations and convergence parameter values, respectively.

þ Step 2: At x(k), compute the objective and constraint functions and their gradient. Calculate the maximum constraint violation Vk.

þ Step 3: Using the objective and constraints function values and their gradients, define the QP problem. Solve the QP problem to obtain the search direction d(k)(= x(k+1)

- x(k)) and Lagrange multiplier v(k) and u(k).

Page 86: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

86Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Summary of the SQP Algorithm (2/2)

þ Step 4: Check for the stopping criteria çd(k)ç£ e2 and the maximum constraint violation Vk£ e1. If these criteria are satisfied then stop. Otherwise continue.

þ Step 5: Calculate the sum rk of the Lagrange multiplier. Set R = max{Rk, rk}.

þ Step 6: Set x(k,j) = x(k) + a(k,j)d(k), where a = a(k,j) is a proper step size. As for the unconstrained problems, the step size can be obtained by minimizing the descent function along the search direction d(k). The one dimensional search method, such as the Golden section search method, can be used to determine the optimum step size.(If the one dimensional search method is completed, the current design point x(k,j) is changed to x(k+1).)

þ Step 7: Save the current penalty parameter as Rk = R. Update the iteration counter as k = k+1 and go to Step 2.

Page 87: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

87Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Effect of the Starting Point in the SQP Algorithm

The starting point can affect performance of the algorithm.

For example, at some points, the Quadratic Programming problem defined to determine the search direction may not have any solution.This does not mean that the original

problem is infeasible. The original problem may be highly

nonlinear, so that the linearized constraints may be inconsistent giving infeasible Quadratic Programming problem.

This situation can be handled by either temporarily deleting the inconsistent constraints or starting from another point.

Page 88: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

88Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Appendix] Another Method for Solving Nonlinear Indeterminate

Equations

Applying the Simplex Method

Page 89: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

89Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Kuhn-Tucker necessary condition:

,0222 12111

=---+-=¶¶ zuuxxL 0222 2212

2

=---+-=¶¶ zuuxxL

042 2221

2

=++--=¶¶ sxxuL,042 2

1211

=++--=¶¶ sxxuL

0),,,,( =Ñ δζsuxL

,02 211

1

==¶¶ susL 02 2

222

==¶¶ susL

0211

1

=+-=¶¶ dz

xL

0222

2

=+-=¶¶ dz

xL,02 211

1

==¶¶ dzdL 02 2

222

==¶¶ dzdL Substitute

,02 111

==¶¶ xL zd

02 222

==¶¶ xL zd

where , , 0i i iu sz ¢ ³

,02 111

=¢=¶¶ susL 02 22

2

=¢=¶¶ susL

2 Redefine i ias ¢Þ s s

Reformulated Kuhn-Tucker necessary condition:

,0222 12111

=---+-=¶¶ zuuxxL 0222 2212

2

=---+-=¶¶ zuuxxL

1 2 22

2 4 0L x x su¶ ¢= - - + + =¶1 2 1

1

2 4 0,L x x su¶ ¢= - - + + =¶

where , , , 0i i i iu s xz ¢ ³

Applying the Simplex Method - Eliminate variables using relevant equations and introduce new ‘virtual’ linear variables x’.

We eliminate two variables using relevant two equations and also introduce new variable s’ instead of s2.

Page 90: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

90Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Kuhn-Tucker necessary condition:

,0222 12111

=---+-=¶¶ zuuxxL 0222 2212

2

=---+-=¶¶ zuuxxL

042 2212

=¢++--=¶¶ sxxuL,042 121

1

=¢++--=¶¶ sxxuL

0),,,,( =Ñ δζsuxL

where,02 111

==¶¶ xL zd

02 222

==¶¶ xL zd

,02 111

=¢=¶¶ susL 02 22

2

=¢=¶¶ susL

úúúú

û

ù

êêêê

ë

é

--

=

úúúúúúúúúúú

û

ù

êêêêêêêêêêê

ë

é

¢¢

úúúú

û

ù

êêêê

ë

é

----

------

44

22

10000021010000120010212000011202

2

1

2

1

2

1

2

1

ss

uuxx

zz

Æ

úúúú

û

ù

êêêê

ë

é

=

úúúúúúúúúúú

û

ù

êêêêêêêêêêê

ë

é

¢¢

úúúú

û

ù

êêêê

ë

é

--

------

4422

10000021010000120010212000011202

2

1

2

1

2

1

2

1

ss

uuxx

zz

Define the standard LP problem

Multiply both side of the constraints by -1

Solve the linear indeterminate equations by using the Simplex method of Phase 1.

Linear indeterminate equations

, , , 0i i i iu s xz ¢ ³

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (1/9)

Page 91: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

91Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

1 1

2 2

1 3 1

2 4 2

1 5 3

2 6 4

1 7

2 8

( )( )( )2 0 2 1 1 0 0 0 2( )0 2 1 2 0 1 0 0 2( )2 1 0 0 0 0 1 0 4( )1 2 0 0 0 0 0 1 4( )( )

x Xx Xu X Yu X Y

X YX Y

s Xs X

zz

=é ùê ú=ê úê ú=- - - é ùé ù é ùê ú ê úê ú ê ú=- - - ê ú ê úê ú ê ú+ =ê ú ê úê ú ê ú=-ê ú ê úê ú ê ú=- ê úë û ë ûë ûê ú¢ =ê ú

¢ =ê úë û

Introduce the artificial variables to treat the linear equality constraints.

1 2 1 2 1 2 1 2 1 2 3 45 5 3 3 12x x u u s s Y Y Y Yz z ¢ ¢+ - - - - - - + + + + =

Define the artificial objective function as sum of all the artificial variables (Y1+Y2+Y3+Y4).

w

1 2 1 2 1 2 1 25 5 3 3 12x x u u s s wz z ¢ ¢- - + + + + + + = - : Artificial objective function

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (2/9)

Page 92: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

92Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

Y1 2 0 -2 -1 -1 0 0 0 1 0 0 0 2 1

Y2 0 2 -1 -2 0 -1 0 0 0 1 0 0 2 -

Y3 2 1 0 0 0 0 -1 0 0 0 1 0 4 2

Y4 1 2 0 0 0 0 0 -1 0 0 0 1 4 4

A. Obj. -5 -5 3 3 1 1 1 1 0 0 0 0 w-12 -

1

1 1

2 2

1 3 1

2 4 2

1 5 3

2 6 4

1 7

2 8

( )( )( )2 0 2 1 1 0 0 0 2( )0 2 1 2 0 1 0 0 2( )2 1 0 0 0 0 1 0 4( )1 2 0 0 0 0 0 1 4( )( )

x Xx Xu X Yu X Y

X YX Y

s Xs X

zz

=é ùê ú=ê úê ú=- - - é ùé ù é ùê ú ê úê ú ê ú=- - - ê ú ê úê ú ê ú+ =ê ú ê úê ú ê ú=-ê ú ê úê ú ê ú=- ê úë û ë ûë ûê ú¢ =ê ú

¢ =ê úë û

1 2 1 2 1 2 1 25 5 3 3 12x x u u s s wz z ¢ ¢- - + + + + + + = - : Artificial objective function

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (3/9)

Page 93: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

93Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 -1 -1/2 -1/2 0 0 0 1/2 0 0 0 1 -

Y2 0 2 -1 -2 0 -1 0 0 0 1 0 0 2 1

Y3 0 1 2 1 1 0 -1 0 -1 0 1 0 2 2

Y4 0 2 1 1/2 1/2 0 0 -1 -1/2 0 0 1 3 3/2

A. Obj. 0 -5 -2 1/2 -3/2 1 1 1 5/2 0 0 0 w-7 -

2

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 -1 -1/2 -1/2 0 0 0 1/2 0 0 0 1 -

X2 0 1 -1/2 -1 0 -1/2 0 0 0 1/2 0 0 1 -

Y3 0 0 5/2 2 1 1/2 -1 0 -1 -1/2 1 0 1 2/5

Y4 0 0 2 5/2 1/2 1 0 -1 -1/2 -1 0 1 1 1/2

A. Obj. 0 0 -9/2 -9/2 -3/2 -3/2 1 1 5/2 5/2 0 0 w-2 -

3

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 0 3/10 -1/10 1/5 -2/5 0 1/10 -1/5 2/5 0 7/5 14/3

X2 0 1 0 -3/5 1/5 -2/5 -1/5 0 -1/5 2/5 1/5 0 6/5 -

X3 0 0 1 4/5 2/5 1/5 -2/5 0 -2/5 -1/5 2/5 0 2/5 1/2

Y4 0 0 0 9/10 -3/10 3/5 4/5 -1 3/10 -3/5 -4/5 1 1/5 2/9

A. Obj. 0 0 0 -9/10 3/10 -3/5 -4/5 1 7/10 8/5 9/5 0 w-1/5 -

4

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (4/9)

Page 94: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

94Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 0 0 0 0 -2/3 1/3 0 0 2/3 -1/3 4/3 -

X2 0 1 0 0 0 0 7/15 -2/3 2/5 0 -7/15 2/15 4/3 -

X3 0 0 1 0 2/3 -1/3 -10/9 8/9 -2/3 7/15 10/9 -8/45 2/9 -

X4 0 0 0 1 -1/3 2/3 8/9 -10/9 1/3 -2/3 -8/9 2/9 2/9 -

A. Obj. 0 0 0 0 0 0 0 0 1 1 1 1 w-0 -

5

And this solution satisfies the following nonlinear equations(constraints).

One of the initial basic feasible solutions is X1=X2=4/3, X3=X4=2/9, X5=X6=X7=X8=0.

Therefore, the optimal solution of this problem is .4 21 2 1 2 1 2 1 23 9, , 0x x u u s sz z ¢ ¢= = = = = = = =

This result is same as that obtained by the first method.

(1 8) 1 2 1 2 1 2 1 2T x x u u s sz z´

é ù¢ ¢=ë û

XSince the value of the objective function becomes zero, the initial basic feasible solution is obtained.

1 1 0,xz = 2 2 0xz =1 1 0,u s¢ =2 2 0,u s¢ =

4 21 2 1 2 1 2 1 23 9, , 0x x u u s sz z ¢ ¢= = = = = = = =

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (5/9)

Page 95: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

95Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Instead of choosing the first column as the pivot column, we can choose the second column, because the coefficient of the objective function is same.

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

Y1 2 0 -2 -1 -1 0 0 0 1 0 0 0 2 -

Y2 0 2 -1 -2 0 -1 0 0 0 1 0 0 2 1

Y3 2 1 0 0 0 0 -1 0 0 0 1 0 4 4

Y4 1 2 0 0 0 0 0 -1 0 0 0 1 4 2

A. Obj. -5 -5 3 3 1 1 1 1 0 0 0 0 w-12 -

1

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

Y1 2 0 -2 -1 -1 0 0 0 1 0 0 0 2 1

X2 0 1 -1/2 -1 0 -1/2 0 0 0 1/2 0 0 1 -

Y3 2 0 1/2 1 0 1/2 -1 0 0 -1/2 1 0 3 3/2

Y4 1 0 1 2 0 1 0 -1 0 -1 0 1 2 2

A. Obj. -5 0 1/2 -2 1 -3/2 1 1 0 5/2 0 0 w-7 -

2

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 -1 -1/2 -1/2 0 0 0 1/2 0 0 0 1 -

X2 0 1 -1/2 -1 0 -1/2 0 0 0 1/2 0 0 1 -

Y3 0 0 5/2 2 1 1/2 -1 0 -1 -1/2 1 0 1 2/5

Y4 0 0 2 5/2 1/2 1 0 -1 -1/2 -1 0 1 1 1/2

A. Obj. 0 0 -9/2 -9/2 -3/2 -3/2 1 1 5/2 5/2 0 0 w-2 -

3

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (6/9)

Page 96: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

96Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 0 3/10 -1/10 1/5 -2/5 0 1/10 -1/5 2/5 0 7/5 -

X2 0 1 0 -6/10 1/5 -2/5 -1/5 0 -1/5 2/5 1/5 0 6/5 -

X3 0 0 1 4/5 2/5 1/5 -2/5 0 -2/5 -1/5 2/5 0 2/5 -

Y4 0 0 0 9/10 -3/10 3/5 4/5 -1 3/10 -3/5 -4/5 1 1/5 1/4

A. Obj. 0 0 0 -9/10 3/10 -3/5 -4/5 1 7/10 8/5 9/5 0 w-1/5 -

4

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 0 3/4 -1/4 1/2 0 -1/2 -1/4 -1/2 0 1/2 3/2 -

X2 0 1 0 -3/8 1/8 -1/4 0 -1/4 -1/8 1/4 0 1/4 5/4 -

X3 0 0 1 5/4 1/4 1/2 0 -1/2 -1/4 -1/2 0 1/2 1/2 -

X7 0 0 0 9/8 -3/8 3/4 1 -5/4 3/8 -3/4 -1 5/4 1/4 -

A. Obj. 0 0 0 0 0 0 0 0 1 1 1 1 w-0 -

5

Since the value of the objective function becomes zero, the initial basic feasible solution is obtained.

But this solution does not satisfy the constraint of .

The another initial basic feasible solution is X1=3/2, X2=5/4, X3=1/2, X4=X5=X6=0, X7=1/4, X8=0.

Therefore, this solution cannot be the optimal solution.

(1 8) 1 2 1 2 1 2 1 2T x x u u s sz z´

é ù¢ ¢=ë û

X

Æ When the smallest(i.e., the most negative) coefficient of the artificial objective function or the smallest positive ratio“bi/ai” appears more than one entry, the initial basic feasible solution can be changed depending on the selection of the pivot element in the pivot operation.

Æ We have to check whether the solution obtained by the Simplex method satisfies the nonlinear equation.(constraint, ui*si

’=0).

52 1 11 2 1 2 1 2 1 23 4 2 4, , , 0, , 0x x u u s sz z ¢ ¢= = = = = = = =

1 1 0u s¢ =

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (7/9)

Page 97: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

97Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 -1 -1/2 -1/2 0 0 0 1/2 0 0 0 1 -

X2 0 1 -1/2 -1 0 -1/2 0 0 0 1/2 0 0 1 -

Y3 0 0 5/2 2 1 1/2 -1 0 -1 -1/2 1 0 1 1/2

Y4 0 0 2 5/2 1/2 1 0 -1 -1/2 -1 0 1 1 2/5

A. Obj. 0 0 -9/2 -9/2 -3/2 -3/2 1 1 5/2 5/2 0 0 w-2 -

3

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 -3/8 0 -1/4 1/8 -1/4 0 1/4 -1/8 1/4 0 5/4 -

X2 0 1 3/4 0 1/2 -1/4 -1/2 0 -1/2 -1/4 1/2 0 3/2 -

X8 0 0 9/8 0 3/4 -3/8 -5/4 1 3/4 3/8 5/4 -1 1/4 -

X4 0 0 5/4 1 1/2 1/4 -1/2 0 -1/2 -1/4 1/2 0 1/2 -

A. Obj. 0 0 0 0 0 0 0 0 1 1 1 1 w-0 -

5

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 -6/10 0 -2/5 1/5 0 -1/5 2/5 -1/5 0 1/5 6/5 -

X2 0 1 3/10 0 1/5 -1/10 0 -2/5 -1/5 1/10 0 2/5 7/5 -

Y3 0 0 9/10 0 3/5 -3/10 -1 4/5 -3/5 3/10 1 -4/5 1/5 1/4

X4 0 0 4/5 1 1/5 2/5 0 -2/5 -1/5 -2/5 0 2/5 2/5 -

A. Obj. 0 0 -9/10 0 -3/5 3/10 1 -4/5 8/5 7/10 0 9/5 w-1/5 -

4

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (8/9)

In the tableau 3, if we choose the column 4 as the pivot column which has the same coefficient of the artificial objective function as of the column 3, what will happen?

Page 98: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

98Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Since the value of the objective function becomes zero, the initial basic feasible solution is obtained.

X1 X2 X3 X4 X5 X6 X7 X8 Y1 Y2 Y3 Y4 bi bi/ai

X1 1 0 -3/8 0 -1/4 1/8 -1/4 0 1/4 -1/8 1/4 0 5/4 -

X2 0 1 3/4 0 1/2 -1/4 -1/2 0 -1/2 -1/4 1/2 0 3/2 -

X8 0 0 9/8 0 3/4 -3/8 -5/4 1 3/4 3/8 5/4 -1 1/4 -

X4 0 0 5/4 1 1/2 1/4 -1/2 0 -1/2 -1/4 1/2 0 1/2 -

A. Obj. 0 0 0 0 0 0 0 0 1 1 1 1 w-0 -

5

The another initial basic feasible solution is X1=5/4, X2=3/2, X3=0, X4=1/2, X5=X6=0=X7=0, X8=1/4.

Therefore, this solution cannot be the optimal solution.

[ ]21212121)81( ssuuxxT zz=´X

54 1 11 2 1 2 1 2 1 23 4 2 4, , 0, , 0,x x u u s sz z ¢ ¢= = = = = = = =

But this solution does not satisfy the constraint of .2 2 0u s¢ =

Applying the Simplex Method of Phase 1for Solving Linear Indeterminate Equations (9/9)

Page 99: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

99Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Reference] Reason to Decompose the Unrestricted Variable into the Difference of Two Nonnegative Design Variables for Using the Simplex Method (1/2)

To use the Simplex method, the variables must be nonnegative in the LP problem.To use the Simplex method, the variables must be nonnegative in the LP problem.

We can use the Simplex method only for the case that all the variables are nonnegative at the optimal point.We can use the Simplex method only for the case that all the variables are nonnegative at the optimal point.

The variables unrestricted in sign at the optimal point should be decomposed into the difference of two nonnegative variables in the LP problem.The variables unrestricted in sign at the optimal point should be decomposed into the difference of two nonnegative variables in the LP problem.

Minimize

Subject to1 22z y y= - -

2

1

21

21

06321223

yy

yyyy

³³+£+

is unrestricted in sign.

Since y2 is free in sign, it should be decomposed into the difference of two nonnegative variables.

Minimize

Subject to1 2 22 2f y y y+ -= - - +

1 2 2

1 2 2

1 2 2

3 2 2 122 3 3 6

, , 0

y y yy y yy y y

+ -

+ -

+ -

+ - £

+ - ³

³

2 2 2

2 2, 0y y yy y

+ -

+ +

= -

³

For “£” type inequality constraint, weIntroduce the slack variable.

For “³” type inequality constraint, weIntroduce the surplus variable andthe artificial variable.

Minimize

Subject to1 2 22 2f y y y+ -= - - +

1 2 2 1

1 2 2 2 3

1 2 2

3 2 2 122 3 3 6

, , 0, 0; 1 3i

y y y xy y y x x

y y y x i to

+ -

+ -

+ -

+ - + =

+ - - + =

³ ³ =

Solve the problem using the Simplex method.

두 개의 음이 아닌 변수로 분리하는 경우(1/3)

Page 100: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

100Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Reference] Reason to Decompose the Unrestricted Variable into the Difference of Two Nonnegative Design Variables for Using the Simplex Method (2/2)

Minimize 2122

21 22)( xxxxxf -++= : Quadratic objective function

1 2,x xwhere, are free in sign.

022 11

=+=¶¶ xxL

022 22

=-=¶¶ xxL

①’

②’We try to solve this problem by using the Simplex method

22 1 =- x22 2 =x

Since these constraints are the equality constraints, we must introduce artificial variables for the equality constraints and define an artificial objective function, and solve it .

22 11 =+- yx22 22 =+ yx

Since the artificial objective function is the sum of all the artificial variables, its minimum value must be zero.

22112211 ,,, YyYyXxXx ====

422 2121 =+++- yyxx422 2121 -+=- yyxx

w

Basic variable

X1 X2 Y1 Y2 bi bi/ai

Y1 -2 0 1 0 2 -

Y2 0 2 0 1 2 1

A. Obj. 2 -2 0 0 w-4 -

Basic variable

X1 X2 Y1 Y2 bi bi/ai

Y1 -2 0 1 0 2 2

X2 0 1 0 1/2 1 -

A. Obj. 2 0 0 1 w-2 -

- All coefficients of the artificial objective function become nonnegative.

- However, the sum of all the artificial variables(w) does not become zero.

0,2,1,0 2121 ==== yyxx

x11-2 -1

1

2

3

Optimal solution

x2

(-1,1)

Minimize 2122

21 22)( xxxxxf -++=

Definition of the Lagrange function

2122

2121 22),( xxxxxxL -++=

- The simplex method does not give the optimum solution of x1=-1, x2=1, rather x1=0, x2=1.

- The reason is that the simplex method assume that all the variables are nonnegative, whereas the variables x1, x2 of this example are free in sign. From this, we can see that to use the simplex method, the unrestricted variables must be decomposed into the two nonnegative variables.

Eq.③+④

Stop the simplex

Redefine the variables as and express in Matrix from.

두 개의 음이 아닌 변수로 분리하는 이유(1/3)

Page 101: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

101Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Review]

Definition of the Lagrange function)(22),,,( 2

12122

2121 dzdz +-+-++= xxxxxxxL

000 2111 =+-®£-®³ dxxx

MinimizeSubject to

2122

21 22)( xxxxxf -++=

Kuhn-Tucker necessary condition: 0),,,( 21 =Ñ dzxxL

022 11

=-+=¶¶ zxxL

022 22

=-=¶¶ xxL

02 ==¶¶ zddL

021 =+-=

¶¶ dz

xL

If we assume ,

If we assume ,

0=z 11 -=x Æ The equation ③ is not satisfied.

0=d 2,1,0 21 === zxx

x11-2 -1

1

2

3

Optimal solution

x2

(-1,1)

MinimizeSubject to

2122

21 22)( xxxxxf -++=

01 ³x: Quadratic objective function

: Linearized inequality constraint

Page 102: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

102Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solving the Problem by Using the Simplex Method (1/2)

000 2111 =+-®£-®³ dxxx

MinimizeSubject to

2122

21 22)( xxxxxf -++=

x11-2 -1

1

2

3

Optimal solution

x2

(-1,1)

1st stage: Find the solution satisfying the equation ①, ②, and ⑤.

2nd stage: Check whether the solution obtained in the 1st stage satisfies the nonlinear equation ⑤ or not.

We try to solve this problem by using the Simplex method.Multiply the both side of equation ④ byand substitute the equation ③ into that.We eliminate one variable and one equation.

d

d022 11

=-+=¶¶ zxxL

022 22

=-=¶¶ xxL

02 ==¶¶ zddL

021 =+-=

¶¶ dz

xL Since x2 is free in sign, we may decompose it as

2 2 2

2 2, 0x x xx x

+ -

+ -

= -

³

2 2 2x x x+ -= -

022 11

=-+=¶¶ zxxL

0222 222

=--=¶¶ -+ xxxL

02 ==¶¶ zddL

021 =+-=

¶¶ dz

xL

01 =xz ⑤

22 1 -=-zx①

222 22 =- -+ xx②

21 d=x③

02 2 =zd④

Definition of the Lagrange function

)(22),,,( 2121

22

2121 dzdz +-+-++= xxxxxxxL

Kuhn-Tucker necessary condition: 0),,,( 21 =Ñ dzxxL

MinimizeSubject to

2122

21 22)( xxxxxf -++=

01 ³x: Quadratic objective function

: Linearized inequality constraint

Page 103: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

103Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Solving the Problem by Using the Simplex Method (2/2)

MinimizeSubject to

2122

21 22)( xxxxxf -++=

01 ³x: Quadratic objective function

: Linearized inequality constraint

Basic variable X1 X2 X3 X4 Y1 Y2 bi bi/ai

Y1 -2 0 0 1 1 0 2 -

Y2 0 2 -2 0 0 1 2 1

A. Obj. 2 -2 2 -1 0 0 w-4 -

22 1 -=-zx222 22 =- -+ xx

22 1 =+- zx222 22 =- -+ xx

The right hand sides of the equations have to be nonnegative.

22 1 =+- zx222 22 =- -+ xx

Since the constraints are the equality constraints,introduce the artificial variables.

22 11 =++- yx z222 222 =+- -+ yxx

The artificial variables have to be zero.Since the artificial objective function is the sum of all the artificial variables, its minimum value is clearly zero.

4222 21221 =+++-+- -+ yyxxx z

Change the variables as and express these as the Matrix from.

22114322211 ,,,,, YyYyXXxXxXx ====== -+ z

x11-2 -1

1

2

3

Optimal solution

x2

(-1,1)

4222 21221 -+=-+- -+ yyxxx zw

Basic variable X1 X2 X3 X4 Y1 Y2 bi bi/ai

Y1 -2 0 0 1 1 0 2 -

Y2 0 2 -2 0 0 1 2 1

A. Obj. 2 -2 2 -1 0 0 w-4 -

Basic variable

X1 X2 X3 X4 Y1 Y2 bi bi/ai

Y1 -2 0 0 1 1 0 2 2

X2 0 1 -1 0 0 1/2 1 -

A. Obj. 2 0 0 -1 0 1 w-2 -

Basic variable X1 X2 X3 X4 Y1 Y2 bi bi/ai

X4 -2 0 0 1 1 0 2 -

X2 0 1 -1 0 0 1/2 1 -

A. Obj. 0 0 0 0 1 1 w-0 -

0,0,2,0,1,0 214321 ====== YYXXXX0,0,2,0,1,0 21221 ====== -+ yyxxx z

2 2 2 1 0 1x x x+ -= - = - =

0021 =×=xz Since the equation ⑤ is satisfied, this is the solution of this problem.⑤

Page 104: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

104Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

úúú

û

ù

êêê

ë

é-=

úúúúúúúú

û

ù

êêêêêêêê

ë

é

¢úúú

û

ù

êêê

ë

é

--

--

´

´

´

´

´

´

´

´´´´´´

´´´´´´

´´´´´´

)1(

)1(

)1(

)1(

)1(

)1(

)1(

)1(

)1(

)()()()()()(

)()()()()()(

)()()()()()(

p

m

n

p

p

m

m

n

n

ppppmpmpnpT

npT

pmpmmmmmnmT

nmT

pnpnmnmnnnnn

ebc

zysudd

0000NN00I0AANN0AHH

[Reference] Solution of the ProblemHaving the Design Variables whose Sign is Unrestricted (1/2)

Matrix Form

mtoisu ii 1;0 ==¢

Since the equations and are introduced, the number of the design variables is also increased by n+p.

( 1) ( 1) ( 1)p p p´ ´ ´= -v y z ( 1) ( 1) ( 1)n n n+ -

´ ´ ´= -d d d

Number of equationn+2m+p

Number of design variable 2n+2m+2p

The number of the design variables is the same with that of the equations as n+2m+p in the original problem.

The interesting variables vi and di are determined by the equation .)1()1()1( ´´´ -= ppp zyv

526222

=+=++=++

yxzyxzyx

526222

21

21

=+=-++=-++

yxzzyxzzyx

2,0,3,1 21 ==== zzyxSolution

After replacing the variable, this problembecomes the indeterminate equation.The value of z1-z2 is always -2.

Equation

2,3,1 -=== zyx

)0,( 21

21

³-zzzzReplace z as

Example

))222()(( pmnpmn ++´++= B

)1)222(( ´++= pmnX

)1)(( ´++= pmnD

)1)(()1)222(())222()(( ´++´++++´++ = pmnpmnpmnpmn DXB

Page 105: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

105Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Reference] Solution of the ProblemHaving the Design Variables whose Sign is Unrestricted (2/2)

011325

==++=++

xzzyxzyx

011325

21

21

==-++=-++

xzzzyxzzyx

Equation)0,( 21

21

³-

zzzzReplace z as

Example

11325

2

1

=+++=+++

YzyxYzyx

Solve this problem by assuming the three design variables as zero.

11325

221

121

=+-++=+-++

YzzyxYzzyx

Solve this problem by assuming the four design variables as zero.

Stop the Simplex method, if the sum of all the artificial variables(Y1+Y2) zero.

(x, y, z, Y1, Y2)

① (4, 1, 0, 0, 0)

② (6, 0, -1, 0, 0)

③ (0, 3, 2, 0, 0)

z = z1 - z2

(x, y, z1, z2, Y1, Y2)

① (4, 1, 0, 0, 0, 0)

② (6, 0, 0, 1, 0, 0)

③ (6, 0, -1, 0, 0, 0)

④ (0, 0, -, -, 0, 0)

⑤ (0, 3, 0, -2, 0, 0)

⑥ (0, 3, 2, 0, 0, 0)

• Number of the design variables: 5• Number of the linear

independent equation: 2

Stop the Simplex method, if the sum of all the artificial variables(Y1+Y2) zero.

Between the solution① and ③ obtained by using the Simplex method, the final solution has to satisfy the equation .0=xz

Among the solution①, ②, and ⑥ obtained by using the Simplex method, the final solution has to satisfy the equation .0=xz

If the solution whose value of z(=z1-z2) is negative is excluded, the solution of the Case #1is the same with that of the Case #2.

Introduce the artificial variables for using the Simplexmethod

Case #1Introduce the artificial variables for using the Simplex

method

Case #2

• Number of the design variables: 6• Number of the linear

independent equation: 2

Page 106: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

106Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Nav

al A

rch

itec

ture

& O

cean

En

gin

eeri

ng

Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

[Appendix] Another Method for Sequential Quadratic Programming(SQP)

Use of the Descent Condition Method for SQPInstead of the Golden Section Search Method

Page 107: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

107Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

Use of the Descent Condition Method for SQPInstead of the Golden Section Search Method (1/4)

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x21

22

21 3)( xxxxf -+=x

(0,0) 23( ) max{0, , 1, 1} 0V = - - - =x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0d

0.0 t

F

A

B

( , ) ( ) ( )( , )

k j k kk jt= +x x d

( , )k jx k iteration of CSD algorithmj iteration of one dimensional search method

-1

(1, 1)

( ) ( ) ( )(0,0) (0,0) (0,0)0 1 10 0 1f R VF = + × = - + ´ = -x x x

2( ) 2 2, 0.5(1 1 ) 1kkwhere b g= = + =d

( )(0,0)(0, )jtF -x

( )(0, )jtF( ) ( ) ( )(1, ) (0) (0)

(0, ) (0, )j

j jt tF = F + = Fx x d

2( ) , ( 0.5, Defined by user)kkb g g= =d( )(0,0)

(0, )j kt bF -x where,

0 (1,1)=d (0,0) (1,1),=x

Point to be found by the Golden section search method

( ) ( )(0,0)(0, ) (0, )j j kt t bF £ F -x

By reducing the value of t from 1 to a half, find the point to satisfy the following equation.

0.5

Point to be found by the Descent condition method

1.0

( )(0, ) (0, )1j jt tF £ - -

( , ) ( , ) ( , )

2 2 ( , )1 2 1 2

( ) ( ) ( )

3 10 ( )

k j k j k jk

k j

f R V

x x x x V

F = + ×

= + - + ×

x x x

x

(vi) Step 6: By using the one dimensional search method(ex. Descent condition method), calculate the step size to minimize the descent function along the search direction(d(0)) and determine the improved design point.

( , ) ( , ) ( , ) ( , )1 2 3( ) max{0, ( ), ( ), ( )}k j k j k j k jV g g g=x x x x , (k=0)

Page 108: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

108Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x21

22

21 3)( xxxxf -+=x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0d

0.0 t

F

A

B

-1

(1, 1)

( )(0,0)(0, )jtF -x

( )(0, )jtF

By reducing the value of t from 1 to a half, find the point to satisfy the following equation.

1.0

( )(0, ) (0, )1j jt tF £ - -

When (0, ) 1jt =(0, ) (0) (0)

(0, ) (1,1) 1 (1,1) (2,2)jjt d= + × = + × =x x

( ) ( ) ( )(0, )(0, ) 02,2 4 10 0.333 0.667j

jt f R VF = + × = - + ´ = -x(0, ) 1

3, ( ) max{0, , 2, 2} 0.333jwhere V = - - =x

(0, )1 1 1 2jt- - = - - = -

( )(0, ) (0, )1j jt tF £ - -If is not satisfied, t is reduced to 0.5.

0, 0k j= =

(vi) Step 6: By using the one dimensional search method(ex. Descent condition method), calculate the step size to minimize the descent function along the search direction(d(0)) and determine the improved design point.

Use of the Descent Condition Method for SQPInstead of the Golden Section Search Method (2/4)

( , ) ( ) ( )( , )

k j k kk jt= +x x d

( , )k jx k iteration of CSD algorithmj iteration of one dimensional search method

( , ) ( , ) ( , )

2 2 ( , )1 2 1 2

( ) ( ) ( )

3 10 ( )

k j k j k jk

k j

f R V

x x x x V

F = + ×

= + - + ×

x x x

x( , ) ( , ) ( , ) ( , )

1 2 3( ) max{0, ( ), ( ), ( )}k j k j k j k jV g g g=x x x x , (k=0)

Page 109: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

109Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x21

22

21 3)( xxxxf -+=x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

f = -10

f = -3

0d

0.0 t

F

A

B

( , ) ( ) ( )( , )

k j k kk jt= +x x d

( , )k jx k iteration of CSD algorithmj iteration of one dimensional search method

-1

(1, 1)

( )(0,0)(0, )jtF -x

( )(0, )jtF

By reducing the value of t from 1 to a half, find the point to satisfy the following equation.

1.00.5

Point to be found by the Descentcondition method

( )(0, ) (0, )1j jt tF £ - -

Since is satisfied, (1.5, 1.5) is the next design point.

( )(0, ) (0, )1j jt tF £ - -

2.25- = 1.5= -

( ) ( ) ( )(0, )(0, ) 01.5,1.5 2.25 10 0 2.25j

jt f R VF = + × = - + ´ = -x(0, ) 2

8, ( ) max{0, , 1.5, 1.5} 0jwhere V = - - - =x

When (0, ) 0.5jt =(0, ) (0) (0)

(0, ) (1,1) 0.5 (1,1) (1.5,1.5)jjt d= + × = + × =x x

(0, )1 1 0.5 1.5jt- - = - - = -

( , ) ( , ) ( , )

2 2 ( , )1 2 1 2

( ) ( ) ( )

3 10 ( )

k j k j k jk

k j

f R V

x x x x V

F = + ×

= + - + ×

x x x

x

0, 1k j= =

(vi) Step 6: By using the one dimensional search method(ex. Descent Condition method), calculate the step size to minimize the descent function along the search direction(d(0)) and determine the improved design point.

Use of the Descent Condition Method for SQPInstead of the Golden Section Search Method (3/4)

( , ) ( , ) ( , ) ( , )1 2 3( ) max{0, ( ), ( ), ( )}k j k j k j k jV g g g=x x x x , (k=0)

Page 110: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

110Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

BA

0)(0)(

00.161

61)(

23

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x21

22

21 3)( xxxxf -+=x

1 2 3 4

1

2

3

4

x1

x2

g2 = 0

g3 = 0

f = -10

f = -3

0.0 t

F

A

B

-1

( )(0,0)(0, )jtF -x

( )(0, )jtF

1.00.5

Point to be found by the Descentcondition method

The step size obtained by Descent condition is different from the step size obtained by Golden section search method.

Point to be found by the Golden section search method

Since the improved design points obtained by two method are different, the number of iteration of defining the QP problem is changed.

Initial point to be found by the Descent Condition

Initial point to be found by the Golden section search methodIf we use the Golden section search method in the

right example,- The number of iteration of the one dimensional searchin the first iteration of CSD is 62.

- By defining the QP problem two times, we can findthe optimal design point.+ The step size obtained by one dimensional search direction is exact

size.

If we use the Descent condition methodin the right example,- The number of iteration of the one dimensional search in the first iteration of CSD is 1.

- Since the step size obtained by one dimensional search direction is not exact size, the QP problem should be defined in 20 times to find the optimal solution.

Use of the Descent Condition Method for SQPInstead of the Golden Section Search Method (4/4)

Page 111: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

111Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Comparison between the Golden Section Search Method and Descent Condition Method- Example #1 (1/2)

1 2 3 4

1

2

3

4

x1

x2

AB

C

g2 = 0

g3 = 0

g1 = x12 + x2

2 - 6.0 = 0

)3,3(* =x

x(0) = (1, 1)

f = -25f = -20

f = -10f = -3

0)(0)(

00.161

61)(

13

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

x

Minimize

Subject to

2122

21 3)( xxxxf -+=x

Optimal Solution:

3)(),3,3( ** -== xx f

Page 112: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

112Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

0)(0)(

00.161

61)(

13

12

22

211

£-=£-=

£-+=

xgxg

xxg

xx

xMinimize: Subject to:2122

21 3)( xxxxf -+=x

( 3, 3), ( ) 3f= = -x xSolution:

Initial Value MethodIteration of defining the QP problem

Iteration of one dimensional

search method

Local OptimumPoint

OptimumValue

(1, 1)Descent

condition method

r = 0.0 19 19 (1.732, 1.732) -3.0r = 0.1 19 19 (1.732, 1.732) -3.0r = 0.5 19 19 (1.732, 1.732) -3.0r = 0.9 19 19 (1.732, 1.732) -3.0

Golden section search method 1 62 (1.732, 1.732) -3.0

(0.1, 0.1)Descent

condition method

r = 0.0 35 85 (1.732, 1.732) -3.0r = 0.1 36 52 (1.732, 1.732) -3.0r = 0.5 29 44 (1.732, 1.732) -3.0r = 0.9 44 124 (1.732, 1.732) -3.0

Golden section search method 1 38 (1.732, 1.732) -3.0

(1.5, 1.5)Descent

condition method

r = 0.0 18 18 (1.732, 1.732) -3.0r = 0.1 18 18 (1.732, 1.732) -3.0r = 0.5 18 18 (1.732, 1.732) -3.0r = 0.9 18 18 (1.732, 1.732) -3.0

Golden section search method 2 68 (1.732, 1.732) -3.0

Comparison between the Golden Section Search Method and Descent Condition Method- Example #1 (2/2)

Page 113: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

113Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Minimize: 2221

212121 22),( xxxxxxxxf +++-=

Solution: ( )1.0, 1.5 , ( ) 1.25f= - = -x x

Initial Value MethodIteration of defining the QP problem

Iteration of one dimensional

search method

Local OptimumPoint

OptimumValue

(0, 0)Descent

condition method

r = 0.0 39 59 (-1.0, 1.5) -1.25r = 0.1 38 58 (-1.0, 1.5) -1.25r = 0.5 41 67 (-1.0, 1.5) -1.25r = 0.9 60 127 (-1.0, 1.5) -1.25

Golden section search method 17 329 (-1.0, 1.5) -1.25

(1, 1)Descent

condition method

r = 0.0 40 63 (-1.0, 1.5) -1.25r = 0.1 40 63 (-1.0, 1.5) -1.25r = 0.5 40 66 (-1.0, 1.5) -1.25r = 0.9 72 194 (-1.0, 1.5) -1.25

Golden section search method 17 282 (-1.0, 1.5) -1.25

(-1, 2)Descent

condition method

r = 0.0 35 55 (-1.0, 1.5) -1.25r = 0.1 35 55 (-1.0, 1.5) -1.25r = 0.5 37 61 (-1.0, 1.5) -1.25r = 0.9 66 177 (-1.0, 1.5) -1.25

Golden section search method 18 299 (-1.0, 1.5) -1.25

Comparison between the Golden Section Search Method and Descent Condition Method- Example #2

Page 114: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

114Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

2 21 2 1 2( , ) 25 ( 5) ( 5)f x x x xé ù= - - - - -ë û

Subject to

10),(0),(

10),(0),(

0432),(

2215

2214

1213

1212

221211

£=£-=

£=£-=

£++-=

xxxgxxxgxxxgxxxg

xxxxg

Solution815.4),(,808.3,374.4 *

2*

1*

2*

1 -=== xxfxx

Minimize

Comparison between the Golden Section Search Method and Descent Condition Method- Example #3 (1/2)

Page 115: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

115Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Minimize: Subject to:

Solution:

2 21 2 1 2( , ) 25 ( 5) ( 5)f x x x xé ù= - - - - -ë û

10),(0),(

10),(0),(

0432),(

2215

2214

1213

1212

221211

£=£-=

£=£-=

£++-=

xxxgxxxgxxxgxxxg

xxxxg

( ) ( )4.374, 3.808 , 4.815f= = -x x

Initial Value MethodIteration of defining the QP problem

Iteration of one dimensional

search method

Local OptimumPoint

OptimumValue

(0, 0)Descent

condition method

r = 0.0 22 23 (4.374, 3.808) -23.188r = 0.1 22 23 (4.374, 3.808) -23.188r = 0.5 22 23 (4.374, 3.808) -23.188r = 0.9 22 24 (4.374, 3.808) -23.188

Golden section search method 590 13,509 (4.374, 3.808) -23.188

(7, 1)Descent

condition method

r = 0.0 15 22 (4.374, 3.808) -23.188r = 0.1 15 22 (4.374, 3.808) -23.188r = 0.5 15 22 (4.374, 3.808) -23.188r = 0.9 24 45 (4.374, 3.808) -23.188

Golden section search method 1143 26,804 (4.374, 3.808) -23.188

(-3, -10)Descent

condition method

r = 0.0 19 35 (4.374, 3.808) -23.188r = 0.1 19 35 (4.374, 3.808) -23.188r = 0.5 19 35 (4.374, 3.808) -23.188r = 0.9 28 61 (4.374, 3.808) -23.188

Golden section search method 884 20,005 (4.374, 3.808) -23.188

Comparison between the Golden Section Search Method and Descent Condition Method- Example #3 (2/2)

Page 116: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

116Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

-10

-5

0

5

10

-4

-2

0

2

4

0

100

200

300

-10

-5

0

5

10

Æ Optimization problem having two unknown variables and two inequality constraints

10242),( 21122

2121 +--+= xxxxxxxfMinimize

Find )/1(),/( 21 BCxTBx ==

Subject to

03/5),(03),(

2212

1211

£-=£-=

xxxgxxxg

-10 -5 0 5 10

-4

-2

0

2

4

f(x1, x2)

x2

x1

x1

x2

Contour line(f = const.) of objective function

3

5/3

A: True solutionx1

* = 3.0, x2* = 1.5, f(x1

*, x2*) = 2.5

Feasible region

Ag2=5/3

g1=3

Comparison between the Golden Section Search Method and Descent Condition Method- Example #4 (1/2)

Page 117: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

117Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

10242),( 21122

2121 +--+= xxxxxxxf

03/5),(03),(

2212

1211

£-=£-=

xxxgxxxgMinimize: Subject to:

Solution: ( ) ( )3.0, 1.5 , 2.5f= =x x

Initial Value MethodIteration of defining the QP problem

Iteration of one dimensional

search method

Local OptimumPoint

OptimumValue

(0, 0)Descent

condition method

r = 0.0 22 24 (3.0, 1.5) 2.5r = 0.1 22 24 (3.0, 1.5) 2.5r = 0.5 22 26 (3.0, 1.5) 2.5r = 0.9 24 33 (3.0, 1.5) 2.5

Golden section search method 13 203 (3.0, 1.5) 2.5

(2, 1)Descent

condition method

r = 0.0 19 20 (3.0, 1.5) 2.5r = 0.1 19 20 (3.0, 1.5) 2.5r = 0.5 19 20 (3.0, 1.5) 2.5r = 0.9 19 20 (3.0, 1.5) 2.5

Golden section search method 4 89 (3.0, 1.5) 2.5

(-3, -5)Descent

condition method

r = 0.0 26 52 (3.0, 1.5) 2.5r = 0.1 25 28 (3.0, 1.5) 2.5r = 0.5 25 28 (3.0, 1.5) 2.5r = 0.9 25 30 (3.0, 1.5) 2.5

Golden section search method 9 255 (3.0, 1.5) 2.5

Comparison between the Golden Section Search Method and Descent Condition Method- Example #4 (2/2)

Page 118: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

118Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

-2

-1

0

1

2 -2

-1

0

1

2

0

50000

100000

150000

200000

-2

-1

0

1

2

x1

f(x1, x2)

x2

)}273648123218()32(30{

)}361431419()1(1{),(2

22122

112

21

22212

211

22121

xxxxxxxx

xxxxxxxxxxf

+-++-×-+×

++-+-×+++=

02),( ,02),(,02),( ,02),(

22141213

22121211

£-=£-=£--=£--=

xxxgxxxgxxxgxxxg

Subject to

Minimize

Goldstein-Price Function

A : Global Minimum

B : Local Minimum

C : Local Minimum

D : Local Minimum

x1* = 0.0, x2

* = -1.0, f(x1*, x2

*) = 3.0

x1* = -0.6, x2

* = -0.4, f(x1*, x2

*) = 30.0

x1* = 1.2, x2

* = 0.8, f(x1*, x2

*) = 840.0

x1* = 1.8, x2

* = 0.2, f(x1*, x2

*) = 84.0-2 -1 0 1 2-2

-1

0

1

2

x1

x2

A

B

C

D

Comparison between the Golden Section Search Method and Descent Condition Method- Example #5 (1/2)

Page 119: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

119Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Minimize: Subject to:21 2 1 2

2 21 1 2 1 2 2

21 2

2 21 1 2 1 2 2

( , ) {1 ( 1)(19 14 3 14 6 3 )}{30 (2 3 )(18 32 12 48 36 27 )}

f x x x xx x x x x xx xx x x x x x

= + + +

´ - + - + +

´ + -

´ - + + - +

02),( ,02),(,02),( ,02),(

22141213

22121211

£-=£-=£--=£--=

xxxgxxxgxxxgxxxg

Initial Value MethodIteration of defining the QP problem

Iteration of one dimensional

search method

Local OptimumPoint

OptimumValue

(0, 0)Descent

condition method

r = 0.0 30 302 (-0.6, -0.4) 30.0r = 0.1 26 258 (-0.6, -0.4) 30.0r = 0.5 21 208 (-0.6, -0.4) 30.0r = 0.9 62 739 (-0.6, -0.4) 30.0

Golden section search method 15 467 (-0.6, -0.4) 30.0

(2, 3)Descent

condition method

r = 0.0 77 605 (0.0, -1.0) 3.0r = 0.1 31 194 (0.0, -1.0) 3.0r = 0.5 28 172 (0.0, -1.0) 3.0r = 0.9 56 523 (0.0, -1.0) 3.0

Golden section search method 13 417 (0.0, -1.0) 3.0

(-5, -5)Descent

condition method

r = 0.0 70 545 (0.0, -1.0) 3.0r = 0.1 24 135 (0.0, -1.0) 3.0r = 0.5 24 136 (0.0, -1.0) 3.0r = 0.9 51 459 (0.0, -1.0) 3.0

Golden section search method 17 497 (0.0, -1.0) 3.0

In this example, since there are some local minimum design points, the optimal solution to be obtained is changed depending on the initial design point. So, the calculating the optimal solutions by assuming the initial design point in many times and comparing the results are needed.

In this example, since there are some local minimum design points, the optimal solution to be obtained is changed depending on the initial design point. So, the calculating the optimal solutions by assuming the initial design point in many times and comparing the results are needed.

Comparison between the Golden Section Search Method and Descent Condition Method- Example #5 (2/2)

Page 120: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

120Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

012.5),(012.5),(

012.5),(012.5),(

2214

1213

2212

1211

£-=£-=£--=£--=

xxxgxxxg

xxxgxxxg

0.0),(,0.0,0.0 *2

*1

*2

*1 === xxfxx

Subject to

Minimize

Solution

Comparison between the Golden Section Search Method and Descent Condition Method- Example #6 (1/3)

)2cos(10)2cos(1020),( 2221

2121 xxxxxxf ×-+×-+= pp

Rastrigin’s Function

Page 121: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

121Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

-5-2.5

0

2.5

5 -5

-2.5

0

2.5

5

020406080

-5-2.5

0

2.5

5

x2

f

A : Global Optimumx1 = x2 = 0.0, f = 0.0A

x1

-4 -2 0 2 4

-4

-2

0

2

4

x2

A

Global and Local minimum point of the Rastrigins’s FunctionGlobal and Local minimum point of the Rastrigins’s Function

Comparison between the Golden Section Search Method and Descent Condition Method- Example #6 (2/3)

Page 122: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

122Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Initial Value MethodIteration of defining the QP problem

Iteration of one dimensional

search method

Local OptimumPoint

OptimumValue

(0.1, 0.1)Descent

condition method

r = 0.0 18 147 (0.0, 0.0) 0.0r = 0.1 18 147 (0.0, 0.0) 0.0r = 0.5 9 82 (0.0, 0.0) 0.0r = 0.9 39 427 (0.0, 0.0) 0.0

Golden section search method 1 47 (0.0, 0.0) 0.0

(2.1, 2.1)Descent

condition method

r = 0.0 16 134 (1.990, 1.990) 7.960r = 0.1 16 134 (1.990, 1.990) 7.960r = 0.5 7 69 (1.990, 1.990) 7.960r = 0.9 32 358 (1.990, 1.990) 7.960

Golden section search method 1 45 (1.990, 1.990) 7.960

(-2.1, -3)Descent

condition method

r = 0.0 18 144 (-1.990, -2.985) 12.934r = 0.1 18 144 (-1.990, -2.985) 12.934r = 0.5 9 82 (-1.990, -2.985) 12.934r = 0.9 36 395 (-1.990, -2.985) 12.934

Golden section search method 7 229 (-1.990, -2.985) 12.934

Minimize: Subject to:

012.5),(012.5),(

012.5),(012.5),(

2214

1213

2212

1211

£-=£-=£--=£--=

xxxgxxxg

xxxgxxxg

21 2 1

122 2

( , ) 2010cos(2 )

10cos(2 )

f x x xx

x xp

p

= +- ×

+ - ×

In this example, since there are some local minimum design points, the optimal solution to be obtained is changed depending on the initial design point. So, the calculating the optimal solutions by assuming the initial design point in many times and comparing the results are needed.

In this example, since there are some local minimum design points, the optimal solution to be obtained is changed depending on the initial design point. So, the calculating the optimal solutions by assuming the initial design point in many times and comparing the results are needed.

Comparison between the Golden Section Search Method and Descent Condition Method- Example #6 (3/3)

Page 123: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

123Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Comparison between the Golden Section Search Method and Descent Condition

þ Comparison between the Golden Section Search Method and Descent Condition Methodn When we use the one dimensional search method, we have to calculate

the value of the objective function and constraints repetitively.n If it takes much time to calculate the value of the objective function and

constraints, the Descent condition method is more useful.

Step of calculation Descent Conditionmethod

Golden SectionSearch method

Iteration number of defining the QP problem Many Little

Iteration number of one dimensional search method Little Many

Page 124: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

124Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

Naval Architecture & Ocean Engineering

Reference Slides

Page 125: ocw.snu.ac.kr · 1 Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh g Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization

125Computer Aided Ship Design, I-7 Constrained Nonlinear Optimization Method, Fall 2013, Myung-Il Roh

÷÷ø

öççè

æ-

¶¶

+--¶¶

¶+-

¶¶

+

¶+-

¶¶

+=

2*222

2

*2

*1

2*22

*11

21

*2

*1

22*

1121

*2

*1

2

*22

2

*2

*1*

111

*2

*1*

2*121

)(),())((),(2)(),(21

)(),()(),(),(),(

xxxxxfxxxx

xxxxfxx

xxxf

xxxxxfxx

xxxfxxfxxf

( ) ( ) dxHddcxxxxHxxxxxxx )(21)( )(

21)()()()( ******** TTTT ffff ++=--+-Ñ+=Æ

The second-order Taylor series expansion of at ),( 21 xxf ),( *2

*1 xx

)(),( ** xxdxc -=Ñ= fdefine:

[Reference] Taylor Series Expansion for the Function ofTwo Variables