aula 05: dualidade - universidade federal de ouro preto · / 12/ 34 túlio toffolo — otimização...

35
BCC464/PCC174 — 2018/2 Departamento de Computação — UFOP Túlio A. M. Toffolo http://www.toffolo.com.br Otimização Linear e Inteira Aula 05: Dualidade

Upload: others

Post on 04-Jul-2020

2 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

BCC464/PCC174 — 2018/2Departamento de Computação — UFOP

Túlio A. M. Toffolohttp://www.toffolo.com.br

Otimização Linear e InteiraAula 05: Dualidade

Page 2: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

Dualidade

Page 3: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 4: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 5: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 6: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade

Dualidade

0:..

)(min

=

xbAxasxfxct

0:..

)(max

=

ucuAas

xfubtt

D

PL Primal PL Dual

�6

Page 7: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade

Transformação Primal x Dual

MIN

Restrição≤ ≤

Variável

MAX

= qq.≥ ≥

Variável≤ ≥

Restriçãoqq. =≥ ≤

�7

Page 8: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

�8

Page 9: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 10: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 11: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 12: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade

Dualidade: Teorema

O dual do dual é o primal.

�12

Page 13: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 14: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 15: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 16: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 17: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 18: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 19: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

DualidadeAnálise de Sensibilidade

Page 20: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 21: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 22: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 23: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 24: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 25: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 26: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 27: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade

Ex. 1: Carteira de Investimentos

Título Retorno anual (%)

Maturidade (anos)

Risco

1 8,7 15 1 – Muito baixo

2 9,5 12 3 – Regular

3 12,0 8 4 – Alto4 9,0 7 2 – Baixo5 13,0 11 4 – Alto6 20,0 5 5 – Muito alto

�27

Page 28: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

Page 29: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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 2? Qual seria o retorno? Essa regra vale até quanto?

3. A partir de qual percentual a aplicação no Título 3 é vantajosa?

4. Se fosse imposto limitar a aplicação em cada título em 24% para um dentre os títulos 2, 4 e 6, em qual título deveria ser feita a diminuição de aplicação? Justifique.

5. 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%?

�29

Page 30: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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, as plantas 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

�30

Page 31: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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

�31

Page 32: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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?

�32

Page 33: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

Exercício

Page 34: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: 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�34

Page 35: Aula 05: Dualidade - Universidade Federal de Ouro Preto · / 12/ 34 Túlio Toffolo — Otimização Linear e Inteira — Aula 05: Dualidade The football leagues grouping problemDualidade

/ 12

Perguntas?