Anda di halaman 1dari 43

1

Universidad Nacional Mayor de San Marcos


Facultad de Ingeniera de Sistemas e Informtica
Investigacin Operativa I
Programacin
Lineal Entera
y Binaria y
Docente : Lic. Gabriel Solari Carbajal
Programacin
Lineal Entera
2
2
PROBLEMA 01.-
La compaa Mauser fabricante de fusiles automticos
Programacin Lineal Entera
Requerimientos unitarios
de tiempo (en horas)
H di ibl M d l M d l
La compaa Mauser, fabricante de fusiles automticos,
tiene 3 departamentos en los cuales se manufacturan
sus modelos S-1000 y S-2000, las capacidades
mensuales son las siguientes:
3
Departamento 1 4 2 1,600
Departamento 2 2.5 1 1,200
Departamento 3 4.5 1.5 1,600
Departamentos
Horas disponibles
en el siguiente mes
Modelo
S-2000
Modelo
S-1000
La utilidad del modelo S-1000 es de 40 dlares por
unidad y la del modelo S-2000 es de 10 dlares por
Programacin Lineal Entera
y p
unidad; suponiendo que la compaa puede vender
cualquier cantidad de estos productos, debido a
condiciones favorables de mercado.
Determinar el nmero de unidades de cada modelo que
se debe de fabricar de manera que se maximice la
utilidad total.
4
utilidad total.
3
SOLUCION.-
Variables de decisin
Programacin Lineal Entera
Variables de decisin
x
1
: nmero de fusiles S-1000 que la compaa
Mauser va ha fabricar.
x
2
: nmero de fusiles S-2000 que la compaa
Mauser va ha fabricar.
5
Restriccin por horas disponibles del Departamento 1:
Restricciones
Programacin Lineal Entera
Restriccin por horas disponibles del Departamento 1:
1600 x 2 x 4
2 1
+
1200 x x 5 . 2
2 1
+
Restriccin por horas disponibles del Departamento 2:
Restriccin por horas disponibles del Departamento 3:
6
1600 x 5 . 1 x 5 . 4
2 1
+
Restricciones de no negatividad:
0 x , x
2 1

Restriccin por horas disponibles del Departamento 3:
4
Funcin objetivo
Programacin Lineal Entera
2 1
x 10 x 40 Z Max + =
7
El programa queda:
Programacin Lineal Entera
sujeto a
2 1
x 10 x 40 Z Max + =
1600 x 2 x 4
2 1
+
1200 x x 5 . 2
2 1
+
1600 x 5 1 x 5 4 +
8
1600 x 5 . 1 x 5 . 4
2 1
+
0 x , x
2 1

5
Resolviendo el programa:
Programacin Lineal Entera
9
DEFINICIN 1.-
Un Problema de Programacin Lineal Entera (PPLE) es
Programacin Lineal Entera
Un Problema de Programacin Lineal Entera (PPLE) es
aquel que presenta el siguiente formato:

=
=
n
1 i
i i
x c Z Optimizar
sujeto a
10
m , , 2 , 1 j K =
0 enteros x
i

( )
j
n
1 i
i i j
b , , x a =

=
6
DEFINICIN 2.-
Definimos el equivalente continuode un PPLE como:
Programacin Lineal Entera
Definimos el equivalente continuo de un PPLE como:

=
=
n
1 i
i i
x c Z Optimizar
sujeto a
11
m , , 2 , 1 j K =
0 x
i

( )
j
n
1 i
i i j
b , , x a =

