A apresentação está carregando. Por favor, espere

A apresentação está carregando. Por favor, espere

Programação Não-linear

Apresentações semelhantes


Apresentação em tema: "Programação Não-linear"— Transcrição da apresentação:

1 Programação Não-linear
Prof. Fernando Augusto Silva Marins

2 Programação Não-Linear - PNL
De forma geral um problema de PNL tem a seguinte forma: A função objetivo f e uma ou mais de uma das funções nas restrições gi possuem termos não lineares. Nenhum algoritmo resolve todos os problemas que podem ser incluídos neste formato. Observação: Falta slide com o conteúdo da aula.

3 Programação Não Linear Aplicações
Problemas de Mix de Produtos em que o “lucro” obtido por produto varia com a quantidade vendida. Problemas de Transporte com custos variáveis de transporte em relação à quantidade enviada. Seleção de Portfolio com Risco

4 Programação Linear Solução Gráfica
Considere o Problema de Programação Linear e sua solução gráfica Max Z x = + 3 5 1 2 2x 12 3x 18 s r 4 . , x2 x1 (0;6) (2;6) (0;0) (4;0) (4;3) Soluções Viáveis 1

5 Programação Não Linear Solução Gráfica
Considere o Problema e sua solução gráfica. x 2 1 3 4 6 Soluções Viáveis (2;6) Max Z x = + 3 5 1 2 s.t. 4 , 9 216

6 Programação Não Linear Solução Gráfica
A solução ótima: é a mesma do problema linear. continua na fronteira do conjunto de soluções viáveis. não é mais um extremo do conjunto de soluções viáveis mas poderia ainda ocorrer em um ponto extremo. Não existe a simplificação existente em Programação Linear x 2 1 3 4 6 Soluções Viáveis (2;6)

7 Programação Não Linear Solução Gráfica
1 2x 12 2 3x x + 18 s r 4 . , Max Z= 126 9 182 13 - x2 (2;6) (0;6) (4;3) Soluções Viáveis (0;0) x1 (4;0)

8 Programação Não Linear Solução Gráfica
A função objetivo é uma equação quadrática.

9 Programação Não Linear Solução Gráfica
Max Z = x 857 126 9 182 13 1 2 - + x 2 6 4 Z = 907 Soluções Viáveis Z = 807 2 Ótima x 1 2 4

10 Programação Não Linear Solução Gráfica
1 2x 12 2 3x x + 18 s r 4 . , Max Z= 54 9 78 13 - x2 (2;6) (0;6) (4;3) Soluções Viáveis (0;0) x1 (4;0)

11 Programação Não Linear Solução Gráfica
A função objetivo é uma equação quadrática ( ) [ ] Z= x Z Para 54 9 78 13 18 26 81 117 3 1 2 - + æ è ç ö ø ÷ = é ë ê ù û ú Þ 198 189 36 162

12 Programação Não Linear Solução Gráfica
x 2 2 1 13 78 9 54 198 x = Z Max - + 6 4 Solução no interior do conjunto de soluções viáveis e não mais na fronteira do conjunto 3 2 Soluções Viáveis x 1 2 3 4

13 Programação Não Linear
A solução ótima de PNL, diferentemente de um problema de LP, pode ser qualquer valor do conjunto de soluções viáveis. Isso torna os problemas de PNL muito mais complexos, obrigando os algoritmos de solução a pesquisar todos os valores possíveis.

14 Programação Não Linear Excel
O Excel utiliza o algoritmo GRG (Generalized Reduced Gradient) para chegar à solução para um dado problema. O algoritmo não garante que a solução encontrada é uma solução global. O Solver às vezes tem dificuldades de achar soluções para problemas que tenham condições iniciais para as variáveis iguais a zero. Uma boa medida é começar a otimização com valores diferentes de zero para as variáveis de decisão.

15 Programação Não Linear Excel
Uma maneira prática para tentar minorar o problema de máximos e mínimos locais é começar a otimização de diversos pontos iniciais, gerados aleatoriamente. Se todas as otimizações gerarem o mesmo resultado, você pode ter maior confiança, não a certeza, de ter atingido um ponto global.

16 One special class of NLPs knowed by “Convex Programming Problems” can be solved by algorithms that are guaranteed to converge to the optimal solution.

17 Properties of Convex Programming Problems
The objective is to maximize a concave function or to minimize a convex function. The set of constraints form a convex set.

18 A One Variable Concave (Convex) Function
A smooth function (no sharp points, no discontinuities) One global maximum (minimum). A line drawn between any two points on the curve of the function will lie below (above) the curve or on the curve. X A convex function A Concave function X

19 An illustration of a two variable convex function

20 Convex Sets If a straight line that joins any two points in the set lies within the set, then the set is called a convex set. Convex set Non-convex set

