aula 08: dualidade - universidade federal de ouro preto · 2019-10-10 · / 12/ 34 túlio toffolo...
TRANSCRIPT
BCC464/PCC174 — 2019/2Departamento de Computação — UFOP
Túlio A. M. Toffolohttp://www.toffolo.com.br
Otimização Linear e InteiraAula 08: Dualidade
Dualidade
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
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
Seja o PL a seguir o PL primal:
0:..
)(min
≥
≥
=
xbAxasxfxct
njx
mibxaas
xc
j
n
jijij
n
jjj
,...,10
,...,1:.
min
1
1
=∀≥
=∀≥∑
∑
=
=
�3
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
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
Associado a este PL, existe um outro PL, chamado PL dual:
0:..
)(max
≥
≤
=
ucuAas
xfubtt
D
miu
njcuaas
ub
i
m
ijiij
m
iii
,...,10
,...,1:.
max
1
1
=∀≥
=∀≤∑
∑
=
=
�4
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
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
O dual de um problema de maximização é um problema de minimizaçã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
As m restrições primais estão em correspondência com as m variáveis duais.
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 n restrições duais estão em correspondência com as n variáveis primais.
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 coeficiente de cada variável na FO, primal ou dual, aparece no outro problema como lado direito da restrição correspondente.
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
A matriz de coeficientes do primal é transposta no dual.
�5
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade
0:..
)(min
≥
≥
=
xbAxasxfxct
0:..
)(max
≥
≤
=
ucuAas
xfubtt
D
PL Primal PL Dual
�6
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Transformação Primal x Dual
MIN
Restrição≤ ≤
Variável
MAX
= qq.≥ ≥
Variável≤ ≥
Restriçãoqq. =≥ ≤
�7
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Exemplo: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
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
Exemplo:OProblemadaDieta
Minimizar:3x1+2,5x2(1)
Sujeitoa:8x1+4x2�32(2)6x1+6x2�36(3)x1�0(4)
x2�0(5)
21/30TúlioToffolo–OtimizaçãoLineareInteira–Aula01:Introdução
Maximizar:
Sujeito a:
�8
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Maximizar:
Sujeito a:
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
Encontre o PL Dual do modelo abaixo:
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
�9
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Exercício:
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
Encontre o PL Dual do modelo abaixo:
Exercício
Exercício1 Encontre o PL Dual do modelo a seguir:
min. 300x1+ 280x2
s.a. 70x1+ 50x2 � 35050x1+ 80x2 � 400
x1 � 2x1, x2 � 0
21 / 34 Túlio Toffolo – Otimização Linear e Inteira – Aula 03: Simplex e Modelagem�10
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
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
É igualmente válido definir o primal como sendo um problema de minimização ou maximização
Dual:Primal:
1
1
max
S. a 1, 2,...,
0 1,2,...,
n
j jj
n
ij j ij
j
w c x
a x b i m
x j n
=
=
=
£ =
³ =
å
å
1
1
min
S. a 1, 2,...,
y 0 1,2,...,
m
i ii
m
ij i ji
i
z b y
a y c j n
i m
=
=
=
³ =
³ =
å
å
�11
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Teorema
O dual do dual é o primal.
�12
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Teorema
Teorema da dualidade fraca
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
Se o primal for um PL de maximização que tem uma solução viável x com valor z e o seu dual tem solução viável y com valor w, então z ≤ w.
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
Se o primal for um PL de minimização que tem uma solução viável x com valor z e o dual tem solução viável y com valor w, então z ≥ w.
�13
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Teorema
Teorema da dualidade forte
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
Se o primal tem solução ótima x* com valor z*, então o dual tem solução ótima y* com valor w* e z*=w*.
Consequência:
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
Sempre é possível usar uma solução do dual para provar que uma solução ótima do primal realmente é ótima.
�14
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: VantagensThe 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
É possível “cercar” a solução ótima e/ou conferir se uma solução é de fato ótima (exemplo: um PL de minimização)
x* = u*
f(x)
fD(x)
(valor do primal)
(valor do dual)
�15
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: VantagensThe 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
Situações na qual a matriz de coeficientes do primal tem mais linhas do que de colunas:
Dual
A base no dual é menor neste caso!
�16
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Teorema
Pelo Teorema da dualidade fraca:
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
Se o primal for ilimitado, o dual é inviável.
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
Se o dual for ilimitado, o primal é inviável.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
Observação: é possível que tanto o primal quanto o dual sejam inviáveis.
�17
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
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:
�18
Ótimo Ilimitado Inviável
Ótimo Possível Nunca Nunca
Ilimitado Nunca Nunca Possível
Inviável Nunca Possível Possível
DualidadeAnálise de Sensibilidade
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Interpretação EconômicaThe 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
Sejam os dois PLs a seguir:
njx
mibxaas
xfxc
j
n
jijij
n
jjj
,...,10
,...,1:.
)(max
1
1
=∀≥
=∀≤
=
∑
∑
=
=
miu
njcuaas
ufub
i
m
ijiij
m
iDii
,...,10
,...,1:.
)(min
1
1
=∀≥
=∀≥
=
∑
∑
=
=
PL Primal PL Dual
�20
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Interpretação EconômicaThe 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
Sejam x* e u* soluções ótimas dos PLs primal e dual, e seja B* a base relativa a essas soluções.
∑=
===m
iiiD ubbuufxf
1
**** )()(
**)(
ubxf
=∂
∂
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
Supondo b variável e derivando em relação a b:
u* é a taxa de variação de f(x*) com b. Como u* ≥ 0, então f(x*) cresce à medida que bi cresce
�21
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Interpretação EconômicaThe 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
Considere o primal um problema de alocação de recursos, com m recursos disponíveis nas quantidades b1, b2, ..., bm com os quais desejamos fabricar n produtos nas quantidades x1, x2, ..., xn a serem determinadas.
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
Cada unidade do produto j consome aij unidades do recurso i trazendo um retorno de cj unidades monetárias.
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
Queremos determinar a quantidade a ser fabricada de cada produto de modo a maximizar o retorno.
�22
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: Interpretação EconômicaThe 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, agora, aumentada em uma unidade a quantidade disponível do recurso k, isto é, temos (bk + 1) unidades.
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
Suponha que a base associada permaneça a mesma.
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
Neste caso, a nova solução ótima u** do dual permanece a mesma.
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
A nova solução ótima x** será:
�23
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Dualidade: 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
f(x**) – f(x*) = uk*, ou seja, uk* é o incremento no lucro trazido pelo aumento de uma unidade da matéria disponível k.
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
uk* é chamado shadow price, valor incremental, efficiency price, valor implícito, etc.
*
1
*** )1()( kk
m
kii
ii ububxf ++=∑≠=
***
1
* )( kk
m
iii uxfuub +=+=∑
=
�24
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Exemplos para aula prática:
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
�25
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Ex. 1: Carteira de Investimentos
Uma empresa gerencia recursos de terceiros através da escolha de carteiras de investimentos para diversos clientes, baseados em bonds de diversas empresas. Um de seus clientes exige que:
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
Não mais de 25% do total aplicado deve ser investido em um único investimento;
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
Um valor superior ou igual a 50% do total aplicado deve ser investido em títulos de maturidade maiores que 10 anos;
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 total aplicado em títulos de alto risco deve ser, no máximo, de 45% do total investido.
Considerando a tabela de retorno, risco e maturidade (próximo slide), determine a estratégia ótima para o investidor de forma que a rentabilidade de sua aplicação seja máxima.
�26
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Ex. 1: Carteira de Investimentos
Título Retorno anual (%)
Maturidade (anos)
Risco
0 8,7 15 1 – Muito baixo
1 9,5 12 3 – Regular
2 12,0 8 4 – Alto3 9,0 7 2 – Baixo4 13,0 11 4 – Alto5 20,0 5 5 – Muito alto
�27
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Ex. 1: Carteira de Investimentos
�28
Forma Padrão
max .X
j2Titulos
retornoj
100xj
s.a. xj 25 8j 2 TitulosX
j2Titulos|maturidadej�10
xj � 50
X
j2Titulos|riscoj�4
xj 45
X
j2Titulos
xj = 100
3 / 34 Túlio Toffolo – Otimização Linear e Inteira – Aula 03: Simplex e Modelagem
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Ex. 1: Carteira de Investimentos
1. Qual o melhor retorno que se pode obter? Quanto se deve aplicar em cada título para que se tenha o retorno ótimo?
2. Em qual percentual aumentaria o retorno se fosse permitido aplicar 1% a mais no Título 1?
3. Quanto é a influência da limitação de aplicação em título de alto risco? Qual seria o retorno se esta limitação fosse de 49%?
4. Se fosse imposto limitar a aplicação em cada título em 24% para um dentre os títulos 1, 3 e 5, em qual título deveria ser feita a diminuição de aplicação? Justifique.
5. A partir de qual retorno a aplicação no Título 2 é vantajosa?
�29
Para a próxima aula…
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Ex. 2: Produção de automóveisThe 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
Uma empresa deve produzir 1000 automóveis. Ela tem quatro fábricas, as quais, devido a diferenças na mão-de-obra e avanços tecnológicos, diferem no custo de produção de cada carro. Elas também utilizam diferentes quantidades de matéria-prima e mão-de-obra. A tabela abaixo resume essas informações:
Fábrica Custo (R$ mil) Mão-de-Obra Mat. Prima
1 15 2 32 10 3 43 9 4 54 7 5 6
�31
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Ex. 2: Produção de automóveisThe 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
Um acordo trabalhista requer que pelo menos 400 carros sejam produzidos na Fábrica 3. Existem 3300 horas de mão-de-obra e 4000 unidades de material que podem ser alocas às 4 fábricas:
åÎFabricasj
jj xcmin
åÎ
£Fabricasj
jj TotMObraxMObra
åÎ
£Fabricasj
jj x aTotMatPrimMatPrima
åÎ
=Fabricasj
jx Producao
0| ¹Î"³ jjj AcordoFabricasjAcordox
�32
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
Ex. 2: Produção de automóveis
1. Quais são as quantias ótimas de produção? Qual o custo da produção?
2. Quanto custa produzir mais um veículo? Quanto economizamos produzindo um veículo a menos?
3. Como mudaria a solução se custasse somente R$8.000,00 para produzir na fábrica 2? Como ficaria o custo?
4. Quanto o acordo está custando? Qual seria a variação no custo se o acordo fosse de 250 carros?
5. Até que custo ainda é vantajoso produzir na Fábrica 2?
�33
Exercício
/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 08: Dualidade
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�35
/ 12
Perguntas?