Aula 07: Análise de sensibilidade (2) · / 12/ 29 Túlio Toffolo — Otimização Linear e Inteira...
Transcript of Aula 07: Análise de sensibilidade (2) · / 12/ 29 Túlio Toffolo — Otimização Linear e Inteira...
BCC464/PCC174 — 2018/2Departamento de Computação — UFOP
Túlio A. M. Toffolohttp://www.toffolo.com.br
Otimização Linear e InteiraAula 07: Análise de sensibilidade (2)
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Previously…
Aulas anteriores:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Dualidade
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Análise de Sensibilidade (ou Interpretação Econômica)
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Revisão do Método de Duas Fases
Hoje:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Exercícios
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Análise de sensibilidade
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Exemplos
�2
Exercício (conferir resultados)
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
ExercícioExercício
Exercício1 Resolva o PL abaixo e seu dual utilizando o método
Simplex:
min. x1+ x2
s.a. 2x1+ 5x2 � 105x1+ 3x2 � 4x1, x2 � 0
21 / 34 Túlio Toffolo – Otimização Linear e Inteira – Aula 03: Simplex e Modelagem
�4
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Utilize o gurobi para conferir o tableau ótimo do Simplex
Revisão de Conceitos
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Transformação Primal x Dual
MIN
Restrição≤ ≤
Variável
MAX
= qq.≥ ≥
Variável≤ ≥
Restriçãoqq. =≥ ≤
�6
/ 12/ 27 Túlio Toffolo — Otimização Linear e Inteira — Aula 09: Revisão
Formas canônica e padrão
!7
Ou ainda, considerando-se separadamente as forma padrão e canônica:
TABELA 4.2 FORMA PADRÃO E CANÔNICA
Primal Dual
Forma Canônica
Min z = cx
sujeito a:Ax ! bx ! 0
Max w = ub
sujeito a:uA " cu ! 0
Forma Padrão
Min z = cx
sujeito a:Ax = b
x ! 0
Max w = ub
sujeito a:uA " cu # R
4.2 – EXEMPLOS DE PARES PRIMAL X DUALExemplo 1: Determinar o dual do seguinte modelo de programação linear:
(P) Maximizar z = 6 x1 + 2 x2 + x3
sujeito a:
x1 – x2 + 7 x3 " 4
2 x1 + 3 x2 + x3 " 5
x1 ! 0 , x2 ! 0 , x3 ! 0
Aplicando as regras da dualidade temos que:
(D) Minimizar w = 4 u1 + 5 u2
sujeito a:
u1 + 2 u2 ! 6
– u1 + 3 u2 ! 2
7 u1 + u2 ! 1
u1 ! 0 , u2 ! 0
Exemplo 2: Determinar o dual do seguinte modelo de programação linear, representando graficamenteambos os modelos.
(P) Maximizar z = 3 x1 + 4 x2
sujeito a:
x1 – x2 " – 1
– x1 + x2 " 0
x1 ! 0 , x2 ! 0
D U A L I D A D E E S E N S I B I L I D A D E 1 3 1
Forma Canônica
Forma Padrão
Ou ainda, considerando-se separadamente as forma padrão e canônica:
TABELA 4.2 FORMA PADRÃO E CANÔNICA
Primal Dual
Forma Canônica
Min z = cx
sujeito a:Ax ! b
x ! 0
Max w = ub
sujeito a:uA " c
u ! 0
Forma Padrão
Min z = cx
sujeito a:Ax = b
x ! 0
Max w = ub
sujeito a:uA " c
u # R
4.2 – EXEMPLOS DE PARES PRIMAL X DUALExemplo 1: Determinar o dual do seguinte modelo de programação linear:
(P) Maximizar z = 6 x1 + 2 x2 + x3
sujeito a:
x1 – x2 + 7 x3 " 4
2 x1 + 3 x2 + x3 " 5
x1 ! 0 , x2 ! 0 , x3 ! 0
Aplicando as regras da dualidade temos que:
(D) Minimizar w = 4 u1 + 5 u2
sujeito a:
u1 + 2 u2 ! 6
– u1 + 3 u2 ! 2
7 u1 + u2 ! 1
u1 ! 0 , u2 ! 0
Exemplo 2: Determinar o dual do seguinte modelo de programação linear, representando graficamenteambos os modelos.
(P) Maximizar z = 3 x1 + 4 x2
sujeito a:
x1 – x2 " – 1
– x1 + x2 " 0
x1 ! 0 , x2 ! 0
D U A L I D A D E E S E N S I B I L I D A D E 1 3 1
/ 12/ 27 Túlio Toffolo — Otimização Linear e Inteira — Aula 09: Revisão
Formas canônica e padrão
!8
Ou ainda, considerando-se separadamente as forma padrão e canônica:
TABELA 4.2 FORMA PADRÃO E CANÔNICA
Primal Dual
Forma Canônica
Min z = cx
sujeito a:Ax ! bx ! 0
Max w = ub
sujeito a:uA " cu ! 0
Forma Padrão
Min z = cx
sujeito a:Ax = b
x ! 0
Max w = ub
sujeito a:uA " cu # R
4.2 – EXEMPLOS DE PARES PRIMAL X DUALExemplo 1: Determinar o dual do seguinte modelo de programação linear:
(P) Maximizar z = 6 x1 + 2 x2 + x3
sujeito a:
x1 – x2 + 7 x3 " 4
2 x1 + 3 x2 + x3 " 5
x1 ! 0 , x2 ! 0 , x3 ! 0
Aplicando as regras da dualidade temos que:
(D) Minimizar w = 4 u1 + 5 u2
sujeito a:
u1 + 2 u2 ! 6
– u1 + 3 u2 ! 2
7 u1 + u2 ! 1
u1 ! 0 , u2 ! 0
Exemplo 2: Determinar o dual do seguinte modelo de programação linear, representando graficamenteambos os modelos.
(P) Maximizar z = 3 x1 + 4 x2
sujeito a:
x1 – x2 " – 1
– x1 + x2 " 0
x1 ! 0 , x2 ! 0
D U A L I D A D E E S E N S I B I L I D A D E 1 3 1
Forma Canônica
Forma Padrão
Ou ainda, considerando-se separadamente as forma padrão e canônica:
TABELA 4.2 FORMA PADRÃO E CANÔNICA
Primal Dual
Forma Canônica
Min z = cx
sujeito a:Ax ! b
x ! 0
Max w = ub
sujeito a:uA " c
u ! 0
Forma Padrão
Min z = cx
sujeito a:Ax = b
x ! 0
Max w = ub
sujeito a:uA " c
u # R
4.2 – EXEMPLOS DE PARES PRIMAL X DUALExemplo 1: Determinar o dual do seguinte modelo de programação linear:
(P) Maximizar z = 6 x1 + 2 x2 + x3
sujeito a:
x1 – x2 + 7 x3 " 4
2 x1 + 3 x2 + x3 " 5
x1 ! 0 , x2 ! 0 , x3 ! 0
Aplicando as regras da dualidade temos que:
(D) Minimizar w = 4 u1 + 5 u2
sujeito a:
u1 + 2 u2 ! 6
– u1 + 3 u2 ! 2
7 u1 + u2 ! 1
u1 ! 0 , u2 ! 0
Exemplo 2: Determinar o dual do seguinte modelo de programação linear, representando graficamenteambos os modelos.
(P) Maximizar z = 3 x1 + 4 x2
sujeito a:
x1 – x2 " – 1
– x1 + x2 " 0
x1 ! 0 , x2 ! 0
D U A L I D A D E E S E N S I B I L I D A D E 1 3 1
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
DualidadeThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Relações entre o primal e o dual:
�9
Ótimo Ilimitado Inviável
Ótimo Possível Nunca Nunca
Ilimitado Nunca Nunca Possível
Inviável Nunca Possível Possível
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Shadow PriceThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Também conhecido como custo dual
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
O shadow price de uma restrição é o valor que a variável dual referente à restrição assume.
Indica o ganho na função objetivo por unidade aumentada no RHS da restrição.O ganho é válido dentro dos limites estabelecidos pelo RHS da restrição.
�10
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Custo Reduzido
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
O custo reduzido de uma variável é o custo (coeficiente) dela na linha da função objetivo no tableau do Simplex
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
�11
Após Pivoteamento: Nova SBF
0: 5x2 + 10x5 + 10x6 = 280 z = 280
1: � 2x2 + x4 + 2x5 � 8x6 = 24 x4 = 24
2: � 2x2 + x3 + 2x5 � 4x6 = 8 x3 = 8
3: x1 + 1, 25x2 + � 0, 5x5 + 1, 5x6 = 4 x1 = 4
4: x2 + x7 = 5 x7 = 5
Função objetivo: max z = �5x2 � 10x5 � 10x6
Não há mais variáveis atrativas
SOLUÇÃO ÓTIMA (x1, . . . , x3): (2 , 0 , 8)BASE ÓTIMA (x1, . . . , x7): (2 , 0 , 8 , 24 , 0 , 0 , 5)
41 / 48 Túlio Toffolo – Otimização Linear e Inteira – Aula 02: Algoritmo Simplex
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
O custo reduzido é também o shadow price das restrições de não-negatividade
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Variáveis de Folga
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
As variáveis de folga indicam restrições ativas e inativas
�12
Após Pivoteamento: Nova SBF
0: 5x2 + 10x5 + 10x6 = 280 z = 280
1: � 2x2 + x4 + 2x5 � 8x6 = 24 x4 = 24
2: � 2x2 + x3 + 2x5 � 4x6 = 8 x3 = 8
3: x1 + 1, 25x2 + � 0, 5x5 + 1, 5x6 = 4 x1 = 4
4: x2 + x7 = 5 x7 = 5
Função objetivo: max z = �5x2 � 10x5 � 10x6
Não há mais variáveis atrativas
SOLUÇÃO ÓTIMA (x1, . . . , x3): (2 , 0 , 8)BASE ÓTIMA (x1, . . . , x7): (2 , 0 , 8 , 24 , 0 , 0 , 5)
41 / 48 Túlio Toffolo – Otimização Linear e Inteira – Aula 02: Algoritmo Simplex
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
As restrições ativas (com variáveis de folga iguais a zero) são as únicas limitando o lucro.
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Allowable increase/decreaseThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Indica o aumento/redução permitidos em coeficientes da função objetivo ou no RHS de uma restrição sem que a base deixe de ser ótima!
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
O cálculo é feito tomando como base o custo reduzido (de variáveis primais e duais).
Regra geral:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Pequenas modificações nos dados geralmente não alteram o conjunto de variáveis básicas.
�13
Shadow price e limites
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Exercício da aula passada:
max.
s.a.
Exemplo: O Problema da Dieta
Minimizar: 32u1+36u2 (6)
Sujeito a: 8u1+ 6u2 3 (7)4u1+ 6u2 2, 5 (8)u1 � 0 (9)
u2 � 0 (10)
22 / 31 Túlio Toffolo – Otimização Linear e Inteira – Aula 01: Introdução
Exemplo: O Problema da Dieta
Minimizar: 3x1+2, 5x2 (1)
Sujeito a: 8x1+ 4x2 � 32 (2)6x1+ 6x2 � 36 (3)x1 � 0 (4)
x2 � 0 (5)
21 / 30 Túlio Toffolo – Otimização Linear e Inteira – Aula 01: Introdução
min.
s.a.
PL Primal PL Dual
�15
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Shadow priceThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Suponha que a formulação está na forma padrão e que nós vamos alterar o RHS da primeira restrição:
�16
8x1 + 4x2 − x2 = 32
8x1 + 4x2 − x2 = 31The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Resolver o problema todo de novo dá muito trabalho… Podemos calcular o impacto usando o shadow price
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Shadow priceThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Reduzir o RHS em uma unidade equivale a permitir que a variável de folga assuma valor -1 no problema original…
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
O que ocorre com a função objetivo quando a variável de folga assume este valor?
Para descobrir olhamos para a base ótima!(ou alternativamente, para o valor dual)
�17
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Resolvendo o PL PrimalThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Tableau ótimo do problema primal:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Note que as variáveis de folga são não básicas:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Mas se fizermos então o valor da função objetivo diminui em 1 / 3
�18
Base X1 X2 X3 X4
Z 0 0 1 / 8 1 / 3 -16
X1 1 0 -1 / 4 1 / 6 2
X2 0 1 1 / 4 -1 / 3 4
x4 = − 1x3 = x4 = 0
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Resolvendo o PL PrimalThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Logo, onde encontrar o shadow price?
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
No tableau ótimo do problema (para uma solução básica):
�19
Base X1 X2 X3 X4
Z 0 0 1 / 8 1 / 3 -16
X1 1 0 -1 / 4 1 / 6 2
X2 0 1 1 / 4 -1 / 3 4
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Relação entre shadow price, custo reduzido e o problemaThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Lembrem que a cada iteração do simplex nós transformamos o tableau por meio de operações de soma/subtração de múltiplos das outras linhas…
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Logo, a forma final da função objetivo pode ser obtida subtraindo múltiplos das restrições originais do problema!
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Como as variáveis de folga aparecem só uma vez (e com coeficiente 1) em uma restrição… Podemos dizer que:
portanto:
�20
c̄n +i = 0 − πic̄n +i = − πi = − yi
Os custo reduzidos sãoIguais aos multiplicadores!!!
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Relação entre shadow price, custo reduzido e o problemaThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Os multiplicadores podem ser utilizados para obtermos os coeficientes do tableau ótimo rapidamente…
�21
The multiples can be used to obtain every objective coefficient in the final form.
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Variações nos coeficientes da função objetivo
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Quanto podemos mudar os coeficientes da função objetivo sem modificar os valores das variáveis de uma solução ótima?
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Podemos fazer a mudança uma de cada vez…The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Mas… até quanto podemos mudar?
�22
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Variações nos coeficientes da função objetivoThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Quanto podemos mudar os coeficientes da função objetivo sem modificar os valores das variáveis de uma solução ótima?
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Faremos a mudança uma de cada vez, mantendo os coeficientes do RHS como constantes… Até quando podemos variar?
�23
Base X1 X2 X3 X4
Z 0 0 1 / 8 - Δ 1 / 3 -16
X1 1 0 -1 / 4 1 / 6 2
X2 0 1 1 / 4 -1 / 3 4
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Variações no RHS das restriçõesThe football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Até quanto podemos variar o RHS e o shadow price continua válido???
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Simples: enquanto a solução básica for viável ;)É simples porque não alteramos os custos reduzidos
�24
Base X1 X2 X3 X4
Z 0 0 1 / 8 1 / 3 -16
X1 1 0 -1 / 4 1 / 6 2
X2 0 1 1 / 4 -1 / 3 4
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Exemplo:The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Exemplo: ganha-se 4 unidades por aumento na segunda restrição do problema abaixo, já que no seu dual
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Até que valor de RHS este shadow price permanece válido?
�25
x2 = 4
Exemplo: O Problema da Dieta
Minimizar: 32u1+36u2 (6)
Sujeito a: 8u1+ 6u2 3 (7)4u1+ 6u2 2, 5 (8)u1 � 0 (9)
u2 � 0 (10)
22 / 31 Túlio Toffolo – Otimização Linear e Inteira – Aula 01: Introdução
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Exemplo:The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Sabemos que a função objetivo melhora 4 unidades por unidade aumentada (valor de delta) na restrição
Na forma padrão:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Isto equivale a reduzir o valor da variável , isto é, fazer:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Temos, portanto, que fazer estas substituições no tableau da solução ótima… Isto é:
�26
4u 1 + 6u 2 ≤ 2,5 + Δb24u 1 + 6u 2 + u 4 = 2,5 + Δb2
u 4u 4 = u 4 − Δb2
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Exemplo:The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Tableau ótimo do problema:
�27
u 1 + 14 Δb2 = 1
8
Base U1 U2 U3 U4
Z 0 0 2 4 -16
U1 1 0 1 / 4 -1 / 4 1 / 8
U2 0 1 -1 / 6 1 / 3 1 / 3
u 2 − 13 Δb2 = 1
3
logo, Δb2 ≤ 12
Exercício
/ 12/ 29 Túlio Toffolo — Otimização Linear e Inteira — Aula 07: Análise de sensibilidade (Parte 2)
Observando o modelo e o tableau ótimo, responda:
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Qual o ganho de se reduzir em uma unidade o RHS da restrição 1? E da restrição 2?
The football leagues grouping problem
Problem constraints:
Leagues must comprise between m� and m+ teams.At most 2 teams from the same club can be in a league.There is a limit on the level difference between teams inthe same league.There is a limit on the travel time/distance between teamsin the same league.
It’s a generalization of the clique partitioning problem withminimum clique size requirement.
7 / 25 Toffolo et al. – IP heuristics for nesting problems
Até qual limite podemos flexibilizar estas restrições mantendo o shadow price válido?
�29
Base X1 X2 X3 X4
Z 0 0 1 / 8 1 / 3 -16
X1 1 0 -1 / 4 1 / 6 2
X2 0 1 1 / 4 -1 / 3 4
Exemplo: O Problema da Dieta
Minimizar: 3x1+2, 5x2 (1)
Sujeito a: 8x1+ 4x2 � 32 (2)6x1+ 6x2 � 36 (3)x1 � 0 (4)
x2 � 0 (5)
21 / 30 Túlio Toffolo – Otimização Linear e Inteira – Aula 01: Introdução
min.
s.a.
/ 12
Perguntas?