6. Optimizacion No Lineal
-
Upload
ponchoc2008 -
Category
Documents
-
view
223 -
download
0
Transcript of 6. Optimizacion No Lineal
-
7/28/2019 6. Optimizacion No Lineal
1/15
227
6. OPTIMIZACIN NO LINEAL
Gradiente
El gradiente de una funcin escalar de n variables, denotado por f es elvector n-dimensional:
El gradiente de una funcin en un punto indica la direccin, a partir de ese
punto, en la que dicha funcin crece ms rpidamente y, adems, la direccin
ortogonal a las curvas de nivel de f (curvas en las que la funcin tiene un valor
constante).El Hessiano de una funcin escalar de n variables
6.1 OPTIMIZACION NO RESTRINGIDA UNIDIMENSIONAL
Como en la localizacin de races, los problemas de optimizacin
unidimensional se pueden dividir en:
6.2 METODOS CERRADOS Y ABIERTOS
Un ejemplo de mtodo cerrado es de la bsqueda de la seccin dorada
o aurea.
Un ejemplo de mtodo abierto es el mtodo de Newton
-
7/28/2019 6. Optimizacion No Lineal
2/15
228
NECESSARY AND SUFFICIENT CONDITIONS FOR AN EXTREMUM OF ANUNCONSTRAINED FUNCTION.
An optimal point x* is completely specified by satisfying what are called the
necessary and suficient conditions for optimality. Necessary condition for aminimum or maximum off (x) is that the gradient of f(x) vanishes at x*.
In summary, the necessary conditions (items 1 and 2 in the following list)
and the sufficient condition (3) to guarantee that x* is an extremum are as
follows:
1. f(x) is twice differentiable at x*.
2. f(x*) =0, that is, a stationary point exists at x*.
3. H(x*) is positive-definite for a minimum to exist at x*, and negative-definite
for a maximum to exist at x*.
Veremos algunos mtodos utilizados para una sola variable.
6.2.1 INTERPOLACIN CUADRTICA
La interpolacin cuadrtica aprovecha la ventaja de que un polinomio de
segundo grado con frecuencia proporciona una buena aproximacin a la forma
de f(x) en las cercanas de un valor ptimo.
As como existe slo una lnea recta que pasa por dos puntos, hay nicamente
una ecuacin cuadrtica o parbola que pasa por tres puntos. De esta forma, si
se tiene tres puntos que contienen un punto ptimo, se ajusta una parbola a
los puntos. Despus se puede derivar e igualar el resultado a cero, y as
obtener una estimacin de la x ptima.
-
7/28/2019 6. Optimizacion No Lineal
3/15
229
Sea que se tengan 3 puntos, para realizar el ajuste a polinomio de de segundo
orden
si derivamos e igualamos a cero para encontrar el opimo, al despejar a
por lo tano con tres datos.
Aplicando el mtodo de Cramer para
encontrar a b y c.
Ejemplo 6.1 In this example we minimize a nonquadratic function
. Podemos elegir, 0.5, 1 y 1.5 como puntos iniciales.
x
1
1
1
fx1
fx2
fx3
x12
x22
x32
1
1
1
x1
x2
x3
x12
x22
x32
2
1
11
x1
x2x3
fx1
fx2fx3
1
1
1
x1
x2
x3
x12
x22
x32
1
1
1
fx1
fx2
fx3
x12
x22
x32
2
1
11
x1
x2x3
fx1
fx2fx3
2 1 0 1 20
2.5
5
7.5
10
f x( )
x
-
7/28/2019 6. Optimizacion No Lineal
4/15
230
Se deja al lector hacerlo paso a paso.
6.2.2 METODO DE NEWTON
f x( ) x( )4
x( ) 1
X
0.5
1
1.5
x1
2
X2
2X
3 2
f X1 X3
2X
1 2
f X2 X1
2X
2 2
f X3
X2
X3 f X1 X3 X1 f X2 X1 X2 f X3
d x X2
X
X2
x
X3
x X2
if
X
X1
x
X2
x X2
if
x1
2
X2 2
X3 2
f X1 X3
2
X1 2
f X2 X1
2
X2 2
f X3
X2
X3
f X1 X3 X1 f X2 X1 X2 f X3
d x X2
d 0.000001while
x
f x( )
0.63
0.5275
-
7/28/2019 6. Optimizacion No Lineal
5/15
231
Ejemplo 6.2.- Realice el ejemplo 6.1 con el mtodo de Newton
For a starting point of x = 3
Additional iterations yield the following values for x:
As you can see from the third and fourth columns in the table the rate of
convergence of Newton's method is superlinear (and in fact quadratic) for this
function. Se te pide a t programes el mtodo.
6.3 PROBLEMAS MULTIDIMENSIONALES SIN RESTRICCIONES.
Recuerde que nuestra imagen visual de una bsqueda unidimensional fue
como una montaa rusa. Para el caso en dos dimensiones, la imagen es ahora
como la de montaas y valles (vase la figura). Para problemas de grandes
dimensiones, no son posibles imgenes adecuadas.
-
7/28/2019 6. Optimizacion No Lineal
6/15
232
Para estos casos:
Los puntos crticos cumplen las ecuaciones anteriores.
Las tcnicas para la optimizacin multidimensional sin restricciones se pueden
clasificar de varias formas. Para propsitos del presente anlisis, se dividirn
dependiendo de si se requiere la evaluacin de la derivada. Los procedimientos
que no requieren dicha evaluacin se llaman mtodos directos. Aquellos que
requieren la derivada son llamados mtodos gradientes o mtodos de
descenso (o ascenso). Cuando el mtodo hace uso de la segunda derivada se
conoce como mtodo de segundo orden.
La bsqueda de la direccin s es:
-
7/28/2019 6. Optimizacion No Lineal
7/15
233
Ejemplo 6.3.- We minimize the function
6.4 OPTIMIZACIN CON RESTRICCIONES.
This treats more difficult problems involving minimization (or maximization) of a
nonlinear objective function subject to linear or nonlinear constraints:
Approaches for solving nonlinear programming problems with constraints:
f x1 x2( ) 4x12
x22
2x1 x2
x1 x2
f x1 x2( )8 x1 2 x2
2 x2 2 x1
2x1
f x1 x2( )d
d
2
x2 x1f x1 x2( )d
d
d
d
x1 x2f x1 x2( )d
d
d
d
2x2
f x1 x2( )d
d
2
8
2
2
2
H
8
2
2
2
H1
1
6
1
6
1
6
2
3
f
x1
x2
1
1
x1
x2
1
6
1
6
1
6
2
3
8 x1 2 x2
2 x2 2 x1
0
0
x1
x2
0
0
x1
x2
1
6
1
6
1
6
2
3
8 x1 2 x2
2 x2 2 x1
0
0
-
7/28/2019 6. Optimizacion No Lineal
8/15
234
DIRECT SUBSTITUTION
One method of handling just one or two linear or nonlinear equality constraints
is to solve explicitly for one variable and eliminate that variable from the
problem formulation. This is done by direct substitution in the objective function
and constraint equations in the problem.
Ejemplo 6.4
Either x1 or x2 can be eliminated without difficulty. Solving for x1,
we can substitute for x1, the new equivalent objective function in terms of a
single variable x2 is
We can now minimize the objective function.
The geometric interpretation for the preceding problem requires visualizing theobjective function as the surface of a paraboloid in three-dimensional space.
The projection of the intersection of the paraboloid and the plane representing
the constraint onto the f(x2) = x2 plane is a parabola. We then find the minimum
of the resulting parabola. The elimination procedure described earlier is
tantamount to projecting the intersection locus onto the x2 axis. The
intersection locus could also be projected onto the x, axis (by elimination of x,).
Would you obtain the same result for x* as before?
-
7/28/2019 6. Optimizacion No Lineal
9/15
235
FIRST-ORDER NECESSARY CONDITIONS FOR A LOCAL EXTREMUM
where * is called the Lagrange multiplier for the constraint hWe now introduce a new function L(x,) called the Lagrangian function:
so the gradient of the Lagrangian function with respect to x, evaluated at (x*,*), is zero
constitute the first-order necessary conditions for optimality.
Ejemplo 6.5
Resolucion con condiciones necesarias
f x y ( ) x y x2
y2
1 x 1 y 1 1
Dado
condicionesnecesariasx
f x y ( )d
d0=
yf x y ( )
d
d0=
f x y ( )d
d0=
v ec Fi nd x y ( )
Resolucin: vec
0.707
0.707
0.707
f vec
0vec
1 vec
2 1.414
vec0
2vec
1 2
1 0
-
7/28/2019 6. Optimizacion No Lineal
10/15
236
PROBLEMS CONTAINING ONLY EQUALITY CONSTRAINTS
rapida solucin
f x y( ) x yx 1 y 1Dado
x2
y2
1 0=
P M inimize f x y( ) PT 0.707 0.707( ) f P0 P1 1.414
-
7/28/2019 6. Optimizacion No Lineal
11/15
237
PROBLEMS CONTAINING ONLY INEQUALITY CONSTRAINTS
The first-order necessary conditions for problems with inequality constraints are
called the Kuhn-Tucker conditions (also called Karush-Kuhn-Tucker
conditions).
PROBLEMS CONTAINING BOTH EQUALITY AND INEQUALITYCONSTRAINTS
-
7/28/2019 6. Optimizacion No Lineal
12/15
238
Then, if x* is a local minimum of the problem, there exist vectors of Lagrange
multipliers * and u*, such that x* is a stationary point of the function L(x, *,u*), that is,
and complementary slackness hold for the inequalities:
Ejemplo 6.6
Solutions of Example by the Lagrange multiplier method
f x y u( ) x y u x2
y2
25
x 3 y 3 u 0
Dado
xf x y u( )
d
d0=
yf x y u( )
d
d0=
uf x y u( )d
d0=
Find x y u( )
3.536
3.536
0.5
-
7/28/2019 6. Optimizacion No Lineal
13/15
239
The contours of the objective function (hyperbolas) are represented by broken
lines, and the feasible region is bounded by the shaded area enclosed by the
circle g(x) = 25. Points B and C correspond to the two minima, D and E to the
two maxima, and A to the saddle point of f(x).
-
7/28/2019 6. Optimizacion No Lineal
14/15
240
6.5 ACTIVIDADES
1.
2.
3.
4.
5. Using first-order necessary conditions
6.
-
7/28/2019 6. Optimizacion No Lineal
15/15
241
7.
8.
9.
10.
6.6 BIBLIOGRAFA
Luque, R. S., Simulacin y optimizacin avanzada en la industra
qumica y de procesos: HYSYS. Espaa, Impreso en universidad deOviedo, 2005.
Himmelblau D.M.; Optimization of Chemical Processes. Ed. Mc Graw Hill
C. Chapra S. Metodos numricos para ingenieros. Ed. Mc Graw Hill.Quinta edicin.