Documente Academic
Documente Profesional
Documente Cultură
Introduccin
1. Convexidad y concavidad
2. Sistemas multivariables
min f ( x1 , x2 ,..., xn )
sujeta a
h j ( x1 , x 2 ,..., x n ) = 0
g k ( x1 , x2 ,..., xn ) = 0
j = 1,2,..., m
k = 1,2,..., p
f ( x1 , x 2 ,..., x n ) = 0
*
&
f
[f ]i =
xi
&
2 f
[ H ]ij =
xi x j
j =1
k =1
L( xi , u j , v k ) = f ( xi ) + h j ( xi )u j + g k ( xi )v k
Las condiciones necesarias y suficientes estn dadas por
*
L( xi , u j , v k ) = f ( xi ) + h( xi )u + g ( xi )v = 0
ui 0
g k ( x1 , x 2 ,..., x n ) 0
*
h j ( x1 , x2 ,..., xn ) = 0
*
u k g k ( x1 , x 2 ,..., x n ) = 0
complementarias
k = 1,2,..., p
j = 1,2,..., m de factibilidad
k = 1,2,..., p
Z T H ( x1 , x 2 ,..., x n ) Z > 0
J ( x1 , x 2 ,..., x n ) Z = 0
&
I.
min f ( x)
sujeta a
x1 x x 2
Estructura en Matlab
[x,fval,exitflag,output]= fminbnd ( fun,x1,x2,options )
Ejemplo [ fminvar.m ]
3 9 2
f(x)
=
x
- x +6 x+20
min
Calcular
2
con 0 x 2
min f ( x1 , x 2 ,..., x n )
Estructura en Matlab
[x,fval,exitflag,output,grad,hessian] =
fminunc( fun,x0,options )
min f ( x1 , x 2 ,..., x n )
sujeta a
Ax b
Aeq x = beq restricciones lineales
Cx 0
C eq x = 0 restricciones no lineales
y con
xlb x xub
Estructura en Matlab
[x,fval,exitflag,output,lambda,grad] =
fmincon( f,x0,A,b,Aeq,beq,xlb,xub,nonlcon,options )
1
T
min ( x1 , x 2 ,..., x n ) T [ M ]( x1 , x 2 ,..., x n ) + d ( x1 , x 2 ,..., x n )
2
sujeta a
Ax b
Aeq x = b eq
xlb x xub
Estructura en Matlab
[x,fval,exitflag,output,lambda] =
quadprog( M,d,A,b,Aeq,beq,xlb,xub,x0,options )
Ejemplo 1 [qpehlp8_26.m]
0
d = 0
0
2 2 1
Aeq = 10 8 14
4 5
6
2 1 0
A = 1 0 1
1 2 1
2
beq = 26
6
5
b = 2
10
1
x lb = 2
0
min c ( x1 , x 2 ,..., x n )
sujeta a
Ax b
Aeq x = beq
Estructura en Matlab
[x,fval,exitflag,output,lambda] =
linprog( f,a,b,aeq,beq,lb,ub,x0,options )
Ejemplo 1 [ liprogv102_2.m ]
min f(x) = x1 + x2 + x3
sujeta a las restricciones siguientes
g1(x) = 2 x1 + x2 5
g2(x) = x1 + x3 2
g3(x) = x1 + 2 x2 + x3 10
h1(x) = 2 x1 - 2 x2 + x3 = -2
h2(x) = 10 x1 + 8 x2 - 14x3 = 26
h3(x) = -4 x1 + 5 x2 - 6 x3 = 6
x1 1 x2 2 x3 0
min [ f k ( x1 , x 2 ,..., x n )]
k =1
sujeta a
xlb x xub
Estructura en Matlab
[x,resnorm,residual,exitflag,output,lambda,jacobian] =
lsqnonlin( fun,x0,lb,ub,options )
10
1.0
20
1.26
30
1.86
40
3.31
Para el modelo
Y = ea1 + a2 x + a3 x
50
7.08