=
Decimos que el equivalente continuo es el relajamiento
del PPLE.
Programacin Lineal Entera
Un PPLE y su equivalente continuo tienen la misma
estructura, slo los diferencia el hecho de que en el
segundo, las variables no estn sujetas a valores
enteros.
12
7
CMO RESOLVER UN PPLE?
Dado un PPLE resolvemos su equivalente continuo si
Programacin Lineal Entera
Dado un PPLE, resolvemos su equivalente continuo, si
la solucin ptima resulta entera, entonces esta
solucin del equivalente continuo ser tambin la
solucin ptima del PPLE.
Si la solucin ptima del equivalente continuo tiene por
lo menos una variable cuyo valor no es entero,
entonces debemos utilizar tcnicas de Programacin
13
entonces debemos utilizar tcnicas de Programacin
Entera.
INTERPRETACIN GRFICA DEL ESPACIO DE
SOLUCIONES DE UN PPLE
Programacin Lineal Entera
Consideremos el siguiente PPLE:
y 5 x 4 Z Max + =
sujeto a
8 y x +
14
10 y x 2 +
0 enteros y , x
8
10
y
Grafiquemos
Programacin Lineal Entera
4
5
6
7
8
9
10
q
la primera
restriccin
15
1 2 3 4 5 6 7 8
1
2
3
4
x
x + y = 8
10
y
Grafiquemos
Programacin Lineal Entera
4
5
6
7
8
9
10
2x + y = 10
q
la segunda
restriccin
16
1 2 3 4 5 6 7 8
1
2
3
4
x
x + y = 8
9
10
y
Espacio de
Programacin Lineal Entera
4
5
6
7
8
9
10
p
soluciones
factibles del
equivalente
continuo
17
1 2 3 4 5 6 7 8
1
2
3
4
x
10
y
Buscando la
Programacin Lineal Entera
4
5
6
7
8
9
10
solucin
ptima del
equivalente
continuo
18
1 2 3 4 5 6 7 8
1
2
3
4
x
Z = 20
10
10
y
Programacin Lineal Entera
4
5
6
7
8
9
10
19
1 2 3 4 5 6 7 8
1
2
3
4
x
Z = 30
10
y
Solucin
Programacin Lineal Entera
4
5
6
7
8
9
10
Z = 40
ptima del
equivalente
continuo
x =0
y =8
Z =40
20
1 2 3 4 5 6 7 8
1
2
3
4
x
11
10
y
El espacio de
Programacin Lineal Entera
4
5
6
7
8
9
10
p
soluciones
factibles del
equivalente
continuo es
un conjunto
convexo
21
1 2 3 4 5 6 7 8
1
2
3
4
x
10
y
Espacio de
Programacin Lineal Entera
4
5
6
7
8
9
10
p
soluciones
factibles del
PPLE
no es un
conjunto
convexo
22
1 2 3 4 5 6 7 8
1
2
3
4
x
12
10
y
Solucin
Programacin Lineal Entera
4
5
6
7
8
9
10
Z = 40
ptima del
PPLE
x =0
y =8
Z =40
23
1 2 3 4 5 6 7 8
1
2
3
4
x
OBSERVACIONES:
1) El espacio de soluciones factibles de un PPLE est
Programacin Lineal Entera
1) El espacio de soluciones factibles de un PPLE est
formado por puntos aislados.
2) El espacio de soluciones factibles de un PPLE no es
un conjunto convexo.
3) Ya no se puede hablar de puntos extremos.
4) En el ejemplo presentado la solucin ptima del
24
4) En el ejemplo presentado, la solucin ptima del
equivalente continuo es ( x, y ) =( 0, 8 ). Como esta
solucin es entera, ser tambin solucin del PPLE.
13
QU DIFICULTADES SE PRESENTAN SI SE
REDONDEA LA SOLUCIN DE UN PPLE?
Programacin Lineal Entera
Si al resolver el equivalente continuo de un PPLE la
solucin no resulta entera y procedemos a redondear
dicha solucin se pueden presentar las siguientes
dificultades:
1) La solucin redondeada es no factible.
2) L l i d d d f tibl
25
2) La solucin redondeada es factible, pero no es
ptima.
1) La solucin redondeada es no factible.
Consideremos el siguiente PPLE:
Programacin Lineal Entera
Consideremos el siguiente PPLE:
y x Z Max + =
sujeto a
6 y x 2 +
4 y 2 x +
26
4 y 2 x +
0 enteros y , x
14
y
Grafiquemos
Programacin Lineal Entera
3
4
5
6
2x + y = 6
q
la primera
restriccin
27
1 2 3 4
1
2
x
y
Grafiquemos
Programacin Lineal Entera
3
4
5
6
2x + y = 6
q
la segunda
restriccin
28
1 2 3 4
1
2
x
x + 2y = 4
15
y
Programacin Lineal Entera
3
4
5
6
2x + y = 6
29
1 2 3 4
1
2
x
x + 2y = 4
Espacio de
Programacin Lineal Entera
1
2
y
p
soluciones
factibles del
equivalente
continuo
30
1 2 3
1
x
16
Buscando la
Programacin Lineal Entera
1
2
y
Z 1
solucin
ptima del
equivalente
continuo
31
1 2 3
1
x
Z = 1
Programacin Lineal Entera
1
2
y
32
1 2 3
1
x
Z = 2
17
Solucin
ptima del
Programacin Lineal Entera
1
2
y
Z = 3.333
p
equivalente
continuo
x =2.6666
y =0.6666
Z =3.3333
33
1 2 3
x
Solucin
Programacin Lineal Entera
1
2
y
redondeada
x =3
y =1
Z =4
solucin no
factible
34
1 2 3
1
x
18
Espacio de
Programacin Lineal Entera
1
2
y
p
soluciones
factibles del
PPLE
35
1 2 3
1
x
Solucin
Programacin Lineal Entera
1
2
y
Z = 3
ptima del
PPLE
x =3, y =0

