PDA

Click to See Complete Forum and Search --> : another optimisation


jib jib
Sep 11th, 2005, 04:39 AM
hi, i'm wondering if u can help me with an optimisation problem..?

A company produces two types of cattle feed, which consist entirely of alfalfa and wheat. Feed 1, which sells for $3.00/kg, must contain at least 80% alfalfa
and feed 2, which sells for $2.60/kg, must contain at least 60% wheat.
If the company can buy up to 1000 kg of alfalfa at $1.00/kg and up to 800 kg of wheat at $0.80/kg, what should it do to maximize its profit ? [Suggestion: let feed 1 be produced by combining x1 kg of alfalfa and x2 kg of wheat and let feed 2 be
produced by combining x3 kg of alfalfa and x4 kg of wheat.]

alfalfa: 0.8x1 + 0.4x3 =< 1000
wheat: 0.2x2 + 0.6 x4 =< 800

want to max:
z=3.00-[(0.8 x 1.00)x1 + (0.2 x 0.8)x2] + 2.60-[(0.4 x 1.00)x3 + (0.6 x 0.8)x4]
z= 2.4x1 - 0.48x2 + 1.04 x3 -1.248x4

I'm pretty sure this is wrong because I tried in on matlab and only got a result for x1. Do you know where I have made an error? or is there an easier way to solve this? many thanx

opus
Sep 11th, 2005, 02:46 PM
Some homework????

You got some mistakes.

AlphaAlpha: X1 +X3 <=1000
Wheat: X2+X4<=800 (The factors 0.8 , 0.6 .. don't belong in here, since they only give the ratios to make Feed1 and Feed2)
The same in here:
z=3.00*(X1+X2)-[ 1.00*x1 +0.8*x2] + 2.60*(X3+X4)-[1.00*X3 + (0.8*X4]


One result for X1 should be enough!
for Feed1: "Feed 1, which sells for $3.00/kg, must contain at least 80% alfalfa"
Take exact 80%, if you know X1, X2=X1/4
If you have X1 and X2, you know how much of AlphaAlpha and Wheat is left.

I think you should be able to continue now.

Rassis
Sep 11th, 2005, 03:02 PM
The problem is quite simple and the only thing that I can see you did wrong was to accept the "suggestion". As a matter of fact, it contradicts the proportions of alfalfa and wheat that was given beforehand in the text. You were quite close…

In this case, the objective function is the profit (to be maximized):
Z = [3-(0.8 x 1 + 0.2 x 0.8)] + [2.6-(0.4 x 1 + 0.6 x 0.8)]

Subjected to the constraints:
0.8.X1 + 0.4.X2 <= 1000
0.2.X1 + 0.6.X2 <= 800
X1 >= 0
X2 >= 0

And the solution is X1(feed 1) = 700 Kg and X2(feed 2) = 1100 Kg. The profit results a maximum of $3320.

I attach an Excel file with the problem solved by SOLVER.

opus
Sep 12th, 2005, 03:03 PM
In this case, the objective function is the profit (to be maximized):
Z = [3-(0.8 x 1 + 0.2 x 0.8)] + [2.6-(0.4 x 1 + 0.6 x 0.8)]

I think you are missing the X Values in your formula, or you will only get the profit for 1 unit Feed1 plus 1 unit Feed 2.

BTW, I think his homework was due already ;-)

Rassis
Sep 12th, 2005, 04:16 PM
Opus,

Of course, you are right. I forgot the X in the objective function. It should be Z = [3-(0.8 x 1 + 0.2 x 0.8)].X1 + [2.6-(0.4 x 1 + 0.6 x 0.8)].X2.

Thanks.

jib jib
Sep 13th, 2005, 06:24 AM
no u see the quesiton says...must contain at least 80% therefore there must be some other constraint

opus
Sep 14th, 2005, 03:28 PM
You would have to optimize each FEED itself before starting the EXCEL-Solver from Rassis.
for FEED1 it's easy: Feed1 must contaon at least 80% of Alfalfa, since Alfalfa it more expencive the wheat, you would use exact 80% to minmize to cost.

for FEED2 it looks more weird. You stated "feed 2, which sells for $2.60/kg, must contain at least 60% wheat." Does that mean feed2 could contain only wheat, that would be the optimum! But I don't think that this is correct!

Having done the optimsation for each FEED you can use the EXCEL solver by Rassis.

Rassis
Sep 14th, 2005, 05:41 PM
I am sorry but I missunderstood the problem. I noticed it from Opus last post. Thanks.

What we are actually looking for, is the amount X1 and X3 of alfalfa and the amount X2 and X4 of wheat from which Feed 1 and Feed 2 should be made of, in such a way that the sum of both contribution margins results maximum. Therefore, if I see things right this time, the objective function must be:

Z(max) = [3 x (X1 + X2) - 1.X1 - 0.8.X2] + [2.6 x (X3 + X4) - 1.X3 - 0.8.X4]

subjected to the following constraints:

X1 / (X1 + X2) >= 0.8
X4 / (X3 + X4) >= 0,6
X1 + X3 <= 1000
X2 + X4 <= 800
X1 >= 0; X2 >= 0; X3 >= 0; X4 >= 0

The result is: X1 = 1000 Kg; X2 = 250 Kg; X3 = 0 Kg; X4 = 550 Kg and Z = $3540

I attach a new Excel file "Jib Jib_3.XLS" solved by SOLVER.

I think the problem is now well equated and Excel did the rest. Am I right?

opus
Sep 15th, 2005, 02:22 PM
That should solve it!