I am stuck with it! any one can solve it! it is in the attachment
Printable View
I am stuck with it! any one can solve it! it is in the attachment
It's a bit strange to post a .doc. Anywho, that's clearly a homework problem. What have you tried? Have you written down the linear constraints and cost function? If you're not able to, you should get someone to tutor you in person.
Ingreadiant very vanilla chock-o- chips Black walnut Pecans crunch Berry Berry Peachy Keen cost per unit price
Cream 8 6 7 7 9 9 0.11 2.39
Suger 1 1 1 1 0.5 0.5 0.1 2.39
Vnilla 3 1 1 1 1 1 0.3 2.39
Salt 1 0.5 2 2 1 1 0.02 2.39
Choc 1 0.5 2.39
Walnut 0.45 1 2.39
Pecans 0.4 0.9 2.39
Berries 1 0.55 2.39
Peaches 0.75 0.58 2.39
Ingreadiant very vanilla chock-o- chips Black walnut Pecans crunch Berry Berry Peachy Keen
Cream 1.51 1.73 1.62 1.62 1.4 1.4
Suger 2.29 2.29 2.29 2.29 2.34 2.34
Vnilla 1.49 2.09 2.09 2.09 2.09 2.09
Salt 2.37 2.38 2.35 2.35 2.37 2.37
Choc 1.89
Walnut 1.94
Pecans 2.03
Berries 1.84
Peaches 1.955
Total profit for each Flavor 7.66 10.38 10.29 10.38 10.04 10.155
Step one( decision Variables)
VX = Very Vanilla
CX = cock -o-chips
BX = Black Walnut
PX = pEXAN Crunch
BBX= Berry Berry
PKX= Peachy Keen
Step two( Objective Function)
Maximize Z= 7.66VX+ 10.38CX+10.29BX+10.38PX+10.04BBX+10.15PKX
Step three( constranints)
Ingreadiant very vanilla chock-o- chips Black walnut Pecans crunch Berry Berry Peachy Keen supply
Cream VX1 CX2 BX3 PX4 BBX5 PKX6 3000
Suger VX7 CX8 BX9 PX10 BBX11 PKX12 280
Vnilla VX13 CX14 BX15 PX16 BBX17 PKX18 500
Salt VX19 CX20 BX21 PX22 BBX23 PKX24 300
Choc CX25 25
Walnut BX26 25
Pecans PX27 25
Berries BBX28 25
Peaches PKX29 25
1.51VX1+1.73CX2+1.62BX3+1.62PX4+1.4BBX5+1.4PKX6 <= 3000
2.29VX7+2.29CX8+2.29BX9+2.29PX10+2.34BBX11+2.34PKX12<=280
1.49VX13+2.09CX14+2.09BX15+2.09PX16+2.09BBX17+2.09PKX18<=500
2.37VX19+2.38CX20+2.35BX21+2.35PX22+2.35BBX23+2.37PKX24<=300
1.84CX25<=24
1.94BX26<=25
2.03PX27<=25
1.84BBX28<=25
1.95PKX29<=25
This what I did !
I get very different results. For instance, my objective function is
where x1 = VX, x2 = CX, x3 = BX, x4 = PX, x5 = BBX, and x6 = PKX in your notation. For instance, to create 1 gallon of Very Vanilla takes...Code:1.3 x1 + 1.09 x2 + 1 x3 + 1.09 x4 + 0.75 x5 + 0.865 x6;
8 cups cream @ $0.11 / cup
1 cup sugar @ $0.10 / cup
3 table spoons vanilla extract @ $0.03 / table spoon
1 table spoon salt @ $0.02 / table spoon
for a total cost of 8*$0.11 + 1*$0.10 + 3*$0.03 + 1*$0.02 = $1.09 per gallon. The problem thinks this gallon can definitely be sold at $2.39, giving a profit of $2.39 - $1.09 = $1.3, which agrees with my objective function and disagrees with yours. These costs were taken from your .doc attachment. I have no idea where the ingredient numbers in your most recent post came from. Our objective functions also aren't multiples of each other. Your profits are also higher than $2.39 per gallon, which makes no sense.
My constraints also substantially disagree with yours. I don't really know what you mean by what you've written in that section--for instance, what is PKX29 referring to? In any case, remember not to forget the constraints that at least 10 gallons are made of each flavor and at most 1/4th of the total product contains nuts. There is another implicit set of constraints forcing the ingredients to appear in nonnegative amounts. These are implied by the xi >= 10 constraints, though, so can be omitted after being noted.
Edit: Added constraint.
Ok here is new answer after I review them and find out the right profit!
Decision Variables
Let X1
X2
X3
X4
X5
X6
X7
X8
X9
Cost 8.0 6.0 7.00 7.0 9.0 9.00 $0.11
1.0 1.0 1.00 1.0 0.5 0.50 $0.10
3.0 1.0 1.00 1.0 1.0 1.00 $0.03
1.0 0.5 2.00 2.0 1.0 1.00 $0.02
1.0 $0.50
0.45 $1.00
0.4 $0.90
1.0 $0.55
0.75 $0.58
Cost $0.88 $0.66 $0.77 $0.77 $0.99 $0.99
$0.10 $0.10 $0.10 $0.10 $0.05 $0.05
$0.09 $0.03 $0.03 $0.03 $0.03 $0.03
$0.02 $0.01 $0.04 $0.04 $0.02 $0.02
$0.00 $0.50 $0.00 $0.00 $0.00 $0.00
$0.00 $0.00 $0.45 $0.00 $0.00 $0.00
$0.00 $0.00 $0.00 $0.36 $0.00 $0.00
$0.00 $0.00 $0.00 $0.00 $0.55 $0.00
$0.00 $0.00 $0.00 $0.00 $0.00 $0.44
Total Cost $1.09 $1.30 $1.39 $1.30 $1.64 $1.53
Revenue $2.39
Total profits $1.30 $1.09 $1.00 $1.09 $0.75 $0.87
Objective Function Max Z= 1.30 X1 + 1.09 X2 + 1 X3 + 1.09 X4 + 0.75 X5 + 0.87 X6
Constraints 8 X1 6 X2 7 X3 7 X4 9 X5 9 X6 <= 3000
X1 X2 X3 X4 0.5X5 0.5X6 <= 280
3X1 X2 X3 X4 X5 X6 <= 500
X1 0.5X2 2X3 2X4 X5 X6 <= 300
X2 <= 25
0.45X3 <= 25
0.4X4 <= 25
X5 <= 25
.75X6 <= 25
let me know if I did it right please! Thanks
You seem to have rounded your objective function slightly. For the x6 coefficient, I have 0.865 instead of 0.87. In this particular case it's important not to round if you can avoid it. Otherwise our objective functions now agree.
I'll assume you've forgotten to write the + signs between terms of the constraints. In that case, the ones you've listed all agree with my versions. However, you've forgotten several. You need to include the constraints given by the following sentence from your attachment: "We must make at least 10 gallons of each flavor and no more than 25 percent of all the ice cream produced can be flavors with nuts."
so My constraints are going to be like this
8 X1 +6 X2 +7 X3 +7 X4 +9 X5 + 9 X6 <= 3000
X1 + X2 + X3 + X4 +0.5X5+0.5X6 <= 280
3X1 + X2 + X3 + X4 +X5 +X6 <= 500
X1 + 0.5X2 + 2X3 +2X4 +X5 +X6 <= 300
X2 <= 25
0.45X3 <= 25
0.4X4 <= 25
X5 <= 25
.75X6 <= 25
X1 >= 10
X2 >= 10
X3 >= 10
X4 >= 10
X5 >= 10
X6 >= 10
X3 <= 25
The x3 <= 25 isn't right. You've also again missed the constraint requiring at most 1/4th of the resulting ice cream have nuts. The rest are correct.
By "x3 <= 25 isn't right", I mean it's not generated by any of the constraints on the problem. The similar constraint, 0.45 x3 <= 25, is generated by limiting the number pounds of walnuts to 25.
Suppose for a moment that you produced 3 gallons of Very Vanilla, 1 gallon of Black Walnut, and 1 gallon of Pecan Crunch. In all you would have made 5 gallons of ice cream, of which 2 gallons contain nuts. That is, 2/5 = 40% of the resulting product have nuts. This case is disallowed, since the resulting fraction must be at most 25%.
Nope, that's perhaps even more wrong. I have no idea why you might think it was right, either.... Could you give your reasoning, and explain your current understanding of the condition "and no more than 25 percent of all the ice cream produced can be flavors with nuts"?
"We must make at least 10 gallons of each flavor and no more than 25 percent of all the ice cream produced can be flavors with nuts."
I really did not get this part at all! even can not understand what is required in it! would you please explain it for me and not by giving me example confuse me more!
Thanks
Is English not your native language? If so, perhaps you should get a translation of that sentence. It's really quite clear (as is my example). In any case, I'll try once more.
Some of the flavors contain nuts. These flavors are Black Walnut and Pecan Crunch (walnuts and pecans are types of nuts). The remaining flavors do not contain nuts. Say the total amount of ice cream you make is T. Say the total amount of Black Walnut and Pecan Crunch is N. N must be no more than 25% of T.
Yes! English is my second language! so what I understand is that I have 60 Gallons of all the flavors and we need 25% from them! which means that 15 gallons nuts out of 60! is that right!
Yes, as I understand what you're saying you are correct. If you made 60 gallons of ice cream total, you need *at most* 25% of them to contain nuts. That is, you need <= 15 gallons of Black Walnut and Pecan Crunch together. Try to put your understanding into a constraint equation. That will be clearer than words.
So my constraint going to be like this :
8 X1 +6 X2 +7 X3 +7 X4 +9 X5 + 9 X6 <= 3000
X1 + X2 + X3 + X4 +0.5X5+0.5X6 <= 280
3X1 + X2 + X3 + X4 +X5 +X6 <= 500
X1 + 0.5X2 + 2X3 +2X4 +X5 +X6 <= 300
X2 <= 25
0.45X3 <= 25
0.4X4 <= 25
X5 <= 25
.75X6 <= 25
X1 >= 10
X2 >= 10
X3 >= 10
X4 >= 10
X5 >= 10
X6 >= 10
X3<=15
X4<=15
No, you still don't understand. I'm sorry, there's not much more I can do. I've explained the constraint twice carefully and twice more less carefully. You are just not understanding my words. I don't think it would help to explain the constraint a fifth time. If we have this much trouble communicating on something so simple, I don't think I will be very helpful with the remaining parts of the problem.
Yes, I'm always impressed by people who study advanced material outside of their native language. Best of luck. Sorry I couldn't be of more help.
It occurred to me that I can at least give you the result of running the linear system even if I'm not comfortable giving you the last constraint. Please only use it to check your own result. I ran the following through the linear programming solver at http://vinci.inesc.pt/lp/ using the Simplex method:
which gave the following solution:Code:max: 1.3 x1 + 1.09 x2 + 1 x3 + 1.09 x4 + 0.75 x5 + 0.865 x6;
x1 >= 10;
x2 >= 10;
x3 >= 10;
x4 >= 10;
x5 >= 10;
x6 >= 10;
## nut constraint not shown ##
8 x1 + 6 x2 + 7 x3 + 7 x4 + 9 x5 + 9 x6 <= 3000;
1 x1 + 1 x2 + 1 x3 + 1 x4 + 0.5 x5 + 0.5 x6 <= 280;
3 x1 + 1 x2 + 1 x3 + 1 x4 + 1 x5 + 1 x6 <= 500;
1 x1 + 0.5 x2 + 2 x3 + 2 x4 + 1 x5 + 1 x6 <= 300;
1 x2 <= 25;
0.45 x3 <= 25;
0.4 x4 <= 25;
1 x5 <= 25;
0.75 x6 <= 25;
Code:Value of objective function: 290.058330198129
x1 = 120.83333333333337
x2 = 25.0
x3 = 10.0
x4 = 44.16666666666664
x5 = 25.0
x6 = 33.33333333333333
@jemidiah: I'm probably off-topic here, but I see that you are pretty comfortable around linear programming problems... I recently needed to learn the Simplex algorithm for a linear programming problem, but I couldn't find any good materials to study from -- trust me, I really tried. Would you by any chance be able to point me in the right direction?
so it be like this:
max: 1.3 x1 + 1.09 x2 + 1 x3 + 1.09 x4 + 0.75 x5 + 0.865 x6;
x1 >= 10;
x2 >= 10;
x3 >= 10;
x4 >= 10;
x5 >= 10;
x6 >= 10;
.25X3<=15;
.25X4<=15;
8 x1 + 6 x2 + 7 x3 + 7 x4 + 9 x5 + 9 x6 <= 3000;
1 x1 + 1 x2 + 1 x3 + 1 x4 + 0.5 x5 + 0.5 x6 <= 280;
3 x1 + 1 x2 + 1 x3 + 1 x4 + 1 x5 + 1 x6 <= 500;
1 x1 + 0.5 x2 + 2 x3 + 2 x4 + 1 x5 + 1 x6 <= 300;
1 x2 <= 25;
0.45 x3 <= 25;
0.4 x4 <= 25;
1 x5 <= 25;
0.75 x6 <= 25;
@ALYAMI01: Sorry, nope, still not right.
@obi1kenobi: I've never really studied linear programming. I've picked some up randomly and done a *very* small amount of my own study in the field (computing a condition for the volume of the feasible polytope to be finite/infinite). I've only ever been intuitively familiar with the Simplex method. But, I have some time and learning it would fill a hole in my mathematical knowledge. A brief search yielded two chapters of a book covering the topic: (1) (2). From the first few pages the explanation is leisurely and complete. I'll read the rest now, and if it turns out poorly I'll let you know.
well, Thanks anyway I have already submitted my homework! so I am happy of what I did even if there is still have wrong!
Thanks a lot.
@obi1kenobi: I made a new thread on your topic here.
hey guys I think that the last constraint would something like this :
-.25x1-.25x2+.75x3+.75x4-.25x5-.25x6<=0 or (x3+x4) (x1+x2+x5+x6)<=.25
best wishes bro
@Mikerap: your first one is correct, though your second one is not.
thanks bro, not sure if we could solve this problem by excel I've tried many times last night to solve it by the solver by I did not get the final answers; it seems to be something is missing in this problem. Have you tried to solve it by excel!
Nope, I haven't tried solving it with Excel, only the random online Simplex solver I linked. To be honest I have no idea how to use Excel to do a problem like this. It certainly wouldn't be my first choice in any case. If you have access to Mathematica, Maple, or Matlab, I'd suggest using them instead, since it's much less awkward.
I was curious and used this guide to linear programming with Excel to enter my results (see the attached spreadsheet). It solved the system essentially instantly with
For reference, my previous post's values wereCode:objective function = 290.058333333333
x1 = 120.833333333333
x2 = 25
x3 = 10
x4 = 44.1666666666667
x5 = 25
x6 = 33.3333333333333
which differs from the above only rarely and in at worst the millionths place.Code:Value of objective function: 290.058330198129
x1 = 120.83333333333337
x2 = 25.0
x3 = 10.0
x4 = 44.16666666666664
x5 = 25.0
x6 = 33.33333333333333
Edit: I doubt anyone but me cares, but it appears the exact solution is (120 + 5/6, 25, 10, 44 + 1/6, 25, 33 + 1/3). One could verify this result rigorously by applying Thm. 2.6 and Thm. 2.7 of my companion thread's main reference--that is, essentially manually running a final iteration of Simplex. A more elementary proof could be given by looking at the gradient of the objective function and considering the hyperplane with it as normal. Any vector lying on the gradient's side of the hyperplane could increase the function, but a proof by cases would show that such a direction must put you on the wrong side of the constraint hyperplanes on which the above solution lies.
wow! I never thought my homework problem going to be long discusion! but I think your excel answers Jam not correct way!
Thanks