diet

3

Upload: oreste2008

Post on 15-May-2017

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Diet

SYS-304 Examples { Formulating Optimization Problems

Diet Problem

Suppose you can buy the following �ve types of food: bread, meat, potatoes, cabbage,and milk. Per pound of each food contains a certain amount of calories, protein, calcium,and vitamin A, and costs some money. These amounts are listed in the following table.You need to depend on these foods to meet your daily requirements of calories, protein,calcium, and vitamin A. Your daily requirements are also listed in the table. The questionis: in what amounts you should buy these foods so that the total cost is minimum?

bread meat potatoes cabbage milk daily requirement

calories 1254 1457 318 46 309 3000protein 39 73 8 4 16 70 gcalcium 418 41 42 141 536 800 mg

vitamin A 0 0 70 860 720 500 IUcost/pound $1.20 $2.45 $0.90 $0.50 $1.10

Investment Problem

An investor has an initial wealth $5000 that can be used to invest in two potentialportfolios. There are three possible scenarios associated with the annual returns of theportfolios:

Scenario 1: annual returns of portfolios 1 and 2 are 10% and 12%, respectively, andthe probability that this scenario occurs is 0.3;

Scenario 2: annual returns of portfolios 1 and 2 are 15% and 10%, respectively, andthe probability that this scenario occurs is 0.3;

Scenario 3: annual returns of portfolios 1 and 2 are 20% and 18%, respectively, andthe probability that this scenario occurs is 0.4.

The investor's utility function is U(w) =pw, where w is the �nal wealth the investor

has. The question is: in what amounts the investor should invest the initial wealth in thetwo portfolios so that the investor can maximize the total expected utility value after oneyear?

1

Page 2: Diet

Diet Problem

Decision variables:

x1 = amount of bread purchased,

x2 = amount of meat purchased,

x3 = amount of potatoes purchased,

x4 = amount of cabbage purchased,

x5 = amount of milk purchased.

Then we have

total cost Z = 1:2x1 + 2:45x2 + 0:9x3 + 0:5x4 + 1:1x5

calories = 1254x1 + 1457x2 + 318x3 + 46x4 + 309x5

protein = 39x1 + 73x2 + 8x3 + 4x4 + 16x5

calcium = 418x1 + 41x2 + 42x3 + 141x4 + 536x5

vitamin A = 70x3 + 860x4 + 720x5

Formulation { Linear Programming (LP)

minimize Z = 1:2x1 + 2:45x2 + 0:9x3 + 0:5x4 + 1:1x5

subject to

1254x1 + 1457x2 + 318x3 + 46x4 + 309x5 � 3000

39x1 + 73x2 + 8x3 + 4x4 + 16x5 � 70

418x1 + 41x2 + 42x3 + 141x4 + 536x5 � 800

70x3 + 860x4 + 720x5 � 500

x1 � 0, x2 � 0, x3 � 0, x4 � 0, x5 � 0

2

Page 3: Diet

Investment Problem

Decision variables:

x1 = amount invested in portfolio 1,

x2 = amount invested in portfolio 2.

Then one year later,

If scenario 1 happens, �nal wealth w1 = 1:1x1 + 1:12x2, and utility value U(w1);

If scenario 2 happens, �nal wealth w2 = 1:15x1 + 1:1x2, and utility value U(w2);

If scenario 3 happens, �nal wealth w3 = 1:2x1 + 1:18x2, and utility value U(w3).

So, total expected utility value one year later is: Z = 0:3U(w1) + 0:3U(w2) + 0:4U(w3).

Formulation { Nonlinear Programming (NLP)

maximize Z = 0:3p1:1x1 + 1:12x2 + 0:3

p1:15x1 + 1:1x2 + 0:4

p1:2x1 + 1:18x2

subject to

x1 + x2 = 5000

x1 � 0, x2 � 0

3