Presentacion Metodo Simplex
Presentacion Metodo Simplex
DE
OPERACIONES
Manuel José Ospina O.
INFORMACIÓN LEGAL
TITULO TITULO
Dando cumplimiento a la Ley estatutaria 1581 de 2012, la Universidad
Autónoma de Occidente se permite informar que esta sesión académica será
transmitida en vivo, se podrán tomar imágenes de los asistentes y ser grabada
en video para usos y fines estrictamente académicos.
Los derechos de autor sobre el contenido de la sesión académica se encuentran
protegidos conforme a lo dispuesto por el artículo 20 de la Ley 23 de 1982,
modificado por el artículo 28 de la Ley 1450 de 2011. Queda prohibida su
difusión, distribución o divulgación en redes sociales o cualquier otro medio
no institucional.
Método Simplex
Introducción
Ejemplo :
Max Z = 3x1 + 4X2 equivale Min (-Z) = -3x1-4x2
Min Z = 7x1+9x2 equivale Max (-Z) = -7x1-9X2
Paso a la forma estándar
• Regla 2
Una desigualdad AX b es equivalente a -AX -b
Una desigualdad AX b es equivalente a -AX -b
Ejemplo :
3x1 +6x2 +4x3 150 equivale -3x1 -6x2 -4x3 - 150
3x1 +6x2 150 equivale -3x1 -6x2 - 150
Paso a la forma estándar
• Regla 3
Toda restricción de la forma AX = b se puede establecer como la intersección de
dos desigualdades así : AX b y AX b
Paso a la forma estándar
Ejemplo :
4x1 +3x2 +3x3 = 120 equivale a la intersección de las dos siguientes restricciones :
4x1 +3x2 +3x3 120
4x1 +3x2 +3x3 120
Paso a la forma estándar
• Regla 4
Toda desigualdad de la forma AX b puede convertirse en igualdad mediante la
adición de un vector H en el lado izquierdo de la restricción . A este vector que
contiene m componentes no negativos se le denomina vector de holgura y a sus
“variables de holgura”
Paso a la forma estándar
Ejemplo :
5x1 +3x2 +7x3 120 5x1 +3x2 +7x3 + H1 = 120
4x1 +3x2 +3x3 150 4x1 +3x2 +3x3+ H2=150
x1 ,x2,x3 0 x1 ,x2,x3 , H1,H2 0
Paso a la forma estándar
• Regla 5
Toda desigualdad de la forma AX b puede convertirse en igualdad mediante la
resta de un vector S en el lado izquierdo de la restricción . A este vector que
contiene m componentes no negativos se le denomina vector de exceso o
superflúo y a sus “variables de exceso o superflúo”
Paso a la forma estándar
Ejemplo :
5x1 +3x2 +7x3 120 5x1 +3x2 +7x3 -S1 = 120
4x1 +3x2 +3x3 150 4x1 +3x2 +3x3- S2=150
x1 ,x2,x3 0 x1 ,x2,x3 , S1, S2 0
Muchos Simplex
Maximizar Z= f(x,y)= 3x + 2y
sujeto a: 2x + y ≤18
2x + 3y ≤ 42
3x + y ≤ 24
x≥0 , y ≥0
Paso 1
Zj - Cb Z=
Todos los coeficientes de la
función objetivo
Tablero Inicial
Cj
Base Cb Xb Cociente
Zj - Cb Z=
Tablero Inicial
Cj 3 2 0 0 0
Base Cb Xb Cociente
Zj - Cb Z=
Tablero Inicial
Cj 3 2 0 0 0
Base Cb Xb Cociente
Zj - Cb Z=
Las Variables
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
Zj - Cb Z=
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
Zj - Cb Z=
Coeficientes de las
restricciones
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
2 1 1 0 0
2 3 0 1 0
3 1 0 0 1
Zj - Cb Z=
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
2 1 1 0 0
2 3 0 1 0
3 1 0 0 1
Zj - Cb Z=
Solución Inicial
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 2 1 1 0 0 18
s 2 3 0 1 0 42
d 3 1 0 0 1 24
Zj - Cb Z=
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 2 1 1 0 0 18
s 2 3 0 1 0 42
d 3 1 0 0 1 24
Zj - Cb Z=
2
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18
s 0 2 3 0 1 0 42
d 0 3 1 0 0 1 24
Zj - Cb Z=
2*0
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18
s 0 2 3 0 1 0 42
d 0 3 1 0 0 1 24
Zj - Cb Z=
2*0 + 2
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18
s 0 2 3 0 1 0 42
d 0 3 1 0 0 1 24
Zj - Cb Z=
2*0 + 2*0
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18
s 0 2 3 0 1 0 42
d 0 3 1 0 0 1 24
Zj - Cb Z=
2*0 + 2*0 + 3
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18
s 0 2 3 0 1 0 42
d 0 3 1 0 0 1 24
Zj - Cb Z=
La solución es óptima?
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18
s 0 2 3 0 1 0 42
d 0 3 1 0 0 1 24
Zj - Cb -3 -2 0 0 0 Z=
Para seleccionar columna pivote se toma la columna con el valor más negativo
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18 9 =18/2
s 0 2 3 0 1 0 42 21 =42/2
d 0 3 1 0 0 1 24 8 =24/3
Zj - Cb -3 -2 0 0 0 Z=
Se selecciona el menor
Tablero Inicial
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 2 1 1 0 0 18 9
s 0 2 3 0 1 0 42 21
d 0 3 1 0 0 1 24 8
Zj - Cb -3 -2 0 0 0 Z=
Calcularlos!!
Tablero 1
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
h 0 0 0,33333 1 0 -0,6667 2
s 0 0 2,33333 0 1 -0,6667 26
x 3 1 0,33333 0 0 0,33333 8
Zj - Cb 0 -1 0 0 1 Z=
Tablero Final
Cj 3 2 0 0 0
Base Cb x y h s d Sol Cociente
y 2 0 1 -0,5 0 0 12
d 0 0 0 -1,75 0 1 3
x 3 1 0 -0,75 0 0 3
Zj - Cb 0 0 1,25 0 0 Z=33
Maximizar
Z = 9x + 10y
Sujeto a:
7x + 10y £ 700
10x + 8y £ 800
6x + 15y £ 900
x, y £ 0
Ejercicio
Maximizar Maximizar
Z = 9x + 10y Z = 9x + 10y + 0h + 0d + 0s
Sujeto a: Sujeto a:
7x + 10y £ 700 7x + 10y + h = 700
10x + 8y £ 800 10x + 8y + d = 800
6x + 15y £ 900 6x + 15y + s = 900
x, y £ 0
Tablero Inicial
Cj 9 10 0 0 0
Base Cb x y h d s Xb Cociente
h 0 7 10 1 0 0 700
d 0 10 8 0 1 0 800
s 0 6 15 0 0 1 900
Zj - Cb -9 -10 0 0 0 Z=
0 *7 + 0 * 10 + 0 * 6 - 9 = -9
Tablero Inicial
Cj 9 10 0 0 0
Base Cb x y h d s Xb Cociente
h 0 7 10 1 0 0 700
d 0 10 8 0 1 0 800
s 0 6 15 0 0 1 900
Zj - Cb -9 -10 0 0 0 Z=
0 * 10 + 0 * 8 + 0 * 15 - 10 = -10
Tablero Inicial
Cj 9 10 0 0 0
Base Cb x y h d s Xb Cociente
h 0 7 10 1 0 0 700
d 0 10 8 0 1 0 800
s 0 6 15 0 0 1 900
Zj - Cb -9 -10 0 0 0 Z=
Una vez que se tiene la columna con el valor menor, se dividen los Xb or esta columna
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700 70
d 0 10 8 0 1 0 800
s 0 6 15 0 0 1 900
Zj-Cb -9 -10 0 0 0
700 / 10 = 70
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700 70
d 0 10 8 0 1 0 800 100
s 0 6 15 0 0 1 900
Zj-Cb -9 -10 0 0 0
800 / 8 = 100
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700 70
d 0 10 8 0 1 0 800 100
s 0 6 15 0 0 1 900 60
Zj-Cb -9 -10 0 0 0
900 / 15 = 60
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700 70
d 0 10 8 0 1 0 800 100
s 0 6 15 0 0 1 900 60
Zj-Cb -9 -10 0 0 0
Ahora este pivote se necesita convertir en 1, para eso dividimos toda la fila en el mismo
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700
d 0 10 8 0 1 0 800
s 0 6 15 0 0 1 900
Zj-Cb -9 -10 0 0 0
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700
d 0 10 8 0 1 0 800
s 0 6 15 0 0 1 900
Zj-Cb -9 -10 0 0 0
Primero convertir la fila del 8 en cero, para eso tomamos la fila del pivote y la multiplicamos por -8 y la sumamos
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700
d 0 10 8 0 1 0 800
s 0 0,4 1 0 0 0,067 60
Zj-Cb -9 -10 0 0 0
Ahora convertir la fila del 10 en cero, para eso tomamos la fila del pivote y la multiplicamos por -10 y la sumamos
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 7 10 1 0 0 700
d 0 6,8 0 0 1 -0,533 320
Y 10 0,4 1 0 0 0,067 60
Zj-Cb -9 -10 0 0 0
0 * 3 + 0 * 6.8 + 10 * 0,4 – 9 = -5
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100
d 0 6,8 0 0 1 -0,533 320
Y 10 0,4 1 0 0 0,067 60
Zj-Cb -5
0 * 3 + 0 * 6.8 + 10 * 0,4 – 9 = -5
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100
d 0 6,8 0 0 1 -0,533 320
Y 10 0,4 1 0 0 0,067 60
Zj-Cb -5
0 * 0 + 0 * 0 + 10 * 1 -10 = 0
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100
d 0 6,8 0 0 1 -0,533 320
Y 10 0,4 1 0 0 0,067 60
Zj-Cb -5
0 * 0 + 0 * 0 + 10 * 1 -10 = 0
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100
d 0 6,8 0 0 1 -0,533 320
Y 10 0,4 1 0 0 0,067 60
Zj-Cb -5 0
0 * 0 + 0 * 0 + 10 * 1 -10 = 0
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100
d 0 6,8 0 0 1 -0,533 320
Y 10 0,4 1 0 0 0,067 60
Zj-Cb -5 0 0 0 0,667
Y los otros
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100
d 0 6,8 0 0 1 -0,533 320
Y 10 0,4 1 0 0 0,067 60
Zj-Cb -5 0 0 0 0,667
Seleccionamos el menor
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100 33,333
d 0 6,8 0 0 1 -0,533 320 47,059
Y 10 0,4 1 0 0 0,067 60 150
Zj-Cb -5 0 0 0 0,667
Seleccionamos el menor
Tablero
Cj 9 10 0 0 0
Base Cb X Y h d s Xb Cociente
h 0 3 0 1 0 -0,667 100 33,333
d 0 6,8 0 0 1 -0,533 320 47,059
Y 10 0,4 1 0 0 0,067 60 150
Zj-Cb -5 0 0 0 0,667
Ejemplo
Z= 300x+500y
Min
Tablero Inicial
Cj 300 500 0 0 0
Base Cb x y h d s Xb Cociente
4 5 -1 0 0
2 8 0 -1 0
5 3 0 0 -1
Zj - Cb Z=
¿Qué pasa cuando hay que minimizar?
•Los valores de M se pueden dejar indicados o colocar un valor tan grande como 10 veces más el mayor
de los coeficientes
Tipos de variables artificiales
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb Z=
Se calculan los Zj – Cb
Tablero Inicial
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Tablero Inicial
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
A1 -M 4 5 -1 0 0 1 0 0 200
A2 -M 2 8 0 -1 0 0 1 0 160
A3 -M 5 3 0 0 -1 0 0 1 150
Zj - Cb -11M+300 -16M+500 M M M 0 0 0 Z=
Ultimo Tableau
Cj -300 -500 0 0 0 -M -M -M
Base Cb x y h d s A1 A2 A3 Xb Cociente
Para obtenerS3 un valor0 mínimo
0 de 16363,6 (podría se un costo) se requiere la
0 -1,545 0,591 1 1,545 -0,591 -1 64,5455
utilizaciónyx de 36,36-500
unidades
-300
0
1
del recurso X y 10,909 unidades del recurso Y
1
0
0,091
-0,364
-0,182
0,227
0
0
-0,091
0,364
0,182
-0,227
0 10,909
0 36,3636
Zj - Cb 0 0 63,636 22,727 0 M-(63,636)M-(22,727)M Z=16363,6
Problema
Texaco puede comprar dos tipos de petróleo: crudo ligero a un precio de $25 por barril y
petróleo crudo pesado a $22 por barril. Cada barril de petróleo crudo ya refinado produce
tres productos: gasolina, turbosina y queroseno.
La siguiente tabla indica las cantidades en barriles de gasolina, turbosina y queroseno
producidos por barril de cada tipo de petróleo crudo.
Gasolina Turbosina Queroseno
Crudo ligero O,45 0,18 0,30
Crudo pesado 0,35 0,36 0,20