introducción a la optimización de procesos químicos. curso 2005/2006 basic concepts in...

45
Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts for the optimization of systems with continuous variables and non-linear equations. Since we will limit the topic to unconstrained problems, we will concentrate on the OBJECTIVE FUNCTION . Optimality Conditions for Single Variable Optimality Conditions for Multivariable Variable Revisit Convexity and Its Importance

Upload: agnes-sabina-lindsey

Post on 15-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained

Important concepts for the optimization of systems with continuous variables and non-linear equations. Since we will limit the topic to unconstrained problems, we will concentrate on the OBJECTIVE FUNCTION.

• Optimality Conditions for Single Variable

• Optimality Conditions for Multivariable Variable

• Revisit Convexity and Its Importance

Page 2: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained

Wait a minute. No problem is unconstrained; so, why do we need to know this?

• Unconstrained problems - sometimes the solution doesn’t involve constraints

• Used in methods for constrained problems

Page 3: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

BUILDING EXPERIENCE IN OPTIMIZATION

CLASS EXERCISE: The reactor is isothermal and the reaction kinetics are first order. Is this system linear or non-linear?

• What must we define before defining an optimum?

- The goal is to maximize CB in the effluent at S-S

- You can adjust only the flow rate of feed

This is an isothermal CFSTR with the reaction:

A B C

You can only adjust F

Page 4: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM?

Optimum

For LP, the optimum is at a corner point.

For NLP the optimum is located …….?

Page 5: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Single variable?

The general definition of a minimum of f(x) is

x* is a minimum if f(x*) f(x* + x) for small x

We will start with a single-variable system and then generalize to multiple variable. We will not yet include constraints.

We want to apply this concept, but we need to determine specific criteria that test for conformance to the statement in the box above.

Page 6: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Single variable?

Necessary Condition for a single-variable system: [df(x)/dx]x* = 0

Let’s look at the definition of a derivative, which is continuous

0

( ) ( ) ( )lim

x

df x f x x f x

dx xd

dd®

+ -=

