Mathematics">
Clase-2P 2022-IO D 2
Clase-2P 2022-IO D 2
Clase-2P 2022-IO D 2
Alejandro Menocal
alejandro.menocal@uth.hn
Silabo de la clase.
PLATAFORMA
Libro de la clase.
Receso: 11:00 -12:20 Clase.
12:20-12:40 Receso.
12:40-13:59 Clase.
Enviar al correo los nombres de los integrantes del grupo, con copia a todos los del grupo.
Los grupos serán: 2 de 5 alumnos y 1 de 6 alumnos Total = 16 alumnos.
Bosqueje la gráfica de la desigualdad lineal 2x1 - 3x2 < 6
x2
x1
x1 ≤4 9
2x2 ≤ 12 Z=36
3 x1 + 2x2 ≤ 18 6
Z=30
x1 ≥ 0 y x 2 ≥ 0
si x1 = 0 x2=9
Z=10
si x2 = 0 x1=6
4 6
x1
Z = 3 x1 + 5x2
Z – 3x1 = 5x2
Z 3
− x =x
5 5 1 2
Si Z=10 entonces;
3
2− x 1=x 2 si x1=0, x2 =2 (0,2)
5
Z = 200x1 + 160x2
Z−200 x1 =160 x 2
Z−200 x 1 −5 x 1 Z
x 2= = +
160 4 160
−5 x 1 Z
x 2= +
4 160
Z=16000
−5 x 1
x 2=
4
+ 100 si x1=0; x2= 100. Si x2=0; x1= 80
(0,100) y (80,0)
Z=4000
−5 x 1
x 2=
4
+25 si x1=0; x2= 25. Si x2=0; x1= 80
(0,25) y (20,0)
Z=5000
−5 x 1
x 2=
4
+ 31.25 si x1=0; x2= 31.25. Si x2=0; x1= 25
(0,31.25) y (25,0)
Z = 200(15) + 160(10) = $4600
Producir por semana, 15 artículos del producto x1 y 10
artículos del producto x2 para obtener una ganancia
máxima de $4,600.00
DOMINGO 29/5/2022.
Z=3X1 + 5X2 = 3(0) + 5(9) = 45
(0,9)
x1 ≤4
0 ≤ 4 (v)
2x2 ≤ 12
2(9) ≤ 12 (F)
3X1 + 2X2 ≤ 18
3(0) +2(9) ≤ 18
18 ≤ 18 (v)
(-1,3)
-1 ≤ 4 (v)
2(3) ≤ 12 (V)
6≤ 12
3(-1)+2(3) ≤ 18
-3+6≤ 18 (V)
Z=3(-1)+5(3)=12
(4,4)
4≤ 4 (V)
8≤ 12 (V)
12+ 8 ≤ 18
20 ≤ 18 (F)
Z=3(4)+5(4)=32
[L,U]
Z= 3x1 + 2x2
(2,6) y (4,3)
Z=6+12=18
Z=12+6=18
Z=3(3.3257) + 2(4.0114) = 9.9771 + 8.0228 = 17.999
Domingo 12/6/2022.
Variables de holgura.
x1 ≤4
x1 + x3 =4
x3 = 4 – x 1
2x2 ≤ 12
2x2 + x4 = 12
3 x1 + 2x2 ≤ 18
3 x1 + 2x2 + x5 = 18
Solución (3,2)
Solución aumentada (3,2,1,8,5)
x1 + x3 =4
3 +x3 = 4
x3 = 1
2x2 + x4 = 12
2(2) + x4 = 12
x4 = 8
3 x1 + 2x2 + x5 = 18
3(3) + 2(2) + x5 = 18
x5 = 5
solución FEV (0,6)
x1= 0 y x2 = 6
x3=0
Wyndor Glass Co.
Maximizar Z = 3 x1 + 5x2
Sujeta a las restricciones
x1 ≤4
2x2 ≤ 12
3 x1 + 2x2 ≤ 18
x1 ≥ 0 y x 2 ≥ 0
METODO SIMPLEX:
FORMA ALGEBRAICA
(0) Z – 3x1 – 5x2 =0
(1) x1 + x3 =4
(2) +2x2 + x4 =12
(3) 3x1 +2x2 +x5 = 18
x j ≥ 0 , para j=1,2 ,3,4,5
FORMA TABULAR
Coeficientes de:
Variables Z x1 x2 x3 x4 x5 LD
básicas
Z 1 -3 -5 0 0 0 0
x3 0 1 0 1 0 0 4
x4 0 0 2 0 1 0 12
x5 0 3 2 0 0 1 18
PRUEBA DE OPTIMALIDAD:
Variables Ec. Z x1 x2 x3 x4 x5 LD cociente
básicas
Z (0 1 -3 -5 0 0 0 0
)
x3 (1 0 1 0 1 0 0 4 4/0 ∄
)
x4 (2 0 0 2 0 1 0 12 12/2=6
)
x5 (3 0 3 2 0 0 1 18 18/2=9
)
Iteración 0.
Variable Ec. Z x1 x2 x3 x4 x5 LD
s básicas
Z (0) 1 -3 0 0 5/2 0 30
x3 (1) 0 1 0 1 0 0 4
x2 (2) 0 0 1 0 1/2 0 6
x5 (3) 0 3 0 0 -1 1 6
5(2) + (0) -2(2) + (3)
5(0) + 1 =1 -2(0) + 0=0
5(0) + (-3) = -3 -2(0) + 3 = 3
5(1) + (-5) = 0 -2(1) + 2 = 0
5(0) +0 = 0 -2(0) + 0 = 0
5(1/2) + 0 = 5/2 -2(1/2) + 0 = - 1
5(0) + 0 = 0 -2(0) + 1 = 1
5(6) + 0= 30 -2(6) + 18 = 6
PRUEBA DE OPTIMALIDAD:
Variables Ec. Z x1 x2 x3 x4 x5 LD cociente
básicas
Z (0 1 -3 0 0 5/ 0 30
) 2
x3 (1 0 1 0 1 0 0 4 4/1=4
)
x4 (2 0 0 1 0 1/ 0 6 6/0 ∄
) 2
x5 (3 0 3 0 0 -1 1 6 6/3=2
)
Iteración 1.
Variables Ec. Z x1 x2 x3 x4 x5 LD
básicas
Z (0) 1 0 0 0 3/2 1 36
x3 (1) 0 0 0 1 1/3 -1/3 2
x2 (2) 0 0 1 0 1/2 0 6
x1 (3) 0 1 0 0 -1/3 1/3 2
(2,6,2,0,0)
FORMA ALGEBRAICA:
(0) Z - 200x1 – 160x2 =0
(1) 5x1 + 3x2 + x3 = 105
(2) 2x1 +4x2 + x4 =70
PRUEBA DE OPTIMALIDAD:
x x x x
Variables Z 1 2 3 4
LD Cociente
básicas
Z 1 -200 -160 0 0 0
x
3
0 5 3 1 0 105 105/5=21
x
4
0 2 4 0 1 70 70/2=35
Iteración 0:
Variables Ec. Z x x 1 2 x3 x4
LD
básicas
Z (0 1 0 -40 40 0 4200
)
x1
(1 0 1 3/5 1/5 0 21
)
x4
(2 0 0 14/5 -2/5 1 28
)
200(1) + (0) -2(1) + (2)
200(0) + 1 = 1 -2(0) + 0 = 0
200(1) + (-200) = 0 -2(1) + 2 = 0
200(3/5) + (-160) =-40 -2(3/5) + 4=14/5
200(1/5) + (0) = 40 -2(1/5) + 0=-2/5
200(0) + 0=0 -2(0) + 1 = 1
200(21) + 0 = 4200 -2(21) + 70 = 28
PRUEBA DE OPTIMALIDAD:
Variables Ec. Z x1 x 2 x3 x4
LD Cociente
básicas
Z (0) 1 0 -40 40 0 4200
x1
(1) 0 1 3/5 1/5 0 21 21/3/5=3
5
x4
(2) 0 0 14/5 -2/5 1 28 28/14/5=
10
Iteración 1.
Variables Ec. Z x1 2x x
3 x4
LD
básicas
Z (0 1 0 0 240/7 100/7 4600
)
x
1
(1 0 1 0 2/7 -3/14 15
)
x
2
(2 0 0 1 -1/7 5/14 10
)
40(2) + (0)
40(0) +1=1
40(0) + 0=0
40(1) +(-40) =0
40(-1/7) + 40 = 240/7
40(5/14) + 0 = 100/7
40(10) +4200 = 4600
-3/5(2) + (1)
-3/5(0) + 0=0
-3/5(0) +1 = 1
-3/5(1) + 3/5 = 0
-3/5(-1/7) + 1/5 = 2/7
-3/5(5/14) + 0 = -3/14
-3/5(10) + 21 = 15
La función objetivo es máxima cuando
genera una ganancia de $4,600.00 y se
produciría del producto x1 15 unidades y
del producto x2 10 unidades.
(15,10,0,0)
Domingo 19/6/2022.
Forma Matricial del Método Simplex.
[] []
x1 20
C=¿ 1,4,2] x= x 2 b= 15
40
x3
[ ]
2 2 0
A= 1 0 3
1 1 2
[ ]
2 2 0 1 0 0
[A, I] ¿ 1 0 3 0 1 0
1 1 2 0 0 1
[C B B−1 ]
[ ]
1
0 0
[ ]
2 0 0 2
−1
B= 0 1 0 B = 0 1 0
1 0 1 −1
0 1
2
coeficientes de VB en C, Variables de
C B= [ 4 , 0 , 0 ]
CB B-1 A - C
[ ]
1
0 0
[ ]
2 2 2 0
[ 4 ,0 ,0 ] 0
−1
1 0 1 0 3 −¿
1 1 2
1,4,2]
0 1
2
1x3 3x3
[ ]
2 2 0
[ 2 ,0 ,0 ] 1 0 3 −¿ 1,4,2]
1 1 2
[ 4 , 4 , 0 ] − [ 1 , 4 , 2 ] = [ 3 , 0 ,−2 ]
[ ]
1
0 0
2
[ C B B−1 ]= [ 4 , 0 , 0 ] 0 1 0 =[ 2, 0 , 0 ]
−1
0 1
2
[]
20
[ 2 ,0 ,0 ] 15 =[40]
40
Entra x3
Variables Originales
[3, 0, -2] [40]
[ ][ ]
1
0 0
2 20
C B B−1 b=[ 4 , 0 ,0 ] 0 1 0 15 =¿
−1 40
0 1
2
[]
20
C B B−1 b=[ 2 , 0 ,0 ] 15 =[40]
40
1x3 3x1
[ ][ ] [ ]
1
0 0
2 20 10
−1
B b= 0 1 0 15 = 15
−1 40 30
0 1
2
¿Sale? x5
xB Columna Pivote LD Cero no limita, x2
puede crecer lo que
[] [] []
x2 0 10 queramos.
x5 3 15
x6 2 30 15/3 = 5
30/2 =15
Iteración 2.
[ ]
2
2 0 0
1
B= 0 3 0 B−1= 0 0
3
1 2 1
−1 −2
1
2 3
C B= [ 4 , 2 ,0 ]
[ ]
1
0 0
[ ]
2
2 2 0
1
[ 4 ,2 , 0 ] 0 0 1 0 3 −[1,4,2]
3
1 1 2
−1 −2
1
2 3
[ ]
2 2 0
[ 2 ,2 /3 , 0 ] 1 0 3 −[1,4,2]
1 1 2
[ 14
3 ]
, 4 ,2 −[ 1,4,2 ] =
11
3 [
, 0,0
]
Es un vector [ C B B
−1
A−C ]=
[ 11
3
, 0,0
]
C B= [ 4 , 2 ,0 ]
[ ]
1
0 0
2
−1 1
B = 0 0
3
−1 −2
1
2 3
[ ]
1
0 0
2
C B B−1=[ 4 ,2 , 0 ] 0
1
3 [ 2
0 = 2, ,0
3 ]
−1 −2
1
2 3
][ ]
20
[ 2
C B B−1 b= 2 , , 0 15 = [ 40+10+0 ]= [ 50 ]
3
40
1x3 3x1=1x1
[ ]
1
0 0
2
[]
20
−1 1
B b= 0 0 15 =[10 ,5 ,20]
3
40
−1 −2
1
2 3
[ ][ ]
x2 10
xB = x3 = 5
x6 20
Modelo estándar:
W – 60000x1 – 100000x2 = 0
10x1 + 25x2 – x3 = 50
12x1 + 20x2 - x4 = 50
Las variables de holgura.
Nuevo Modelo estándar:
W – 60000x1 – 100000x2 =0
−10 x 1−25 x2 + x 3=−50
−12 x1−20 x 2 + x 4=−50
SIMPLEX DUAL
x1 x2 x3 x4
Resultado
W -60000 -100000 0 0 0
x3
-10 -25 1 0 -50
x4
-12 -20 0 1 -50
m−n=4−2=2 grados de libertad .
x1 x2 x3 x4
Ec Resultado
W (0) -20000 0 -4000 0 200000
x2
(1) 2/5 1 -1/25 0 2
x4
(2) -4 0 -4/5 1 -10
100000(1) + (0)
100000(2/5) – 60000 = -20000
100000(1) – 10000 = 0
100000(-1/25) + 0 = - 4000
100000(0) + 0 = 0
100000(2) + 0 = 200000
20(1) + (2)
20(2/5) -12 = - 4
20(1) - 20 = 0
20(-1/25) +0 = -4/5
20(0) + 1 = 1
20(2) – 50 = - 10
4. Hacerse las siguientes preguntas:
a) ¿Todas las cifras de la columna de
Resultado son positivas? NO
b) ¿Todas las cifras de la fila W están en
cero o son negativos? Excepto el
Resultado. SI
c) Si la respuesta en alguna de las dos
preguntas es negativa se debe de volver
hacer una nueva iteración.
5.Repetir el paso # 1.
−20000 0
=5000 ∄
−4 0
x x2 x3 x4
Ec. 1
Resultado
W (0) 0 0 0 -5000 250000
x2
(1) 0 1 -3/25 1/10 1
x1
(2) 1 0 1/5 -1/4 5/2
20000(2) + (0)
20000(1) – 20000 = 0
20000(0) + 0 = 0
20000(1/5) – 4000 = 0
20000(-1/4) + 0 = - 5000
20000(5/2) + 20000 = 250000
−2
( 2 ) +( 1 )
5
−2
5
2
()
( 1 ) + =0
5
−2
( 0 ) + ( 1 )=1
5
( )( )
−2 1
5 5
+
−1
25
=−3/25
(
−2 −1
5 4 ) + ( 0 )=
1
10
5 (2)
−2 5
+ ( 2 )=1
3x + 2 x ≤ 460
PRIMAL
1 3
x 1+ 4 x 2 ≤ 420
x1 , x2 , x3 ≥ 0
2 x1 + 4 x 3 ≥ 2
x 1+ 2 x 2 ≥ 5
DUAL
MODELO ESTANDAR:
MAXIMIZAR W – 430X1 – 460x2 – 420x3 = 0
Sujeto a:
El signo de las restricciones se
cambia porque al multiplicar por
– 1 ambos lados de la
desigualdad, la regla dice que el
−x 1−3 x 2−x 3 ≤−3
−2 x1 −4 x 3 ≤−2
−x 1−2 x2 ≤−5
−4 ≥−12
-12 -4 0
−2 x1 −4 x 3 + x 5 ≤−2
−x 1−2 x2 + x 6 ≤−5
x1 x2 x3 x4 x5 x6 bj
VB
W 430 460 420 0 0 0 0
x4
-1 -3 -1 1 0 0 -3
x5
-2 0 -4 0 1 0 -2
x6
-1 -2 0 0 0 1 -5
430 460 420
=−430 =−230 ∄
−1 −2 0
x1 x2 x3 x4 x5 x6 bj
VB
W 430 460 420 0 0 0 0
x4
-1 -3 -1 1 0 0 -3
x5
-2 0 -4 0 1 0 -2
x6
-1 -2 0 0 0 1 -5
x x x x4 x5 x6 bj
VB Ec. 1 2 3
x1 x2 x3 x4 x5 x6 bj
VB Ec.
W (0) 0 0 20 0 100 230 -1350
x4
(1) 0 0 -2 1 1/4 -3/2 4
x1
(2) 1 0 2 0 -1/2 0 1
x2
(3) 0 1 -1 0 1/4 -1/2 2
200 420
=−100 =−105
−2 −4
-1/2(2) + (3)
-1/2(1) + (1/2)=0
-1/2(0) + (1) =1
-1/2(2) + (0) = -1
-1/2(0) + (0)=0
-1/2(-1/2) + (0)=1/4
-1/2(0) + (-1/2)=-1/2
-1/2(1) + (5/2)= 2
W= $1,350.00
x1=1
x2 = 2
Domingo 17/7/2022.
ANALISIS DE SENSIBILIDAD:
EJEMPLO:
Plantee el modelo y resuelva usando el método
Simplex.
Una fabrica produce prendas de vestir de
caballeros, camisas y pantalones, y desea saber
cuanto producir de cada prenda para obtener las
mayores ganancias posibles, sabiendo que gana
$50 y $80 respectivamente por unidad producida
y que lo que produzca lo vende. Sabiendo que
para la producción de tales prendas se pasa por
dos procesos claramente definidos, empleándose
1 hora para la camisa en el proceso 1 y dos horas
para el pantalón en el mismo proceso y 1 hora
para cada producto en el proceso 2. Y además se
cuenta como máximo con 120 horas disponibles
de mano de obra en el proceso 1 y con 90 horas
en el proceso 2.
x 2=Pantalones a fabricar
x 1+ x2 ≤ 90
x1, x2≥ 0
x1 x2 x3 x4
VB Z R
Z 1 -50 -80 0 0 0
x3
0 1 2 1 0 120
x4
0 1 1 0 1 90
x 2 :30+1 θ ≥ 0
Z :5400+30 θ ≥ 0
x 1 :60−1θ ≥ 0
x 1 :−1 θ≥−60
x 1 :θ ≤ 60
x 2 :30+1 θ ≥ 0
x 2 :+ 1θ ≥−30
x 2 :θ ≥−30
Z :5400+30 θ ≥ 0
Z :30 θ ≥−5400
5400
Z :θ ≥− =−180
30
Z :θ ≥−180
-180 -30 60
120 90 180
θ ∈ [−30 , 60 ]
Cambiamos 90 por 90 + θ
x 1 :60+2 θ ≥ 0
x 2 :30−θ ≥ 0
Z :5400+20 θ ≥ 0
x 1 :60+2 θ ≥ 0
x 1 :2 θ ≥−60
x 1 :θ ≥−30
x 2 :30−θ ≥ 0
x 2 :−θ ≥−30
x 2 :θ ≤ 30
Z :5400+20 θ ≥ 0
Z :20 θ ≥−5400
Z :θ ≥−270
-30 30
-270
θ ∈ [−30 , 30 ]
Domingo 24/7/2022.
Estra
Maximizar Z= 2x1 + 5x2 + 8x3
Sujeto a:
6x1 + 8x2 + 4x3 ≤ 96 Que tanto Podemos cambiar
2x1 + x2 + 2x3 ≤ 40 nuestro bj sin alterar nuestra Z.
Z cj 2 5 8 0 0 0
x1 x2 x3 x4 x5 x6
VB cB bj
x2
5 1/3 1 0 1/6 -1/3 0 8/3
x3
8 5/6 0 1 -1/12 2/3 0 56/3
x6
0 7/3 0 0 -1/3 -1/3 1 44/3
Zj 25/3 5 8 1/6 11/3 0 488/3
Cj- Zj -14/3 0 0 -1/6 -11/3 0
[ ]
1 −1
0
6 3
[ ][ ]
96 8 /3
−1 2
0 ∗ 40 = 56 /3
12 3
60 44 /3
−1 −1
1
3 3
3x3 3x1 3x
1
[ ]
1 −1
0
6 3
[ ]
96 +θ
−1 2
0 ∗ 40 =¿
12 3
60
−1 −1
1
3 3
[ ]
1 1
( 96+θ ) − ( 40 ) +0 ( 60 ) ≥ 0
6 3
−1 2
( 96+θ ) + ( 40 ) +0 ( 60 ) ≥0
12 3
−1 1
( 96+θ ) − ( 40 ) +1 ( 60 ) ≥ 0
3 3
[ ]
1 40
16+ θ− ≥ 0
6 3
1 80
−8− θ+ ≥0
12 3
1 40
−32− θ− +60 ≥0
3 3
1 40
16+ θ− ≥0
6 3
1 8
θ ≥−
6 3
θ ≥−16
1 80
−8− θ+ ≥ 0
12 3
−1 56
θ ≥−
12 3
θ ≤ 224
1 40
−32− θ− +60 ≥ 0
3 3
−1 44
θ ≥−
3 3
θ ≤ 44
-16 44 224
θ ∈ [−16,44 ]
96 – 16 = 80
96 + 44 = 140
[ ][ ]
1 −1
0
6 3
96
−1 2
0 ∗ 40 =¿
12 3
60+θ
−1 −1
1
3 3
[ −32−
40
3
+60+θ ≥ 0
]
44
+θ ≥ 0
3
44
θ ≥− ≅−14.67
3
16 – 40/3 + 0(60+θ ) ≥ 0
0 ≥−8/3
θ∈
[ −44
3
,∞
]
METODO DE VOGEL:
SUPUESTOS DEL METODO DE VOGEL:
1. Los costos de transporte son una
función lineal del número de unidades
embarcadas.
2. Tanto la oferta como la demanda se
expresan en unidades homogéneas.
3. Los costos unitarios de transporte no
varían de acuerdo con la cantidad
transportada.
4. La oferta y la demanda deben ser
iguales.
5. Las cantidades de oferta y demanda
no varían con el tiempo.
6. No considera más efectos para la
localización que los costos de
transporte.
VENTAJAS:
1. Es un método preciso.
2. Todos los datos se llevan a una
matriz oferta-demanda u origen-destino.
3. Es un método imparcial.
Demanda
Plantas W X Y Z RECURSOS
A 3 5 12 7 17
B 4 6 13 8 21
C 5 10 9 4 15
10 16 8 19 53
Plantas W X Y Z RECURSOS
A 3 5 12 7 17
B 4 6 13 8 21
C 5 10 9 4 15
10 16 8 19 53
Plantas W X Y Z RECURSOS
A 3 5 12 7 17
B 4 6 13 8 21
C 5 10 9 4 15
10 16 8 19 53
Costo mínimo = $3(10) + $5(7) + $6(9) +
$13(8) + $8(4)+ $4(15) = $30 + $35 +
$54 + $104 + $32 + $60 = $315.00