x =2, y =1
Z =3
36
1 2 3
1
x
19
2) La solucin redondeada es factible, pero no es
ptima
Programacin Lineal Entera
p
Consideremos el siguiente PPLE:
y x 10 Z Max + =
sujeto a
12 y 4 x 3 +
37
18 y x 8 +
0 enteros y , x
y
17
18
Grafiquemos
Programacin Lineal Entera
8x + y = 18
7
8
9
10
11
12
13
14
15
16
q
las
restricciones
38 1 2 3 4
1
2
3
4
5
6
x
7
3x + 4y = 12
20
Espacio de
Programacin Lineal Entera
2
3
y
p
soluciones
factibles del
equivalente
continuo
39
1 2 3
1
x
Solucin
Programacin Lineal Entera
2
3
y
ptima del
equivalente
continuo
x =2.25
y =0.00
Z =22.5
40
1 2 3
1
x
21
Solucin
Programacin Lineal Entera
2
3
y
redondeada
x =2
y =0
Z =20
solucin no
ptima
41
1 2 3
1
x
Espacio de
Programacin Lineal Entera
2
3
y
p
soluciones
factibles del
PPLE
42
1 2 3
1
x
22
Solucin
Programacin Lineal Entera
2
3
y
ptima del
PPLE
x =2
y =1
Z =21
43
1 2 3
1
x
SOLUCION DE UN PPLE
TECNICA DE RAMIFICACION Y ACOTAMIENTO
Programacin Lineal Entera
TECNICA DE RAMIFICACION Y ACOTAMIENTO
Esta tcnica consiste en insertar restricciones en el
problema original (ACOTAMIENTO) y resolviendo por el
mtodo SIMPLEX se obtienen soluciones ptimas, con
las cuales se construye un rbol de decisin
(RAMIFICACION) siguiendo la direccin del rbol con el
mejor valor ptimo obtenido hasta el momento
44
mejor valor ptimo obtenido hasta el momento.
23
PROCEDIMIENTO.-
1) Resolver el equivalente continuo del PPLE esto
Programacin Lineal Entera
1) Resolver el equivalente continuo del PPLE, esto
puede dar lugar a las siguientes posibilidades:
a) Si la solucin ptima obtenida es entera
entonces fin del proceso, esta ser la solucin
del PPLE.
45
b) En caso contrario tomamos una de las
variables cuyo valor no es entero y generamos
Programacin Lineal Entera
y y g
dos restricciones.
Por ejemplo, supongamos que
) r ( r x =
r
46
[ ] r x [ ] 1 r x +
donde [r] es el mximo entero de r.
24
2) Resolver el equivalente continuo insertando la
restriccin x [r] y ubicamos el resultado en una de
Programacin Lineal Entera
y
las ramificaciones.
Luego resolvemos el equivalente continuo
considerando slo la segunda restriccin x [r] + 1
y ubicamos el resultado en la otra ramificacin.
3) Si alguna solucin obtenida es entera y no existe
ramificacin con algn valor ptimo mejor entonces
47
ramificacin con algn valor ptimo mejor, entonces
fin del proceso.
En caso contrario continuar con el paso 1 en la
ramificacin que tenga el mejor valor ptimo hasta
el momento.
Ejemplo.-
Resolver el siguiente PPLE
Programacin Lineal Entera
Resolver el siguiente PPLE
y 4 x 3 Z Max + =
sujeto a
18 y 3 x 2 +
56 y 7 x 8 +
48
56 y 7 x 8 +
0 enteros y , x
25
y
Programacin Lineal Entera
Acotando y
ramificando x
3
4
5
6
x = 4.2
y = 3.2
Z = 25.4
49
1 2 4 3 5 6 7
1
2
x
Programacin Lineal Entera
x = 4.2
y = 3.2
x = 4
y = 3.333
Z = 25.33
4 x
50
y
Z = 25.4
x = 5
y = 2.286
Z = 24.14
5 x
26
y
Programacin Lineal Entera
Acotando y
ramificando y
3
4
5
6
x = 4
y = 3.333
Z = 25.33
x = 5
y = 2.286
Z 24 14
desde el
mejor valor
ptimo
51
1 2 4 3 5 6 7
1
2
x
Z = 24.14
x = 4
y = 3
Z 24
3 y
Programacin Lineal Entera
x = 4.2
y = 3.2
x = 4
y = 3.333
Z = 25.33
Z = 24
x = 3
y = 4
Z = 25
4 x
4 y
52
y
Z = 25.4
x = 5
y = 2.286
Z = 24.14
5 x
27
y
Programacin Lineal Entera
x = 3
El mejor valor
ptimo
3
4
5
6
x = 5
y = 4
Z = 25
x = 4
y = 3
Z = 24
resulta Z=25
53
1 2 4 3 5 6 7
1
2
x
y = 2.286
Z = 24.14
Observacin.-
1) La solucin ptima es: x = 3, y = 4, Z = 25.
Programacin Lineal Entera
y 4 x 3 Z Max + =
sujeto a
18 y 3 x 2 +
1) La solucin ptima es: x 3, y 4, Z 25.
2) A medida que aumentamos de nivel, el valor de la
F.O. no mejora.
3) El problema resuelto con el mtodo simplex fue:
54
18 y 3 x 2 +
56 y 7 x 8 +
0 y , x
4 x
4 y
28
PROBLEMA 02.-
Una compaa de transportes tiene 10 camiones
Programacin Lineal Entera
Una compaa de transportes tiene 10 camiones
grandes con capacidad de 40000 libras cada uno y 5
camiones pequeos con capacidad de 30000 libras
cada uno.
Los camiones grandes tienen un costo de operacin de
$30/milla y los pequeos $25/milla.
55
Para la prxima semana la compaa debe transportar
400000 libras de malta en un recorrido de 800 millas.
La posibilidad de otros compromisos significa que por
cada 2 camiones pequeos mantenidos en reserva,
Programacin Lineal Entera
p q
debe quedarse por lo menos uno de los grandes.
Determine el nmero ptimo de camiones a utilizar.
56
29
SOLUCION.-
Variables de decisin
Programacin Lineal Entera
Variables de decisin
G : nmero de camiones GRANDES a utilizar en el
transporte.
P : nmero de camiones PEQUEOS a utilizar en el
transporte.
57
Restriccin por cantidad a transportar:
Restricciones
Programacin Lineal Entera
Restriccin por cantidad a transportar:
400 30 40 + P G
10 G
Restriccin por nmero de camiones grandes:
Restriccin por nmero de camiones pequeos:
58
5 P
Restriccin por nmero de camiones pequeos:
30
Restricciones
Restricciones de camiones en reserva:
Programacin Lineal Entera
Restricciones de camiones en reserva:
2
10
5