21 Nonlinear LP and Convex Sets
In a NLP model if all the constraints are of the “less than or equal to” form Gi(X) £ B. If all the functions Gi are convex, the set of constraints forms a convex set.

22 Unconstrained Nonlinear Programming
One-variable unconstrained problems are demonstrated by the Toshi Camera problem. The inverse relationships between demand for an item and its value (price) are utilized in this problem.

23 TOSHI CAMERA Toshi camera of Japan has just developed a new product, the Zoomcam. It is believed that demand for the initial product will be linearly related to the price.

24 Total profit = Revenue - Production cost
TOSHI CAMERA Unit production cost is estimated to be $50. What is the production quantity that maximizes the total profit from the initial production run? SOLUTION Total profit = Revenue - Production cost F(X) = PX - 50X

25 TOSHI CAMERA From the Price / Demand table it can be verified that P = X The Profit function becomes F(X) = ( X)X = 400X X2 This is a concave function. 400,000

26 TOSHI CAMERA To obtain an optimal solution (maximum profit), two conditions must be satisfied: A necessary condition dF/dX = 0 A sufficient condition d2F/dX2 < 0. The necessary condition is satisfied at: dF/dX = (.001)X = 0; X = 200,000. The sufficient condition is satisfied since d2F/dX2 = The optimal solution: Produce 200,000 cameras. The profit is F(200,000) = $40,000,000.

27 Optimal solutions for concave/convex functions with one variable
If a function is known to be concave or convex at all points, the following condition is both a necessary and sufficient condition for optimality: The point X* gives the maximum value for a concave function, or the minimum value for a convex function, F(X), if at X* dF/dX = 0

28 Optimal solutions for concave/convex functions with more than one variable
Determining whether or not a multivariate function is concave or convex requires analysis of the second derivatives of the function. A point X* is optimal for a concave (convex) function if all its partial derivatives are equal to zero at X*. For example, in the three variable case:

29 Constrained Nonlinear Programming Problems – one variable
The feasible region for a one variable problem is a segment on a straight line (X ³ a or X £ b). When the objective function is nonlinear the optimal solution must not be at an extreme point.

30 TOSHI CAMERA - revisited
Toshi Camera needs to determine the optimal production level from among the following three alternatives: 150,000 £ X £ 300,000 50,000 £ X £ 175,000 150,000 £ X £ 350,000

31 TOSHI CAMERA – solution
The objective function does not change: Maximize F(X) = 400X X2 X ³ 150,000 X £ 300,000 X ³ 50,000 X £ 175,000 150 400 50 175 400 X*=200,000 X* = 175,000 X* = 250,000 X ³ 250,000 X £ 350,000 400

32 Constrained Nonlinear Programming Problems – n variables, m contraints
Variáveis Duais ou Preços Sombra Let us define Y1, Y2, …,Ym as the instantaneous improvement in the value of F for one unit increase in B1, B2, …Bm respectively.

33 Kuhn-Tucker-Karush optimality conditions
This is a set of “necessary conditions” for optimality of most nonlinear problems. If the problem is convex, the K-T-K conditions are also sufficient for a point X* to be optimal. S1, S2, …,Sm are defined as the slack variables in each constraint.

34 PBI INDUSTRIES PBI wants to determine an optimal production schedule for its two CD players during the month of April. Data Unit production cost for the portable CD player = $50. Unit production cost for the deluxe table player = $90. There is additional “intermix” cost of $0.01(the number of portable CD’s)(the number of deluxe CD’s).

35 PBI INDUSTRIES Forecasts indicate that unit selling price for each CD player is related to the number of units sold as follows: Portable CD player unit price = X1 Deluxe CD player unit price = X2

36 PBI INDUSTRIES Resource usage Resource availability
Each portable CD player uses 1 unit of a particular electrical component, and .1 labor hour. Each deluxe CD player uses 2 units of the electrical component, and .3 labor hour. Resource availability 10,000 units of the electrical component units; 1,500 labor hours.

37 PBI INDUSTRIES – SOLUTION
Decision variables X1 - the number of portable CD players to produce X2 - the number of deluxe CD players to produce The model Resource constraints Production cannot be negative

38 PBI INDUSTRIES – SOLUTION
For a point X1, X2 to be optimal, the K-T-K conditions require that: Y1S1 = 0; Y2S2 = 0; Y3S3 = 0; Y4S4 = 0, and

39 PBI INDUSTRIES – SOLUTION
Finding an optimal production plan. Assume X1>0 and X2>0. The assumption implies S3>0 and S4>0. Thus, Y3 = 0 and Y4 = 0. Add the assumption that S1 = 0 and S2 = 0. From the first two constraints we have X1 = 0 and X2 = 5000. A contradiction X1>0 X1= 0 AS A RESULT THE SECOND ASSUMPTION CANNOT BE TRUE

