PL Casos Especiales
PL Casos Especiales
CASOS ESPECIALES
1. Degeneración
Ejemplo
Maximizar u=3 x 1 +9 x 2
Sujeta a las restricciones
x 1+ 4 x 2 ≤ 8 (1)
x 1+ 2 x 2 ≤ 4 (2)
x 1 , x 2 ≥ 0 (Condición de no negatividad)
Solución gráfica
Solución con R
> coef<-c(3,9)
> A<-matrix(c(1,1,4,2),ncol=2)
> b<-c(8,4)
> dir<-rep("<=",2)
> solucion <- solveLP(coef, b, A, maximum=TRUE, dir)
> summary(solucion)
Solution
opt
1 0
2 2
> solucion <- solveLP(coef, b, A, maximum=TRUE, dir,verbose=4)
[1] "initial Tableau"
1 2 S 1 S 2 P0
1 1 4 1 0 8
2 1 2 0 1 4
Z-C -3 -9 0 0 0
BÁSICA U x1 x2 S1 S2 SOLUCIÓN
U 1 -3 -9 0 0 0
S1 0 1 4 1 0 8
S2 0 1 2 0 1 4
Pivot Column: 2 ( 2 )
Pivot Row: 1 ( 1 )
1 2 S 1 S 2 P0
2 0.25 1 0.25 0 2
2 0.50 0 -0.50 1 0
Z-C -0.75 0 2.25 0 18
Pivot Column: 1 ( 1 )
Pivot Row: 2 ( 2 )
1 2 S 1 S 2 P0
2 0 1 0.5 -0.5 2
1 1 0 -1.0 2.0 0
Z-C 0 0 1.5 1.5 18
En la primera tabla del algoritmo Simplex, observamos que en la primera iteración debe
ingresar la variable x 2 porque tiene el coeficiente más negativo. Sin embargo, al calcular la
relación mínima se presenta un empate. En la siguiente iteración una de las variables básicas
es cero. De esta forma, se obtiene una solución degenerada.
2. Óptimos alternativos
Esta situación se presenta cuando la función objetivo es paralela a una de las restricciones
Ejemplo
Maximizar u=2 x 1 +4 x 2
Sujeta a las restricciones
x 1+ 2 x 2 ≤ 5 (1)
x 1+ x2 ≤ 4 (2)
x 1 , x 2 ≥ 0 (Condición de no negatividad)
Solución gráfica
Solución con R
> coef<-c(2,4)
> A<-matrix(c(1,1,2,1),ncol=2)
> b<-c(5,4)
> dir<-rep("<=",2)
> solucion <- solveLP(coef, b, A, maximum=TRUE, dir)
> summary(solucion)
Solution
opt
1 0.0
2 2.5
Pivot Column: 2 ( 2 )
Pivot Row: 1 ( 1 )
1 2 S 1 S 2 P0
2 0.5 1 0.5 0 2.5
2 0.5 0 -0.5 1 1.5
Z-C 0.0 0 2.0 0 10.0
La existencia del óptimo alternativo se descubre en la tabla óptima por el coeficiente cero de la
variable no básica x 1
¿Cómo encontrar otras soluciones óptimas alternativas?
Se modifica el valor de las variables de decisión en la función objetivo sin modificar el valor
óptimo encontrado
Maximizar u=2 x 1 +4 x 2
2 x1 + 4 x 2=10(÷ 2)
x 1+ 2 x 2=5
Se puede elegir una variable libre porque existen dos variables y una sola ecuación (recordar
del Álgebra Lineal)
5−x 1
x 2=
2
t x1 x2
0 0 2.5
1 1 2
2 2 1.5
3 3 1
4 4 0.5
5 5 0
6 6 -0.5???
3. Solución no acotada
Se presenta cuando la región factible no está limitada y por lo tanto, la función objetivo puede
tomar valores sin límite. Una solución no acotada es un indicativo de que el modelo ha sido mal
formulado y se han dejado de tener en cuenta restricciones de importancia.
Ejemplo
x 1−x 2 ≤ 10 (1)
2 x1 ≤ 40 (2)
x 1 , x 2 ≥ 0 (Condición de no negatividad)
Solución gráfica
Solución con R
> coef<-c(2,1)
> A<-matrix(c(1,2,-1,0),ncol=2)
> b<-c(10,40)
> dir<-rep("<=",2)
> solucion <- solveLP(coef, b, A, maximum=TRUE, dir)
Error in while (min(Tab[nCon + 1, 1:(nVar + nCon)]) < -zero & iter2 < :
valor ausente donde TRUE/FALSE es necesario
Además: Warning message:
In min(decval, na.rm = TRUE) :
ningún argumento finito para min; retornando Inf
Pivot Column: 1 ( 1 )
Pivot Row: 1 ( 1 )
1 2 S 1 S 2 P0
1 1 -1 1 0 10
2 0 2 -2 1 20
Z-C 0 -3 2 0 20
Pivot Column: 2 ( 2 )
Pivot Row: 2 ( 2 )
1 2 S 1 S 2 P0
1 1 0 0 0.5 20
2 0 1 -1 0.5 10
Z-C 0 0 -1 1.5 50
Pivot Column: 3 ( S 1 )
Pivot Row: 1 ( 1 )
1 2 S 1 S 2 P0
S 1 Inf NaN NaN Inf Inf
2 Inf NaN NaN Inf Inf
Z-C Inf NaN NaN Inf Inf
Error in while (min(Tab[nCon + 1, 1:(nVar + nCon)]) < -zero & iter2 < :
valor ausente donde TRUE/FALSE es necesario
Además: Warning message:
In min(decval, na.rm = TRUE) :
ningún argumento finito para min; retornando Inf
4. Solución no factible
Ejemplo
2 x1 + x 2 ≤ 2 (1)
3 x 1+ 4 x 2 ≥ 12 (2)
x 1 , x 2 ≥ 0 (Condición de no negatividad)
Solución gráfica
Solución con R
> coef<-c(3,2)
> A<-matrix(c(2,3,1,4),ncol=2)
> b<-c(2,12)
> dir<-c("<=",">=")
> solucion <- solveLP(coef, b, A, maximum=TRUE, dir)
> summary(solucion)
Pivot Column: 2 ( 2 )
Pivot Row: 1 ( 1 )
1 2 S 1 S 2 M 2 P0
2 2 1 1 0 0 2
M 2 -5 0 -4 -1 1 4
Z-C 1 0 2 0 0 4
M Z-C 5 0 4 1 0 -4
[1] "New starting Tableau for Phase II"
1 2 S 1 S 2
2 2 1 1 0 2
M 2 -5 0 -4 -1 4
Z-C 1 0 2 0 4
Aunque R entrega una solución óptima, en el desarrollo del algoritmo crea una variable
artificial (M2). Si en la tabla óptima aparece la variable artificial con signo positivo, es un
indicativo de que no existe solución factible. La solución encontrada se conoce como pseudo
óptima