Académique Documents
Professionnel Documents
Culture Documents
Algoritmo SIMPLEX
2
Temario
Algoritmo SIMPLEX
Modelo de Modelo de
Maximizacin Minimizacin
Variables Variables
Variables Variables Variables Variables
Positivas No No
Negativas Positivas Negativas
Restringidas Restringidas
3
Modelos de maximizacin con variables positivas
4
MODELO DE MAXIMIZACIN - VARIABLES POSITIVAS
PROBLEMA:
Una empresa produce pintura para interiores y exteriores
y se tiene la siguiente informacin.
5
Formulacin
Definicin de variables:
X 1: Cantidad de toneladas de pintura para interiores
S .a.
1X 1 2 X 2 6 Disponibilidad de operarios
X1, X 2 0
6
Pasando el modelo a su forma estndar
Estandarizando:
7
Tablero inicial del SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 -3 0 0 0 Tablero
inicial
S1 1 2 1 0 6
del SIMPLEX
S2 2 1 0 1 8
BASE
Como se est maximizando, debemos
seleccionar el coeficiente reducido ms
negativo, es decir el valor -3, para
definir nuestra columna PIVOT
BASE
8
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin Cociente
mnimo
BASE -2 -3 0 0 0
S1 1 2 1 0 6 6/2 = 3
2 S2 2 1 0 1 8 8/1 = 8
BASE
X2 1/2 1 1/2 0 3
BASE
9
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
+
BASE -2 -3 0 0 0
S1 1 2 1 0 6
S2 2 1 0 1 8
=
BASE -(1/2) 0 3/2 0 9
1*3+(-3)
X2 1/2 1 1/2 0 3
BASE
10
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 -3 0 0 0
S1 1 2 1 0 6
+
S2 2 1 0 1 8
BASE -(1/2) 0 3/2 0 9
1*(-1)+ 1
X2 1/2 1 1/2 0 3
=
S2 3/2 0 -(1/2) 1 5
BASE
11
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 -3 0 0 0
S1 1 2 1 0 6
S2 2 1 0 1 8
Cociente
BASE -(1/2) 0 3/2 0 9 mnimo
BASE
12
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 -3 0 0 0
S1 1 2 1 0 6
S2 2 1 0 1 8
Cociente
BASE -(1/2) 0 3/2 0 9 mnimo
3/2
BASE
13
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 -3 0 0 0
S1 1 2 1 0 6
S2 2 1 0 1 8
+ BASE -(1/2) 0 3/2 0 9
X2 1/2 1 1/2 0 3
S2 3/2 0 -(1/2) 1 5
=
BASE 0 0 4/3 1/3 32/3
14
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 -3 0 0 0
S1 1 2 1 0 6
S2 2 1 0 1 8
BASE -(1/2) 0 3/2 0 9
+ X2 1/2 1 1/2 0 3
S2 3/2 0 -(1/2) 1 5
BASE 0 0 4/3 1/3 32/3
= X2 0 1 2/3 -(1/3) 4/3
X1 1 0 -(1/3) 2/3 10/3
1*(-1/2)+ 1/2
No existen ms costos reducidos negativos.
Por lo tanto, fin del algoritmo. 15
Interpretacin del tablero ptimo del SIMPLEX
Tablero ptimo
X1 X2 S1 S2 Solucin
BASE 0 0 4/3 1/3 32/3
X2 0 1 2/3 -(1/3) 4/3
X1 1 0 -(1/3) 2/3 10/3
Vector solucin:
MAX = 32/3
( X1 , X2 , S1 , S2 ) = ( 10/3 , 4/3 , 0, 0 )
16
Solucin
Vector solucin:
( X1 , X2 , S1 , S2 ) = ( 10/3 , 4/3 , 0, 0 )
SOLUCION FINAL
X1 = 10/3
MAX = 32/3
X2 = 4/3
17
No olvides que
18
Modelo de maximizacin con variables
no restringidas
19
Pasando el modelo a su forma estndar
Dado el siguiente modelo:
El mtodo SIMPLEX se
aplica solo a modelos que
MAX Z 8 X Y tienen restricciones del
S .a.
X Y 2 tipo menor o igual
X 4Y 4
X Y 1
X nr , Ynr
Estandarizando:
Hacemos el siguiente
reemplazo por estar MIN Z 8 X 18 X 21Y 11Y 20S1 0S 2 0S3 0
trabajando con una variable
S .a.
no restringidas: 1X 1 1X 2 1Y1 1Y2 1S1 0S 2 0S3 2
1X 1 1X 2 4Y1 4Y2 0S1 1S 2 0S3 4
X X1 X 2
1X 1 1X 2 1Y1 1Y2 0S1 0S 2 1S3 1
Y Y 1Y 2
X 1 , X 2 , Y1 , Y2 , S1 , S 2 , S3 0
BASE
21
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin Cociente
BASE 8 -8 -1 1 0 0 0 0 mnimo
S1 1 -1 1 -1 1 0 0 2 No existe
S2 1 -1 -4 4 0 1 0 4 No existe
S3 -1 1 1 -1 0 0 1 1 1/1 = 1
BASE
1
X2 -1 1 1 -1 0 0 1 1
BASE
22
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin
+ BASE 8 -8 -1 1 0 0 0 0
S1 1 -1 1 -1 1 0 0 2
S2 1 -1 -4 4 0 1 0 4
S3 -1 1 1 -1 0 0 1 1
= BASE 0 0 7 -7 0 0 8 8
1*8+(-8) X2 -1 1 1 -1 0 0 1 1
BASE
23
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin
BASE 8 -8 -1 1 0 0 0 0
+ S1 1 -1 1 -1 1 0 0 2
S2 1 -1 -4 4 0 1 0 4
S3 -1 1 1 -1 0 0 1 1
BASE 0 0 7 -7 0 0 8 8
= S1 0 0 2 -2 1 0 1 3
1*1+(-1) X2 -1 1 1 -1 0 0 1 1
BASE
24
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin
BASE 8 -8 -1 1 0 0 0 0
S1 1 -1 1 -1 1 0 0 2
+
S2 1 -1 -4 4 0 1 0 4
S3 -1 1 1 -1 0 0 1 1
BASE 0 0 7 -7 0 0 8 8
S1 0 0 2 -2 1 0 1 3
= S2 0 0 -3 3 0 1 1 5
1*1+(-1) X2 -1 1 1 -1 0 0 1 1
BASE
25
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin
BASE 8 -8 -1 1 0 0 0 0
S1 1 -1 1 -1 1 0 0 2
S2 1 -1 -4 4 0 1 0 4
S3 -1 1 1 -1 0 0 1 1 Cociente
mnimo
BASE 0 0 7 -7 0 0 8 8
S1 0 0 2 -2 1 0 1 3 No existe
S2 0 0 -3 3 0 1 1 5 5/3
X2 -1 1 1 -1 0 0 1 1 No existe
3
BASE
26
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin
BASE 8 -8 -1 1 0 0 0 0
S1 1 -1 1 -1 1 0 0 2
S2 1 -1 -4 4 0 1 0 4
S3 -1 1 1 -1 0 0 1 1
+ BASE 0 0 7 -7 0 0 8 8
S1 0 0 2 -2 1 0 1 3
S2 0 0 -3 3 0 1 1 5
X2 -1 1 1 -1 0 0 1 1
= BASE 0 0 0 0 0 7/3 31/3 59/3
27
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin
BASE 8 -8 -1 1 0 0 0 0
S1 1 -1 1 -1 1 0 0 2
S2 1 -1 -4 4 0 1 0 4
S3 -1 1 1 -1 0 0 1 1
BASE 0 0 7 -7 0 0 8 8
+ S1 0 0 2 -2 1 0 1 3
S2 0 0 -3 3 0 1 1 5
X2 -1 1 1 -1 0 0 1 1
BASE 0 0 0 0 0 7/3 31/3 59/3
= S1 0 0 0 0 1 2/3 5/3 19/3
1*2+(-2) Y2 0 0 -1 1 0 1/3 1/3 5/3
28
Desarrollo del algoritmo SIMPLEX
X1 X2 Y1 Y2 S1 S2 S3 Solucin
BASE 8 -8 -1 1 0 0 0 0
S1 1 -1 1 -1 1 0 0 2
S2 1 -1 -4 4 0 1 0 4
S3 -1 1 1 existen
No -1 0ms 0costos1 reducidos 1 negativos.
BASE 0 0 Por
7 lo-7tanto,
0 fin 0del algoritmo
8 8
S1 0 0 2 -2 1 0 1 3
S2 0 0 -3 3 0 1 1 5
+ X2 -1 1 1 -1 0 0 1 1
BASE 0 0 0 0 0 7/3 31/3 59/3
S1 0 0 0 0 1 2/3 5/3 19/3
1*1+(-1) Y2 0 0 -1 1 0 1/3 1/3 5/3
= X2 -1 1 0 0 0 1/3 4/3 8/3
29
Interpretacin del tablero ptimo del SIMPLEX
Tablero ptimo
X1 X2 Y1 Y2 S1 S2 S3 Solucin
BASE 0 0 0 0 0 7/3 31/3 59/3
S1 0 0 0 0 1 2/3 5/3 19/3
Y2 0 0 -1 1 0 1/3 1/3 5/3
X2 -1 1 0 0 0 1/3 4/3 8/3
Vector solucin:
MAX = 59/3
Variables Bsicas
30
Solucin
Vector solucin:
( X1 , X2 , Y1 , Y2 , S1 , S2 ) = ( 0 , 8/3 , 0 , 5/3 , 19/3 , 0)
SOLUCION FINAL
32
Modelos de minimizacin con variables positivas
33
MODELO DE MINIMIZACIN - VARIABLES POSITIVAS
PROBLEMA:
Harina tipo I para uso interno y harina tipo II para venta.
rea ventas: diferencia entre la harina tipo I y II debe ser a
lo mas 6 toneladas.
INVESTIGACIN DE OPERACIONES 34
Formulacin
S .a.
1X 1 1X 2 4 Disponibilidad de operarios
1X 1 1X 2 6 Condicin de demanda
X1, X 2 0
INVESTIGACIN DE OPERACIONES 35
Pasando el modelo a su forma estndar
Dado el siguiente modelo:
Estandarizando:
INVESTIGACIN DE OPERACIONES 36
Tablero inicial del SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 3 0 0 0 Tablero
inicial
S1 1 1 1 0 4
del SIMPLEX
S2 1 -1 0 1 6
BASE
Como se est minimizando debemos
seleccionar el coeficiente reducidos
ms positivo, es decir el valor 3, para
definir nuestra columna PIVOT
37
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin Cociente
mnimo
BASE -2 3 0 0 0
S1 1 1 1 0 4 4/1 = 1
1 S2 1 -1 0 1 6 No existe
BASE
X2 1 1 1 0 4
38
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
+
BASE -2 3 0 0 0
S1 1 1 1 0 4
S2 1 -1 0 1 6
=
BASE -5 0 -3 0 -12
1*(-3)+3
X2 1 1 1 0 4
39
Desarrollo del algoritmo SIMPLEX
X1 X2 S1 S2 Solucin
BASE -2 3 0 0 0
S1 1 1 1 0 4
+
S2 1 -1 0 1 6
BASE -5 0 -3 0 -12
1*1+(- 1)
X2 1 1 1 0 4
=
S2 2 0 1 1 10
40
Interpretacin del tablero ptimo del SIMPLEX
Tablero ptimo
X1 X2 S1 S2 Solucin
BASE -5 0 -3 0 -12
X2 1 1 1 0 4
S2 2 0 1 1 10
Vector solucin:
Variables Bsicas
( X1 , X2 , S1 , S2 ) = ( 0 , 4 , 0 , 10 ) MIN = -12
Vector solucin:
( X1 , X2 , S1 , S2 ) = ( 0 , 4 , 0 , 10 )
SOLUCION FINAL
X1 = 0
MIN = -12
X2 = 4
42
No olvides que
43
Modelo de minimizacin con variables negativas
44
MODELO DE MINIMIZACIN - VARIABLES NEGATIVAS
Dado el siguiente modelo:
El mtodo SIMPLEX se
MIN Z X Y aplica solo a modelos que
S .a. tienen restricciones del
X Y 2
tipo menor o igual
X Y 4
X 1 0, Y 0
INVESTIGACIN DE OPERACIONES 45
Tablero inicial del SIMPLEX
X Y1 S1 S2 Solucin
BASE -1 1 0 0 0 Tablero
inicial
S1 1 -1 1 0 2
del SIMPLEX
S2 1 1 0 1 4
BASE
Como se est minimizando, debemos
seleccionar el coeficiente reducido ms
positivo, es decir, el valor 1, para definir
nuestra columna PIVOT
46
Desarrollo del algoritmo SIMPLEX
X Y1 S1 S2 Solucin
Cociente
BASE -1 1 0 0 0 mnimo
S1 1 -1 1 0 2 No existe
S2 1 1 0 1 4 4/1 = 4
BASE
1
Y1 1 1 0 1 4
47
Desarrollo del algoritmo SIMPLEX
X Y1 S1 S2 Solucin
+ BASE -1 1 0 0 0
S1 1 -1 1 0 2
S2 1 1 0 1 4
=
BASE -2 0 0 -1 -4
1*(-1)+1
Y1 1 1 0 1 4
48
Desarrollo del algoritmo SIMPLEX
X Y1 S1 S2 Solucin
BASE -1 1 0 0 0
+ S1 1 -1 1 0 2
S2 1 -1 0 1 4
BASE -2 0 0 -1 -4
= S1 2 0 1 1 6
1*1+(- 1) Y1 1 1 0 1 4
49
Interpretacin del tablero ptimo del SIMPLEX
Tablero ptimo
X Y1 S1 S2 Solucin
BASE -2 0 0 -1 -4
S1 2 0 1 1 6
Y1 1 1 0 1 4
Vector solucin:
Variables Bsicas
( X , Y1 , S1 , S2 ) = ( 0 , 4 , 0, 6 ) MIN = -4
50
Solucin
Vector solucin:
( X , Y1 , S1 , S2 ) = ( 0 , 4 , 0, 6 )
SOLUCION FINAL
X=0
MIN = -4
Y = - Y1 = - (4) = -4
52
No olvides que
53
Reflexiona un momento
54
Ejercicios
Propuestos
Para cada ejercicio se pide:
1. Hallar su forma estndar
2. Hallar la solucin por el mtodo SIMPLEX
3. Obtener el vector solucin del tablero ptimo
4. Dar la solucin en funcin a las variables de decisin
55
Ejercicio 1:
MAX Z X1 X 2
S .a.
4 X 1 X 2 100
X 1 X 2 80
X 1 40
X1, X 2 0
56
Ejercicio 2:
MIN Z 4 X1 X 2
S .a.
2 X1 X 2 8
X2 5
X1 X 2 4
X1, X 2 0
INVESTIGACIN OPERACIONAL 57
Ejercicio 3:
MAX Z 2X Y
S .a.
3X Y 6
X Y 4
X 0, Ynr
INVESTIGACIN OPERACIONAL 58
Solucin
59
Solucin Ejercicio 1
Vector solucin:
SOLUCION FINAL
X1 = 20/3
MAX = 80
X2 = 220/3
60
Solucin Ejercicio 2
Vector solucin:
( X1 , X2 , S1 , S2 , S3 ) = ( 0 , 5 , 3 , 0 , 9 )
SOLUCION FINAL
X1 = 0
MIN = - 5
X2 = 5
INVESTIGACIN OPERACIONAL 61
61
Solucin Ejercicio 3
Vector solucin:
( X , Y1 , Y2, S1 , S2 ) = ( 1 , 3 , 0 , 0 , 0 )
SOLUCION FINAL
X=1
MAX = 5
Y = Y1 Y2 = (3) - ( 0) = 3
INVESTIGACIN OPERACIONAL 62
62
Conclusiones
El mtodo SIMPLEX:
63