G
P
G P 2 20 5
15 2 P G
59
0 , enteros P G
Restriccin por no negatividad
Funcin objetivo
Programacin Lineal Entera
P G Z Min ) 800 ( 25 ) 800 ( 30 + =
60
31
El programa queda:
Programacin Lineal Entera
sujeto a
P G Z Min 20000 24000 + =
400 30 40 + P G
10 G
61
5 P
15 2 P G
0 , enteros P G
NO
FACTIBLE
2 P
Programacin Lineal Entera
G = 8.5
P = 2
G = 8
P = 2.666
Z = 245333.3
G = 7.75
P = 3
Z = 246000
G = 7
P = 4
Z = 248000
8 G
3 P
7 G
62
Z = 24400
G = 9
P = 3
Z = 276000
G = 8
P = 3
Z = 252000
9 G
8 G
32
Observacin.-
1) La solucin ptima es: G = 7, P = 4, Z = 24800
Programacin Lineal Entera
sujeto a
1) La solucin ptima es: G 7, P 4, Z 24800
2) El problema resuelto con el mtodo simplex fue:
P G Z Min 20000 24000 + =
400 30 40 + P G 8 G
63
10 G
5 P
15 2 P G
0 , P G
7 G
3 P
Programacin
Lineal Binaria
64
33
PROBLEMA 03.-
Una compaa tiene que escoger un conjunto de
Programacin Lineal Binaria
Una compaa tiene que escoger un conjunto de
proyectos de la siguiente lista para un horizonte de
planeacin de 3 aos.
Su objetivo es maximizar el Valor Presente Neto Total,
pero sin gastar ms de lo presupuestado en cualquiera
de los 3 aos.
65
Unidad monetaria: $ 1000.
AO 1 AO 2 AO 3
PROYECTO
REINVERSIONES
VALOR
PRESENTE
NETO
Programacin Lineal Binaria
1 30 80 10 80
2 40 70 50 96
3 50 60 70 88
4 60 60 10 92
5 70 40 10 76
6 20 30 90 87
66
7 20 50 20 78
8 25 80 60 81
9 40 20 15 94
PRESUPUESTO 300 320 220
34
Unidad monetaria: $ 1000.
Adems se dan las siguientes condiciones:
Programacin Lineal Binaria
Adems se dan las siguientes condiciones:
a) La compaa debe escoger de todas maneras uno
de los proyectos 1 o 9, (o ambos).
b) Si el proyecto 6 es seleccionado, entonces el
proyecto 8 tambin debe ser seleccionado.
c) Los proyectos 1 y 3 no deben ser seleccionados a
67
c) Los proyectos 1 y 3 no deben ser seleccionados a
la vez.
SOLUCION:
Variables de decisin:
Programacin Lineal Binaria
Variables de decisin:

