Académique Documents
Professionnel Documents
Culture Documents
Amn x = b , xi 0, xi Z
Al relajar la condicin de que las variables sean enteras y resolver el problema de P.L. continua asociado, vamos a suponer que en la solucin final las variables bsicas son las m primeras. Esto supone que la matriz de restricciones adopta la forma
E+D0 E 0
R = E1 ( x1 + e1,m +1 xm +1 + + e1,m + n xm +1 )
x2 + + a2 ,m +1 xm +1 + a2 ,m + 2 xm + 2 + + a2 ,m + n xm + n B2 xm + am ,m +1 xm +1 + am ,m + 2 xm + 2 + + am ,m + n xm + n Bm
x1 + e1,m +1 xm +1 + +e1,m + n xm +1 E1
y se resuelve el nuevo modelo. El proceso se reitera hasta que todas las soluciones sean enteras.
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
Ejemplo (I)
Max Z = 1.2 x + 1.1 y sujeto a : x + 4 y 22 8 x + 7 y 53 x 0, y 0 x , y enteros
Ejemplo (II)
a) Se resuelve el problema relajando las condiciones sobre el carcter entero de las variables. La ltima tabla del simplex es
Z + 0 x + 0 y
Ejemplo (III)
Las restricciones pueden expresarse como
7 4 + x + + 1 + h1 h2 = 2 + 0.32 25 25 8 24 y+ h1 + 1 + h2 = 4 + 0.92 25 25 x 0, y 0, h1 0, h2 0
Ejemplo (IV)
Cuando ms de un trmino independiente tiene parte decimal no nula, es usual seleccionar la restriccin con parte decimal mayor. En nuestro caso la segunda, que puede expresarse como
24 h2 = 4 y + h2 + 0.92 39
Como la parte izquierda de la igualdad es positiva, para una solucin entera habr de cumplirse que
y h2 4
Restriccin que se aade a la ltima tabla del simplex para resolver el problema de programacin lineal continua
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
Ejemplo (V)
0.4 3.7 Z + 0 x + 0 y h1 h2 + 0 h3 = 8.196 25 25 7 4 = 2.32 x + h1 + h2 25 25 8 1 = 4.92 y + h1 h2 25 25 y + h2 + h3 = 4 x 0, y 0, h1 0, h2 0, h3 0
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
Ejemplo (VI)
Preparamos la tabla para la eliminacin gaussiana de y en la ltima restriccin
Ejemplo (VII)
La solucin encontrada no es factible pues la nueva variable de holgura es negativa. Utilizamos el simplex dual para encontrar, si la hay, una solucin factible
Base Z x y h3
Z 1 0 0 0
x 0 1 0 0
y 0 0 1 0
h1 0.4 7 8 8
0.4 8
h2 3.7 4 25
h3 0 0 0 1
25
25 25 25
= 0.05
25 1 25 24 25
3.7 24
Cocientes
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
= 0.154
entra
Branch and Bound - 12
Ejemplo (VIII)
Base Z x y h1 Z 1 0 0 0 x 0 1 0 0 y 0 0 1 0 h1 0 0 0 1 h2 0.2 1 1 3 h3 0.05 0.875 1 3.125 Cotas 8.15 3.125 4 2.875
Ejemplo (IX)
La restriccin de la variable x que puede expresarse como
0.125h3 = 3 x h2 + h3 + 0.1
Como la parte izquierda de la igualdad es positiva, para una solucin entera habr de cumplirse que
x + h2 h3 4
Restriccin que se aade a la ltima tabla del simplex para resolver el problema de programacin lineal continua
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
Ejemplo (X)
x 0, y 0, h1 0, h2 0, h3 0, h4 0
Ejemplo (XI)
Preparamos la tabla para la eliminacin gaussiana de x en la ltima restriccin
0.125h3 + h4 = 0.125 x 0, y 0, h1 0, h2 0, h3 0, h4 0
La solucin encontrada no es factible pues la nueva variable de holgura es negativa. Utilizamos el simplex dual para encontrar, si la hay, una solucin factible. Entra la variable h3 en substitucin de h4.
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
Ejemplo (XII)
Base Z x y h1 h3 Z 1 0 0 0 0 x 0 1 0 0 0 y 0 0 1 0 0 h1 0 0 0 1 0 h2 0.2 1 1 3 0 h3 0 0 0 1 h4 Cotas 7 8 25 8 4 3 6 1
0 0.4 8.1
La solucin encontrada es factible. Ntese como la solucin entera est muy alejada de la continua.
Opt Z 0 = f ( x ) x R0
sujeto a :
se relajan las restricciones del modelo de forma que el modelo resultante se pueda resolver de manera ms fcil
Opt Z1 = f ( x )
P1
sujeto a : x R1 , con R0 R1
Opt Z 2 = f ( x )
P2:
sujeto a : x R2 , con R0 R2 R1
R0 Rn Rn1 R2 R1
En lneas generales, en cada fase el algoritmo selecciona uno de los subconjuntos y trata de eliminarlo de estudios posteriores como candidato a contener la solucin ptima.
La herramienta es muy flexible y permite una gran capacidad de maniobra. Pero esto mismo hace que slo la prctica sea la que permita un uso eficaz de la misma.
P0
(2.5, 4.5)
4
x
1 2 ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL 3 4 5 6
Branch and Bound - 24
En la etapa k tendremos disponibles una cota inferior z* y una lista de programas linales que difieren entre s en las cotas entre las que se encuentran las variables de decisin de cada uno de ellos.
En la etapa inicial la lista de programas contiene tan slo el programa propuesto, relajando (es decir, prescindiendo de ) la condicin de que las variables sean enteras. En cada iteracin, la tcnica se desarrollar segn el procedimiento que se describe en la siguiente diapositiva.
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
PROCEDIMIENTO
1: Si la lista de programas est vaca el proceso ha finalizado. En caso contrario seleccionar y estudiar uno de los programas contenidos en ella. 2: Resolver el programa seleccionado. Si no tiene solucin o si el valor ptimo de la funcin objetivo no es mayor que z* , z* es la cota inferior de la etapa siguiente y volvemos al paso 1. En otro caso, pasamos al paso 3. 3: Si la solucin obtenida satisface el carcter entero de las variables, se retienen dichos valores, el valor de la funcin objetivo es la nueva cota inferior y volvemos al paso 1. Si no es este el caso, se ejecuta paso 4. 4: Seleccionar una de las variables que, debiendo ser entera, no lo sea en la solucin encontrada en el paso 3. Supongamos que dicha variable es x y que su valor no entero es a. Entonces aadimos dos nuevos programas a la lista que son idnticos al programa que nos proporcion esa solucin, excepto que en uno de ellos hay una nueva restriccin que establece que la cota inferior de x es E(a) + 1 y en el otro la nueva restriccin establece que la cota superior de x es E(a). La cota inferior de Z se mantiene como referencia para estos dos nuevos programas.
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
Branch and Bound - 26
P0:
x + 5 y 25 9 x + 6 y 49.5 x 0, y 0
y
(2.5, 4.5) Con fondo amarillo el conjunto de restricciones relajado, eliminando la condicin de que x e y sean enteros.
x
1 2 ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL 3 4 5 6
Branch and Bound - 28
2) Se ramifica el problema P0 en dos direcciones segn que y 4 o y 5 , ya que no puede haber ninguna solucin entera con 4 < y < 5 . P0
y5
P1
Max Z = x +1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 5
y4
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
(0, 5)
P1
(2.5, 4.5)
4
x
ESCUELA TCNICA SUPERIOR DE INGENIERA 1 2 DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
6
Branch and Bound - 30
P0
y5
P1
Max Z = x +1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 5
y4
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
Solucin ptima : Z* = 6 x = 0, y = 5
1 Cota entera
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
P2
(2.833, 4)
x
ESCUELA TCNICA SUPERIOR DE INGENIERA 1 2 DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
P0
y5
P1
Max Z = x +1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 5
y4
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
Solucin ptima Z* = 6 x = 0, y = 5
Solucin no entera, pero superior a la cota entera encontrada. Hay que seguir ramificando.
1 Cota entera
P0
y5 P1
Max Z = x +1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 5
y4
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
Solucin ptima
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
Z* = 6 x = 0, y = 5
1 Cota entera
Solucin ptima Z * = 6. 8 x = 2, y = 4
2 Cota entera. Mejora la 1. Nueva referencia
P4
Max Z = x + 1.2 y x + 5 y 25
9 x + 6 y 49.5 x 3, y 4
x
1 ESCUELA TCNICA SUPERIOR DE INGENIERA 2 DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL 3 4 5 6
Branch and Bound - 37
P0
y5 P1
Max Z = x +1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 5
y4
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
Solucin ptima
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
Z* = 6 x = 0, y = 5
1 Cota entera
Solucin no entera mejor que la 2 cota entera obtenida. Hay que seguir ramificando
Branch and Bound - 38
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
y3
y4
P6
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 3
P5
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4, y 4
P5
Max Z = x + 1.2 y x + 5 y 25
9 x + 6 y 49.5 x 3, y 4, y 4
x
ESCUELA TCNICA SUPERIOR DE INGENIERA 1 2 DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
6
Branch and Bound - 40
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
y3
y4
P6
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 3
P5
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4, y 4
Infactible
P6
Max Z = x + 1.2 y x + 5 y 25
9 x + 6 y 49.5 x 3, y 3
(3.5, 3)
x
ESCUELA TCNICA SUPERIOR DE INGENIERA 1 2 DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
y3
y4
P6
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 3
P5
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4, y 4
Infactible
x = 3.5, y = 3
Solucin no entera mejor que la 2 cota entera obtenida. Hay que seguir ramificando
Branch and Bound - 43
P2
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
y3
y4
P6
Max ZZ = x +.1.2 y Max = x + 1 2 y x x + 5 y 25 + 5 y 25 x + 6 y 49.5 9 9 x + 6 y 49.5 x x ,3, y y 3 3 3
P5
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5
x3
x4
P7
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 3, x 3
ESCUELA TCNICA SUPERIOR DE INGENIERA DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
P8
x 3, y 4, y 4
Infactible
P7
4
(3, 3)
x
ESCUELA TCNICA SUPERIOR DE INGENIERA 1 2 DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
P2
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
Solucin ptima
Solucin entera peor que P3
y3
y4
Z * = 6.8 x = 2, y = 4
P6
Max ZZ = x +.1.2 y Max = x + 1 2 y x x + 5 y 25 + 5 y 25 x + 6 y 49.5 9 9 x + 6 y 49.5 x x ,3, y y 3 3 3
P5
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5
x3
x4
P7
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 3, x 3
P8
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 4, y 3
x 3, y 4, y 4
Infactible
P8
Max Z = x + 1.2 y x + 5 y 25
9 x + 6 y 49.5 x 4, y 3
(4, 2.25)
2
x
ESCUELA TCNICA SUPERIOR DE INGENIERA 1 2 DEPARTAMENTO DE ORGANIZACIN INDUSTRIAL
P2
x2
P3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
x3
P4
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
y3
y4
P6
Max ZZ = x +.1.2 y Max = x + 1 2 y x x + 5 y 25 + 5 y 25 x + 6 y 49.5 9 9 x + 6 y 49.5 x x ,3, y y 3 3 3
P5
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5
x3
x4
P7
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5
P8
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 4, y 3
x 3, y 4, y 4
Infactible
Finalizado el proceso de ramificacin y poda, la solucin ptima entera corresponde al subprograma P3:
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
La solucin ptima es Z * = 6. 8 x = 2, y = 4
Resumen
Z * = 7.633 x = 2.833, y = 4
Max Z = x + 1.2 y
P0
y5
P2
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 4
y4
sujeto a : x + 5 y 25 9 x + 6 y 49.5 x 0, y 0
P1
Max Z = x +1.2 y x + 5 y 25 9 x + 6 y 49.5 x 0, y 5
x2
P3
Max Z = x + 1 .2 y
P4
x3
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 4
Z* = 6 x = 0, y = 5
1 Cota entera
x + 5 y 25 9 x + 6 y 49.5 x 2, y 4
Z = 7.5 x = 3, y = 3.75
*
y3
y4
P5
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5
P6
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 3, y 3
x = 2, y = 4
2 Cota entera. Mejora la 1. Nueva referencia
x3
x4
x 3, y 4, y 4
P7
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5
P8
Max Z = x + 1.2 y x + 5 y 25 9 x + 6 y 49.5 x 4, y 3
Infactible
Z * = 6.7 x = 4, y = 2.25
Branch and Bound - 50
Z = 6.6 x = 3, y = 3
*
Z * = 7.1 x = 3.5, y = 3