40 PBI INDUSTRIES – SOLUTION
Change the second assumption. Assume that S1 = 0 and S2 > 0. As before, from the first assumption S3 > 0 and S4 > 0. Thus, Y3 = 0 and Y4 = 0. From the second assumption Y2 = 0. Substituting the values of all the Ys in the partial derivative equations we get the following two equations: -.02 X X = Y1 -.01 X X = 2Y1 Also, since S1 = 0 (by the second assumption) X1 + 2X2 = 10,000 Solving the set of three equations in three unknowns we get:

41 PBI INDUSTRIES – SOLUTION
X1 = 1,000, X2 = 4,500, Y1 = 35 This solution is a feasible point (check the constraints). X1 and X2 are positive. 1X1 + 2X2 <= 10,000 [ (4500) = 10,000] .1X1 + .3X2 <= 1,500 [.1(1000) + .3(4500) = 1450] This problem represents a convex program since It can be shown that the objective function F is concave. All the constraints are linear, thus, form a convex set. The K-T-K conditions yielded an optimal solution

42 PBI INDUSTRIES – Excel SOLUTION

43 Programação Não Linear Controle de Estoque
Um dos modelos mais simples de controle de estoque é conhecido como Modelo do Lote Econômico. Esse tipo de modelo assume as seguintes hipóteses A demanda (ou uso) do produto a ser pedido é praticamente constante durante o ano. Cada novo pedido do produto deve chegar de uma vez no exato instante em que este chegar a zero.

44 Programação Não Linear Controle de Estoque
Determinar o tamanho do pedido e a sua periodicidade dado os seguintes custos: Manutenção de Estoque – Custo por se manter o capital no estoque e não em outra aplicação, rendendo benefícios financeiros para a empresa. Custo do Pedido – Associado a trabalho de efetuar o pedido de um determinado produto. Custo de Falta – Associado a perdas que venham a decorrer da interrupção da produção por falta do produto.

45 Programação Não Linear Controle de Estoque
Demanda Anual =100 Lote=50, Pedidos = 2 Estoque Médio = 25 6 12 meses Demanda Anual =100 Lote=25,Pedido= 4 Estoque Médio = 12,5 3 6 9 12 meses 25 50 25 12,5

46 Programação Não Linear Controle de Estoque
Variável de Decisão Q – Quantidade por Pedido Função Objetivo = Onde: D = Demanda Anual do Produto C = Custo Unitário do Produto S = Custo Unitário de Fazer o Pedido Cm= Custo unitário de manutenção em estoque por ano Constante

47 Caso LCL Computadores A LCL Computadores deseja diminuir o seu estoque de mainboards. Sabendo-se que o custo unitário da mainboard é de R$50,00, o custo anual unitário de manutenção de estoque é de R$20,00 e o custo unitário do pedido é de R$10,00, encontre o lote econômico para atender a uma demanda anual de 1000 mainboards.

48 Caso LCL Computadores

49 Caso LCL Computadores

50 Caso LCL Computadores

51 Caso LCL Computadores Na solução apresentada do lote econômico, a quantidade de pedidos por ano é fracionário, já que Isso não representa um problema

52 PNL - Problemas de Localização
Um problema muito usual na área de negócios é o de localização de Fábricas, Armazéns, Centros de distribuição e torres de transmissão telefônica. Nesses problemas deve-se Minimizar a distância total entre os centros consumidores e o centro de distribuição, reduzindo assim teoricamente o custo de transporte. Para tal, o usual é sobre um mapa colocar-se um eixo cartesiano e determinar a posição dos centro consumidores em relação a uma origem aleatória.

53 Caso LCL Telefonia Celular S.A.
O Gerente de Projetos da LCL Telecom, tem que localizar uma antena de retransmissão para atender a três localidades na Baixada Fluminense. Por problemas técnicos a antena não pode estar a mais de 10 km do centro de cada cidade. Considerando as localizações relativas abaixo, determine o melhor posicionamento para a torre. Localidade X Y Nova Iguaçu -5 10 Queimados 2 1 Duque de Caxias 5

54 Caso LCL Telefonia Celular S.A.
Y Nova Iguaçu (-5,10) Duque de Caxias (10,5) Queimados (2,1) X

55 Caso LCL Telefonia Celular S.A.
Variáveis de Decisão X – Coordenada no eixo X da torre de transmissão Y – Coordenada no eixo Y da torre de transmissão Função Objetivo

56 Caso LCL Telefonia Celular S.A.
Restrições de Distância 10 ) ( 2 3 1 - + Y y X x

57 Caso LCL Telefonia Celular S.A. Modelo no Excel
=SOMA(D2:D4)

58 Caso LCL Telefonia Celular S.A. Parametrização

59 Caso LCL Telefonia Celular S.A. Solução
Observação: Propor atividade de fixação e indicar leitura básica e complementar.


Carregar ppt "Programação Não-linear"

Apresentações semelhantes


Anúncios Google