=
0
1
Pi
si el Proyecto i es seleccionado
en caso contrario
i =1, 2, 3, ...., 9
68
35
Restricciones:
Por presupuesto
Programacin Lineal Binaria
Por presupuesto
30P1+40P2+50P3+60P4+70P5+20P6+20P7+25P8+40P9 300
80P1+70P2+60P3+60P4+40P5+30P6+50P7+80P8+20P9 320
10P1+50P2+70P3+10P4+10P5+90P6+20P7+60P8+15P9 220
Por seleccin del proyecto 1 o 9
P1+P9 1
69
Por posible seleccin de los proyectos 6 y 8
P6- P8 0
Por la no seleccin de los proyectos 1 y 3 a la vez
P1+P3 1
Programacin Lineal Binaria
Por binarios
P1, P2, P3, P4, P5, P6, P7, P8, P9binarios{0,1}
Funcin objetivo:
Maximizamos el Valor presente Neto
70
MaxZ= 80P1+96P2+88P3+92P4+76P5+87P6+78P7+81P8+94
P9
36
Programacin Lineal Binaria
SOLUCION DE UN PROBLEMA DE
PROGRAMACION LINEAL BINARIA (PPLB).- ( )
Los Problemas de Programacin Lineal Binaria (PPLB)
tiene la forma general de los PPL pero las variables
slo pueden tomar valores binarios (0,1).
Para resolver un PPLB se puede utilizar los siguientes
mtodos:
71
1) Mtodo de la Revisin Exhaustiva
2) MtodoAditivo de Egon Balas
Programacin Lineal Binaria
MTODO DE LA REVISN EXHAUSTIVA
Este no es un mtodo propiamente dicho Dado que las Este no es un mtodo propiamente dicho. Dado que las
variables slo toman valores {0,1} pueden revisarse
todas las soluciones y determinar la solucin ptima por
comparacin. El nmero de soluciones posibles esta
dado por 2
n
donde nes el nmero de variables.
72
37
Programacin Lineal Binaria
Ejemplo:
MinZ=5x
1
+7x
2
+10x
3
+3x
4
+x
5
Min Z 5 x
1
7 x
2
10 x
3
3 x
4
x
5
Sujetoa
- x
1
+3x
2
+5x
3
- x
4
+4x
5
4
2x
1
- 6x
2
+3x
3
+2x
4
- 2x
5
0
x
2
- 2x
3
+ x
4
+ x
5
1
x
i
={0,1} i =1, 2, 3, 4, 5
P t ti 2
5
32 l i ibl
73
Para este caso se tiene 2
5
=32 soluciones posibles,
algunas soluciones sern no factibles, pero en este
mtodo se deben revisar la totalidad de soluciones. Las
soluciones factibles sern evaluadas en la funcin
objetivo.
Programacin Lineal Binaria
Soluciones posibles:
SOLUCIONES SOLUCIONES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
x
1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
x
2
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
x
3
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
x
4
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
x
5
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Factible No Si No Si No No No No Si No Si No No No No No No Si No No No No No No Si No Si No No No No No
Z - 1 - 4 - - - - 7 - 10 - - - - - - 6 - - - - - - 12 - 15 - - - - -
74
La solucin es x
1
=0, x
2
=0, x
3
=0, x
4
=0, x
5
=1y Z=1.
38
Programacin Lineal Binaria
MinZ=8x +7x +6x +5x +x
Ejemplo:
Min Z =8 x
1
+7 x
2
+6 x
3
+5 x
4
+x
5
Sujetoa
- 6x
1
- 3x
2
+2x
3
- 4x
4
- x
5
- 3
- 4x
1
- 5x
2
- 4x
3
- 3x
4
+3x
5
-7
x
i
={0,1} i =1, 2, 3, 4, 5
75
Programacin Lineal Binaria
SOLUCIONES
Soluciones posibles:
SOLUCIONES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
x
1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
x
2
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
x
3
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
x
4
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
x
5
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Factible No No No No No No No No No No Si No No No Si Si No No Si No Si No Si Si Si No Si Si Si Si Si Si
Z - - - - - - - - - - 12 - - - 18 19 - - 13 - 14 - 19 20 15 - 20 21 21 22 26 27
76
La solucin es x
1
=0, x
2
=1, x
3
=0, x
4
=1, x
5
=0y Z=12.
39
Programacin Lineal Binaria
MaxZ=3x +2x 5x 2x +3x
Ejemplo:
Max Z =3 x
1
+2 x
2
- 5 x
3
- 2 x
4
+3 x
5
Sujetoa
x
1
+ x
2
+ x
3
+2x
4
+ x
5
4
7x
1
+3x
3
- 4x
4
+3x
5
8
11x
1
- 6x
2
+ 3x
4
- 3x
5
3
x
i
={0,1} i =1, 2, 3, 4, 5
77
Programacin Lineal Binaria
SOLUCIONES
Soluciones posibles:
SOLUCIONES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
x
1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
x
2
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
x
3
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
x
4
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
x
5
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Factible No No Si No No No Si No No No No No No No No No Si No Si Si No No Si No Si No Si No No No No No
Z - - -2 - - - -7 - - - - - - - - - 3 - 1 4 - - -4 - 5 - 3 - - - - -
78
La solucin es x
1
=1, x
2
=1, x
3
=0, x
4
=0, x
5
=0y Z=5.
40
Programacin Lineal Binaria
MTODO ADITIVO DE EGON BALAS
El mtodo se basa en resolver un modelo de El mtodo se basa en resolver un modelo de
minimizacin con coeficientes positivos en la funcin
objetivo, de manera que se utilice el menor nmero de
variables a fn de minimizar el valor ptimo de la funcin
objetivo.
INFACTIBILIDAD.-
79
Llamaremos infactibilidad al intervalo que produce una
solucin aplicada sobre una restriccin, o un conjunto
de stas, y mide la distancia de la solucin sobre un
resultado factible.
Programacin Lineal Binaria
Ejemplo.-
Dado el siguiente conjunto de restricciones: Dado el siguiente conjunto de restricciones:
1 x x 3 x 2
3 2 1
+
1 x 2 x x
3 2 1
+
La solucin x
1
=0, x
2
=1y x
3
=0, produce:
0 3 1 2
0 0 1 1 I f tibilid d 0
Infactibilidad 0
Infactibilidad =0+0 =0
80
0 0 1 1 Infactibilidad 0
La solucin x
1
=1, x
2
=0y x
3
=0, produce:
0 1 1 2
0 2 1 1
actb dad 0 0 0
Infactibilidad 1
Infactibilidad 2
Infactibilidad =1+2 =3
41
PROCEDIMIENTO:
1) La funcin objetivo debe ser de Minimizacin en
Programacin Lineal Binaria
1) La funcin objetivo debe ser de Minimizacin, en
caso de Maximizacin, usar la regla de equivalencia:
Maximizar ( Z) =Minimizar ( W=-Z)
Ejemplo:
2 1
x 10 x 40 Z Max =
81
2 1
x 10 x 40 W Min + =
Una vez determinada la solucin debe restablecerse
la funcin objetivo original.
Programacin Lineal Binaria
2) Los coeficientes de la funcin objetivo deben ser no
negativos, si algn c
i
es negativo, entonces se g g
i
g
cambia x
i
por su complemento:
i i
x 1 x =
El cambio de la variable por su complemento,
tambin debe efectuarse en todas las restricciones
donde participa la variable.
82
2 1
x 10 x 40 W Min + =
2 1
x 10 ) x 1 ( 40 W Min + =
40 x 10 x 40 W Min
2 1
+ =
2 1
x 10 x 40 W Min + =
42
Programacin Lineal Binaria
Una vez determinada la solucin deben
restablecerse las variables originales. g
3) Evaluar las restricciones tomando las variables el
valor cero. Evaluar la infactibilidad, si resulta cero,
es la solucin ptima.
4) Aadir una variable x
i
= 1 al conjunto solucin y
evaluar la infactibilidad.
) Si l i f ibilid d l l l i
83
5) Si algunas infactibilidades resultan cero, la solucin
ptima ser la solucin que tenga menor valor
ptimo y fin del proceso. En caso contrario
seleccionar la de menor infactibilidad y regresar al
paso 4.
Programacin Lineal Binaria
Ejemplo:
MinZ=5x
1
+7x
2
+10x
3
+3x
4
+x
5
Min Z 5 x
1
7 x
2
10 x
3
3 x
4
x
5
Sujetoa
- x
1
+3x
2
+5x
3
- x
4
+4x
5
4
2x
1
- 6x
2
+3x
3
+2x
4
- 2x
5
0
x
2
- 2x
3
+ x
4
+ x
5
1
x
i
={0,1} i =1, 2, 3, 4, 5
84
43
x
1
+3x
2
+5x
3
x
4
+4x
5
4 0
2x
1
6x
2
+3x
3
+2x
4
2x
5
0
x
2
+2x
3
x
4
x
5
+1 0
1a) x
1
=0, x
2
=0, x
3
=0, x
4
=0, x
5
=0
0 4
Infactibilidad0
0 0
Infactibilidad0
Infactibilidad=0+0+1=1
0 1 Infactibilidad1
2a) x
1
=1, x
2
=0, x
3
=0, x
4
=0, x
5
=0
0 5
0 2
Infactibilidad2
Infactibilidad0
Infactibilidad=0+2+1=3
0 1 Infactibilidad1
85
0 1 Infactibilidad1
2b) x
1
=0, x
2
=1, x
3
=0, x
4
=0, x
5
=0
0 1
0 6
Infactibilidad0
Infactibilidad0
Infactibilidad=0+0+0=0
0 0
Infactibilidad0 Z = 7
2c) x
1
=0, x
2
=0, x
3
=1, x
4
=0, x
5
=0
0 1
0 3
Infactibilidad3
Infactibilidad1
Infactibilidad=1+3+3=7
0 3 Infactibilidad3
2d) x
1
=0, x
2
=0, x
3
=0, x
4
=1, x
5
=0 d)
1
0,
2
0,
3
0,
4
,
5
0
0 5
0 2
Infactibilidad2
Infactibilidad0
Infactibilidad=0+2+0=2
0 0 Infactibilidad0
2e) x
1
=0, x
2
=0, x
3
=0, x
4
=0, x
5
=1
0 0
Infactibilidad0
86
0 2
Infactibilidad0 Infactibilidad=0+0+0=0
0 0
Infactibilidad0
Z = 1
Solucin ptima x
1
=0, x
2
=0, x
3
=0, x
4
=0y x
5
=1para
Z=1. Se revisaron 6 soluciones. (Menor que 32).

Anda mungkin juga menyukai