AULA 7
MÉTODOS DE PROGRAMAÇÃO INTEIRA
Autor: Anibal Tavares de Azevedo
INTRODUÇÃO À META-HEURÍSTICAS
PROBLEMAS DE PROGRAMAÇÃO INTEIRA
(Integer) Space: The last frontier
Tipo de Modelo Função Objetivo Restrições Tipo de Variável de decisão
Programação (linear) inteira (PLI ou PI)
Linear Linear Discreta
Programação (linear) inteira mista (PLIM ou PIM)
Linear Linear Discreta e contínua
Programação (linear) binária (PLB ou PB)
Linear Linear Binária
Programação (linear) binária mista (PLBM ou PBM)
Linear Linear Binária e Contínua
Programação (linear) inteira binária (PLIB ou PIB)
Linear Linear Discreta e Binária
MÉTODOS DE SOLUÇÃO EXATOS
Caio Júlio César
“Dividir para
conquistar”
4 5 6 7
2 3
1
É uma técnica de solução exata para problemas de programação binária e inteira que usa uma estratégia de divisão e conquista, isto é, o problema é dividido em subproblemas menores que podem ser descartados de acordo com os valores de limites inferiores e superiores.
BRANCH-AND-BOUND
BRANCH
BOUND Árvore de
decisão
Max Z=3x
1
+ 3x
2
S.a.: x
1
+ 4x
2
≤ 12
6x
1
+ 4x
2
≤ 24
x
1
, x
2
≥ 0
x
1
, x
2
inteiros
Função Objetivo
Restrições
Variáveis
de
Decisão
Inteiras
Max Z=3x
1
+ 3x
2
S.a.: x
1
+ 4x
2
≤ 12
6x
1
+ 4x
2
≤ 24
x
1
, x
2
≥ 0
x
1
, x
2
inteiros
Max Z=3x
1
+ 3x
2
S.a.: x
1
+ 4x
2
≤ 12
6x
1
+ 4x
2
≤ 24
x
1
, x
2
≥ 0
Função Objetivo
Problema Relaxado
Variáveis
de
Decisão
Reais
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 + 4x2 ≤ 12
0
1
RESOLUÇÃO GRÁFICA
x
2x
1APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 + 4x2 ≤ 12 6x1 + 4x2≤ 24
Região factível
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Gradiente da0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
z = 0 z = 14,4
0
1
RESOLUÇÃO GRÁFICA
x
2x
1APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (2,4; 2,4) f.o. = 14,4
Como o problema é de maximização, então, a solução do problema relaxado fornece um limite superior para o valor de solução ótima do problema linear inteiro, isto é, 14,4.
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1, x
2≥ 0
Problema Relaxado
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (2,4; 2,4)
Para aplicar o Branch-and-Bound é necessário fornecer um ponto qualquer do conjunto de soluções viáveis de modo a impor um limite
inferior no valor da função objetivo do problema linear inteiro.
Reunindo as informações de limite superior atual (LSA), de limite inferior atual (LIA) e da solução do problema relaxado (x1, x2) = (2,4; 2,4) escolhe-se uma das variáveis para ser inteira. Supondo que x1 foi escolhida, então, esta deve assumir ou o valor menor ou igual a 2 ou maior e igual a 3. Para decidir qual destes valores ela irá assumir dois novos subproblemas deverão ser resolvidos.
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1≤ 2
x
1, x
2≥ 0
Problema 2
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1≥ 3
x
1, x
2≥ 0
Problema 3
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
Os resultados obtidos para cada um dos problemas podem ser resumidos sob a forma de uma árvore de decisão:
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
Problema 2
Problema 3
x1 ≤ 2 x1 ≥ 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≤ 2 x1 ≥ 3
Problema 2
Problema 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≤ 2
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (2; 2,5) f.o. = 13,5
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
Os resultados obtidos para cada um dos problemas podem ser resumidos sob a forma de uma árvore de decisão:
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
Problema 3
x1 ≤ 2 x1 ≥ 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (3; 1,5)
f.o. = 13,5
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
Os resultados obtidos para cada um dos problemas podem ser resumidos sob a forma de uma árvore de decisão:
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
Problema 4
Problema 5
x2 ≤ 2 x2 ≥ 3
Problema 6
Problema 7
x2 ≤ 1 x2 ≥ 2
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
Problema 4
Problema 5
x2 ≤ 2 x2 ≥ 3
Problema 6
Problema 7
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1 ≤ 2
Problema 4
x2 ≤ 2
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1≤ 2
x
1, x
2≥ 0
Problema 2
x2 ≤ 2
+
0
1
RESOLUÇÃO GRÁFICA
x
2x
1APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≤ 2
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≤ 2
x2 ≤ 2
Problema 4
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Gradiente da0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (2; 2) f.o. = 12
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
Problema 5
x2 ≤ 2 x2 ≥ 3
Problema 6
Problema 7
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
Problema 5
x2 ≤ 2 x2 ≥ 3
Problema 6
Problema 7
x2 ≤ 1 x2 ≥ 2
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1 ≤ 2
Problema 5
x2 ≥ 3
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1≤ 2
x
1, x
2≥ 0
Problema 2
+
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≤ 2
Problema 2
+
Problema 5
x2 ≥ 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
1APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≤ 2
Problema 5
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Gradiente dafunção objetivo
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (1; 3)
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
Problema 6
Problema 7
x2 ≤ 1 x2 ≥ 2
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
Problema 6
Problema 7
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9 x1 ≥ 3
Problema 6 x2 ≤ 1
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1≥ 3
x
1, x
2≥ 0
Problema 3
+
x2 ≤ 1
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 3
+
Problema 6
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 6
x2 ≤ 1
0
1
RESOLUÇÃO GRÁFICA
x
2x
1APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Gradiente da0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (3,33; 1) f.o. = 13
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Problema 7
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Problema 7
x2 ≤ 1 x2 ≥ 2
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9 x1 ≥ 3
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1≥ 3
x
1, x
2≥ 0
Problema 3
+
Problema7 x2 ≥ 2
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 3
+
Problema 7
x2 ≥ 2
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 7
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9
x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Infactível
x2 ≤ 1 x2 ≥ 2
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9 x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Infactível
x2 ≤ 1 x2 ≥ 2
Problema 8
Problema 9
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9 x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Infactível
x2 ≤ 1 x2 ≥ 2
Problema 8
Problema 9
x1 ≤ 3 x1 ≥ 4
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4
LIA = 9 x1= 3,0 x2= 1,5
LSA = 12,5 LIA = 9 x1 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9 x2 ≤ 1
Problema 8 x1 ≤ 3
Max Z=3x
1+ 3x
2S.a.: x
1+ 4x
2≤ 12
6x
1+ 4x
2≤ 24
x
1≥ 3
x
1, x
2≥ 0
Problema 3
+
x2 ≤ 1
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 6
x2 ≤ 1
+
Problema 8
x1 ≤ 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
1APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 = 3
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 = 3
Ponto ótimo: (x1, x2) = (3; 1)
f.o. = 12
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9 x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Infactível
x2 ≤ 1 x2 ≥ 2
x1= 3,0
x2= 1,0
LSA = 12,0 LIA = 9
Problema 9
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9 x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Infactível
x2 ≤ 1 x2 ≥ 2
x1= 3,0
x2= 1,0
LSA = 12,0 LIA = 9
Problema 9
x1 ≤ 3 x1 ≥ 4
0
1
RESOLUÇÃO GRÁFICA
x
2x
1APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 6
x2 ≤ 1
+
Problema 9
0
1
RESOLUÇÃO GRÁFICA
x
2x
11
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
x1 ≥ 3
Problema 9
x2 ≤ 1 x1 ≥ 4
0
1
RESOLUÇÃO GRÁFICA
x
2x
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
1
2
3
4
5
6
7
8
2
3
4
5
6
7
9
10 11 12
Ponto ótimo:(x1, x2) = (4; 0)
f.o. = 12
REPRESENTAÇÃO EM ÁRVORE
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9 x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Infactível
x2 ≤ 1 x2 ≥ 2
x1= 3,0
x2= 1,0
LSA = 12,0 LIA = 9
x1= 4,0
x2= 1,0
LSA = 12,0 LIA = 9
x1 ≤ 3 x1 ≥ 4
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND - EXEMPLO 1
x1= 2,4
x2= 2,4
LSA = 14,4 LIA = 9 x1= 2,0
x2= 2,5
LSA = 12,5 LIA = 9
x1= 3,0
x2= 1,5
LSA = 12,5 LIA = 9
x1 ≤ 2 x1 ≥ 3
x1= 2,0
x2= 2,0
LSA = 12,0 LIA = 9
x1= 1,0
x2= 3,0
LSA = 12,0 LIA = 9
x2 ≤ 2 x2 ≥ 3
x1= 3,33
x2= 1,0
LSA = 13,0 LIA = 9
Infactível
x2 ≤ 1 x2 ≥ 2
x1= 3,0
x2= 1,0
LSA = 12,0 LIA = 9
x1= 4,0
x2= 1,0
LSA = 12,0 LIA = 9
1
2
4
5
3
6
7
BUSCA EM
LARGURA
1
2
3
4
5
6
7
BUSCA EM
PROFUNDIDADE
O método exato Branch-and-bound pode se diferenciar em
relação a ordem com que percorre os nós de execução dos
subproblemas. Sua busca pode:
(1) Em largura: executar todos os nós do mesmo nível;
(2) Em profundidade: criar ramos até achar uma solução.
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND – EXEMPLO 2
x1= 3,75
x2= 2,25
LSA=41,25 x1= 4,0
x2= 1,8
LSA = 41,00
Problema 3
x1 ≥ 4 x1 ≤ 3
Infactível
x1= 4,44
x2= 0
LSA=40,55
x2 ≥ 2 x2 ≤ 1
x1= 5,0
x2= 0,0
LSA = 40,0
Problema 7 x1 ≤ 3
REPRESENTAÇÃO EM ÁRVORE
x1= 3,75
x2= 2,25
LSA=41,25 x1= 4,0
x2= 1,8
LSA = 41,00
Problema 3
x1 ≥ 4 x1 ≤ 3
Infactível
x1= 4,44
x2= 0
LSA=40,55
x2 ≥ 2 x2 ≤ 1
x1= 5,0
x2= 0,0
LSA = 40,0
x1= 4,0
x2= 1,0
LSA = 37,0 x1 ≤ 3
x1 ≥ 5 x1 ≤ 4
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND – EXEMPLO 2
x1= 3,75
x2= 2,25
LSA=41,25 x1= 4,0
x2= 1,8
LSA = 41,00
Problema 3
x1 ≥ 4 x1 ≤ 3
Infactível
x1= 4,44
x2= 0
LSA=40,55
x2 ≥ 2 x2 ≤ 1
x1= 5,0
x2= 0,0
LSA = 40,0
x1= 4,0
x2= 1,0
LSA = 37,0 x1 ≤ 3
REPRESENTAÇÃO EM ÁRVORE
x1= 3,75
x2= 2,25
LSA=41,25 x1= 4,0
x2= 1,8
LSA = 41,00
x1= 5,0
x2= 0,0
LSA = 39,0
x1 ≥ 4 x1 ≤ 3
Infactível
x1= 4,44
x2= 0
LSA=40,55
x2 ≥ 2 x2 ≤ 1
x1= 5,0
x2= 0,0
LSA = 40,0
x1= 4,0
x2= 1,0
LSA = 37,0 x1 ≤ 3
x1 ≥ 5 x1 ≤ 4
REPRESENTAÇÃO EM ÁRVORE
APLICAÇÃO BRANCH-AND-BOUND – EXEMPLO 2
x1= 3,75
x2= 2,25
LSA=41,25 x1= 4,0
x2= 1,8
LSA = 41,00
x1= 5,0
x2= 0,0
LSA = 39,0
x1 ≥ 4 x1 ≤ 3
Infactível
x1= 4,44
x2= 0
LSA=40,55
x2 ≥ 2 x2 ≤ 1
x1= 5,0
x2= 0,0
LSA = 40,0
x1= 4,0
x2= 1,0
LSA = 37,0 x1 ≤ 3
Muitos problemas de programação binária e inteira são
NP-Completos, isto é, não podem ser resolvidos por método exatos
(tais como o Branch-and-Bound) em tempo polinomial em
função da alta complexidade computacional.
A Machine Company tem 4 máquinas e 4 tarefas
para serem realizadas. Cada máquina deve ser
designada para completar uma tarefa. O tempo
requerido para completar cada tarefa por cada
máquina é dado na tabela dada a seguir. A
Machine Company deseja minimizar o tempo total
de processamento para realizar as 4 tarefas.
Formule e resolva o problema de programação
linear correspondente.
x
ijMáquina
Tarefa 1
Tempo[h]
Tarefa 2
Tempo[h]
Tarefa 3
Tempo[h]
Tarefa 4
Tempo[h]
1
14
5
8
7
2
2
12
6
5
3
7
8
3
9
4
2
4
6
10
Tabela 1: Dados do problema de Designação
Utilidade(U)
Volume(V)
Razão U/V
Item
7
7
5
6
3
4
CAP. MAX = 10
CAP. USADA =
Max
S.a.:
MODELO COMPLETO GERAL
∑
=≤
n
i
i i
x
b
v
1
∑
=
n
i
i i
x
u
1