If this exists and f(x*) (f(x*+x), then

0 for x 0

0 for x 0

Therefore: ( ) / 0

df(x)/dx

df(x)/dx

df x dx

d

d

³ >

£ <

=

Why isn’t this sufficient for a minimum?

Page 7: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Single variable?

Necessary Condition for a single-variable system: [df(x)/dx]x* = 0

(a) (b) (c)

(d) (e)Where is the derivative zero?

Page 8: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Single variable?

Sufficient condition: A function with f’(x*)=0 has

f’’(x*) = …= fn-1(x*) = 0 (the next n-1 derivatives = zero)

has for n = even fn(x*) > 0 (the nth derivative at x* > 0 )

Approximate the function with a Taylor Series.

n

( * ) ( *) '( *) ( x) ......

( x) ( * )

!n

f x x f x f x

f x h xn

d d

dd

+ = + +

+ +

0

Remainder ( 0 h 1)

0

Page 9: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Single variable?

Sufficient condition: A function with f’(x*)=0 has

f’’(x*) = …= fn-1(x*) = 0 (2nd to n-1 derivatives = zero)

has for n = even fn(x*) > 0 (the nth derivative at x* > 0 )

Rearrange the result.

n( x)( * ) ( *) ( * )

!nf x x f x f x h x

n

dd d+ - = +

For n = even, (x)n > 0; when nth derivative is positive, the condition for a minimum is satisfied!

Page 10: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Single variable?

Necessary & Sufficient Conditions:

[df(x)/dx]x* = 0 ; d2f(x*)/dx2 > 0

(a) (b) (c)

(d) (e)Which satisfy the necessary & sufficient?

Page 11: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Single variable?

Let’s look at the following examples.

f1 = 3 + 2x + 5x2

df1/dx = 2 + 10x = 0 : x = -.20

d2f1/dx2 = 10 > 0 at x = -.20

Therefore, the function has a local minimum at x = x* = -.20

f1 = 3 + 2x - 5x2

df1/dx = 2 - 10x = 0 : x = .20

d2f1/dx2 = -10 < 0 at x = .20

Therefore, the function has a local maximum at x = x* = .20

Page 12: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Single variable?

• Are these results consistent with the methods you have learned previously?

• What do we conclude if n = odd?

• What type of extremum occurs for f(x) = x4?

Necessary & Sufficient Conditions:

[df(x)/dx]x* = 0 ; d2f(x*)/dx2 > 0

Page 13: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Single variable?

• Are these results consistent with the methods you have learned previously?

Hopefully, these are the rules that you learned in first-year calculus!

• What do we conclude if n = odd?

The sign of the remainder depends on the sign of x. This is not a local minimum. It is termed a saddle point.

Necessary & Sufficient Conditions:

[df(x)/dx]x* = 0 ; d2f(x*)/dx2 > 0

n( x)( * ) ( *) ( * )

!nf x x f x f x h x

n

dd d+ - = +

Page 14: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Single variable?

• What type of extremum occurs for f(x) = x4?

Necessary & Sufficient Conditions:

[df(x)/dx]x* = 0 ; d2f(x*)/dx2 > 0

2 2 3 3

4 4

/ / / 0

/ 4*3*2*1 24 0

df dx d f dx d f dx

d f dx

= = =

= = >

Therefore, the extreme point is a minimum!

Page 15: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM: Multivariable?

Necessary: Let’s extend these results to multivariable systems, with x a vector of dimension n.

Necessary condition: 1 2

( *) ( *) ( *).... 0

n

f x f x f x

x x x

¶ ¶ ¶= = = =

¶ ¶ ¶

We call these equations the “stationarity conditions”.

The proof is similar to the single-variable case.

Page 16: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

The necessary condition for unconstrained optimization of a multivariable system is often stated as the following.

1 0

.. 0( )

.. ..

0

x

n

f

x

f x

f

x

¶é ùê ú¶ é ùê ú ê úê ú ê úÑ = =ê ú ê úê ú ê úê ú¶ ë ûê ú¶ë û

The gradient equaling zero is the stationarity condition.

Page 17: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

Sufficient: Let’s extend these results to multivariable systems, with x a vector of dimension n. We will restrict sufficient conditions to second derivatives.

The first and second differential is defined as

22

1 1

( *)( *)

n n

i ji j i j

f xd f x x x

x xd d

= =

¶=

¶ ¶åå

( )( )

n

ii i

f xdf x x

xd

¶=

¶å

Page 18: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

2

1 1

1 ( * )( ) ( *) ( *)

2

n n

i ji j i j

f x h xf x x f x df x x x

x x

dd d d

= =

¶ ++ = + +

¶ ¶å å

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

These terms can be used in the expression for a Taylor series to determine the sufficient condition.

0

Remainder ( 0 h 1)

The condition for a minimum is satisfied when the remainder is positive.

Page 19: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

1 1

2

1 1

... ...( * )

... ...

T

n n

i ji j i j

n n

x x

f x h xx x H

x x

x x

d d

dd d

d d= =

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

å å

H = the Hessian of second derivatives

2 2 2

21 1 2 1

2

22 1

2 2

21

..

.. .. ..

.. .. .. ..

n

x

n n

f f f

x x x x x

f

f H x x

f f

x x x

é ù¶ ¶ ¶ê ú¶ ¶ ¶ ¶ ¶ê úê ú¶ê ú

Ñ = = ¶ ¶ê úê úê ú¶ ¶ê ú

ê ú¶ ¶ ¶ë û

It is symmetric.

Page 20: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

1 1

... ...( * ) ( *) 1/ 2

... ...

T

n n

x x

f x x f x H

x x

d d

d

d d

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

For a minimum, the right hand side is positive for any non-zero values of the vector x. How can we tell? We need to evaluate an infinite number of values of x!

Let’s try a little mathematics to

improve the situation

Page 21: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

We will consider a two-dimensional system. We start by defining a new vector of variables, w.

x1

x2

w2

w1

1 11 1 12 2

2 21 1 22 2

w b x b x

w b x b x

= +

= +

Can we define the b’s to make the test for optimality easier?

Page 22: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

The optimality test would be easy if the hessian were diagonal.

12

2

0( )

0w f wl

lé ù

Ñ =ê úë û

2 ( ) 0Tww f w wd dÑ >Then,

If, 1 20 and 0l l> >

How can we determine the b’s

to give thisnice, diagonal

hessian matrix?

Page 23: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

21 2

2

( ) 0 gives values for ,

( ) gives each vector of b matrix

w

w i i

f w I

f w I b

l l l

l

Ñ - = Þ

Ñ - = Þ

The answer is determined from the eigenvalues and eigenvectors of the hessian matrix!!!

When we prove that the function f(w) has a minimum at w*

from 1 > 0 and 2 > 0

we also prove that the function f(x) has a minimum at x*!

Page 24: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

A schematic of what we did. The coordinates are rotated to express the quadratic as the sum of variables squared times eigenvalues.

2 2 2 21 1 2 2 3 3 ......T

ww f w w w wd d l l lÑ = + + +

Clearly, the remainder term must only increase if all i are positive.

w1

w2

Page 25: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

Positive Definite: A matrix is positive definite if all values of its eigenvalues () are positive. Eigenvalues are the solution to the following equation, with H evaluated at x*.

| H - I | = 0

2 2 2

21 1 2 1

2

2 1

2 2

21

..

.. .. ..

.. .. .. ..

n

n n

f f f

x x x x x

f

H x x

f f

x x x

é ù¶ ¶ ¶ê ú¶ ¶ ¶ ¶ ¶ê úê ú¶ê ú

= ¶ ¶ê úê úê ú¶ ¶ê ú

ê ú¶ ¶ ¶ë û

What is the form of this equation? How many solutions are there?

Page 26: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

The following two conditions are necessary & sufficient at x*

The gradient is zeroThe Hessian is positive definite

• Some good news - We do not typically perform these calculations to test problems

• But, these concepts are used in many solution methods for non-linear optimization.

Page 27: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

This is a “nice” objective function, which is convex and symmetric. Local derivative information will direct us toward the minimum.

All eigenvalues are positive.

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

-2

-1

0

1

2-3

-2

-1

0

1

2

3

4

5

X1

F(X1,X2) = X12 + X22

X2

F(X

1, X

2)

Page 28: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

This is an objective function with a ridge. We will find the valley quickly; then, we will search the ridge with little success.

One eigenvalue

is near zero.

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

-2

-1

0

1

2-10

-5

0

5

10

15

20

X1

F(X1, X2) = 5*X12

X2

F(X

1, X

2)

Page 29: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

This objective function has a saddle point, which has a minimum in one direction and maximum in another direction. Derivative information will not direct us well.

-3-2

-10

12

3

-5

0

5-30

-25

-20

-15

-10

-5

0

5

X1

F(X1, X2) = 1.5*X12 - X22

X2

F(X

1, X

2)

One eigenvalue is positive, and another is negative.

Page 30: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

-4 -3 -2 -1 0 1 2 3 4-4

-3

-2

-1

0

1

2

3

4

-4-2

02

4

-4

-2

0

2

4

-100

-50

0

50

100

150

X1

F(X1, X2) = 1.5*X12 - X22

X2

F(X

1, X

2)

WHAT DEFINES THE LOCATION OF AN OPTIMUM : Multivariable?

What’s going on here?

What is the hessian for these stationary points

1 2 3

4

Page 31: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

Convexity and the objective function. A function of x (a vector) is convex if the following is true.

1 2 1 2[ (1 ) ] ( ) (1 ) ( )f x x f x f xg g g g+ - £ + -

For points x1 and x2 and 0 1.

f(x)

x

Is this function convex (over the region in the figure)?

CONVEXITY: AN IMPORTANT PROPERTY IN OPTIMIZATION

Page 32: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

Convexity and the objective function. A function of x (a vector) is convex over a region if the following is true over the region.

Gradient Test:

2 1 1 2 1( ) ( ) [ ( )] ( )Tf x f x f x x x³ +Ñ -

Hessian Test: The function is convex if its Hessian matrix is positive definite

22 1 1 1( ) ( ) [ ( )] ( ) 1/ 2[ ] ( )[ ]T Tf x f x f x x x f x h x x= +Ñ D + D Ñ + D D

positive

CONVEXITY: AN IMPORTANT PROPERTY IN OPTIMIZATION

Page 33: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

Any local minimum of a convex function (over an unconstrained region) is a global minimum!

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

-2

-1

0

1

2-3

-2

-1

0

1

2

3

4

5

X1

F(X1,X2) = X12 + X22

X2

F(X

1, X

2)

CONVEXITY: AN IMPORTANT PROPERTY IN OPTIMIZATION

Page 34: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained

Conclusions on OBJECTIVE FUNCTION properties

• Opt. Conditions for Single Variable

• Opt. Conditions for Multivariable Variable

• Convexity and Its Importance When is local = global optimum?

Basis of many optimization algorithms and tests for convergence

We seek to formulate our models to yield a convex programming problem

Page 35: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #1

• What is difference between suff. condition for optimality and convexity?

• Why is convexity important?

We covered the conditions for optimality and convexity in this section. They seemed similar.

Page 36: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #2

Since convexity is important, let’s evaluate convexity for a very important function.

Is the following function convex or concave?

0 1 1 2 2 3 3( ) .....f x c c x c x c x= + + + +

with ci constants

Page 37: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #3

Any local minimum of a convex function (over an unconstrained region) is a global minimum!

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

-2

-1

0

1

2-3

-2

-1

0

1

2

3

4

5

X1

F(X1,X2) = X12 + X22

X2

F(X

1, X

2)

The statement below is very important. Prove the statement.

Hint: Consider directions of improvement for convex and non-convex functions.

Page 38: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #4

All convex functions have a unique minimum, i.e., they are unimodal.

Determine whether all unimodal functions are convex

x

f(x)

Page 39: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #5

We seek a global, rather than a local, optimum.

• Define a global optimum in words

• Determine a mathematical test for the global optimum.

• Discuss how you would find a global optimum.

-4-2

02

4

-4

-2

0

2

4

-100

-50

0

50

100

150

X1

F(X1, X2) = 1.5*X12 - X22

X2

F(X

1, X

2)

Page 40: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #6

The objective function is often the sum of several functions, for example, costs, revenues, taxes, and so forth. Determine if the following are a convex functions, when each term [gi(x)] is convex individually.

i( ) ( ) with 0 for all ii ii

f x g xb b= >å

[ ]1( ) max ( ),..., ( ),.. for all iif x g x g x=

Page 41: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #7

A function is convex if its Hessian matrix is positive definite over the range of the variable x

22 1 1 1( ) ( ) [ ( )] ( ) 1/ 2[ ] ( )[ ]T Tf x f x f x x x f x h x x= +Ñ D + D Ñ + D D

Positive definite

One way to determine if a matrix (the hessian) is positive definite is to evaluate the determinants of its principle minors. If they are positive, the matrix is positive definite.

The principle minors are the sub-matrices formed by eliminating n-k columns and rows, with k = 0 to n-1.

Apply this approach to the following functions.

Page 42: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #7

A function is convex if its Hessian matrix is positive definite over the range of the variable x

22 1 1 1( ) ( ) [ ( )] ( ) 1/ 2[ ] ( )[ ]T Tf x f x f x x x f x h x x= +Ñ D + D Ñ + D D

Positive definite

2 21 1 2 2

21 1 2 2

4 41 1 2 2

( ) 2 3 2

( ) 2 4

( ) ( 1) ( 1)

f x x x x x

f x x x x x

f x x x x x

= - +

= + + +

= + + + +

ix from to - ¥ +¥

ix from 0 to +¥

Page 43: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #7

SOLUTION

[ ]

21 1 2 2

2

( ) 2 4

4 3( )

3 4

det 4 0

4 3det 0

3 4

f x x x x x

f x

= + + +

-é ùÑ =ê ú-ë û

>

-é ù>ê ú-ë û

Therefore, the function is convex

Page 44: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #7

SOLUTION

[ ]

21 1 2 2

2

( ) 2 4

2 1( )

1 0

det 2 0

2 1det 1 0

1 0

f x x x x x

f x

= + + +

é ùÑ =ê ú

ë û

>

é ù=- <ê ú

ë û

Therefore, the function is not convex

Page 45: Introducción a la Optimización de procesos químicos. Curso 2005/2006 BASIC CONCEPTS IN OPTIMIZATION: PART II: Continuous & Unconstrained Important concepts

Introducción a la Optimización de procesos químicos. Curso 2005/2006

OPTIMIZATION BASICS II - WORKSHOP #7

4 41 1 2 2

22 1

22

21 1

21

1 222

( ) ( 1) ( 1)

12( 1) 1( )

1 12( 1)

det 12( 1) 0 for all x 0

12( 1) 1det 0 for all x ,x 0

1 12( 1)

f x x x x x

xf x

x

x

x

x

= + + + +

é ù+Ñ =ê ú+ë û

é ù+ >ë û

é ù+ê ú+ë û

SOLUTION

Therefore, the function is convex