MathMate - I'm still confused, please see below. Thanks!!

SIMPLEX METHOD - Table:
Nutrient Peanuts Raisins M&Ms Pretzels
Calories 855 435 1024 162
Protein 34.57 4.67 9.01 3.87
Fat 72.50 0.67 43.95 1.49
Carbs 31.40 114.74 148.12 33.68

Suppose that you want to make at most 10 cups of trail mix, using all the ingredients. You want each of the ingredients to contribute at least 10% of the total volume of the mix made. You want the entire amount of trail mix to have fewer than 7000 calories and you want to maximize the amount of carbs in the mix.

1. Let x1 be the number of cups of peanuts, x2 cups of raisins, x3 cups of m&ms and x4 cups of pretzels. Let C be the amount of carbs in the mix. Find the objective function.
2. What contraints must be placed on the objective function.

I can solve the rest if you can help out with the constraints. I'm not sure how to write out the 10% of each ingredient to a proper constraint. Thanks!


Math - MathMate, Sunday, June 5, 2011 at 7:07am
You must already have:
x1+x2+x3+x4=10
and
855x1+435x2+1024x3+162x4 < 7000

The total volume is 10 cups, what is 10% of 10 cups?

Can you take it from here?



Math - Jay, Monday, June 6, 2011 at 6:15pm
MathMate,
Sorry.. still confused. I set up the constraints as x1>1, x2>1, x3>1, x4>1 but I'm not getting the answer. Are those contraints correct or is there another way to write it?

Those are the constraints you were given.

You talk about an answer but have not defined objective yet.
remember maximize carbs
carbs = 31.4 x1 + 114.74 x2 etc

I have the objective, I just need the constraints. If you can please list all of the constraints. The constraint that is stumping me is the one where I have to show 10% of the total. Thanks!!!!!

What is the proper constraint for this:

"You want each of the ingredients to contribute at least 10% of the total volume of the mix made."

Sorry, after re-reading:

"want to make at most 10 cups of trail mix"
which means that the total weight is not yet known. So
x1+x2+x3+x4=10 does not apply.

Also instead of
x1>1,x2>1....
take the total weight as
W=x1+x2+x3+x4, so the new constraints should be:
x1≤(x1+x2+x3+x4)/10
or simplified to
9x1≤x2+x3+x4
and similarly,
9x2≤x1+x3+x4
9x3≤x1+x2+x4
9x4≤x2+x3+x3

The constraints are now:
855x1+435x2+1024x3+162x4 < 7000
9x1≤x2+x3+x4
9x2≤x1+x3+x4
9x3≤x1+x2+x4
9x4≤x2+x3+x3
x1+x2+x3+x4≤10

Would that work?

Should read:

9x4≤x1+x3+x3

To write the constraint for each ingredient contributing at least 10% of the total volume, you can use the following equations:

x1 >= 0.1 * (x1 + x2 + x3 + x4)
x2 >= 0.1 * (x1 + x2 + x3 + x4)
x3 >= 0.1 * (x1 + x2 + x3 + x4)
x4 >= 0.1 * (x1 + x2 + x3 + x4)

These equations enforce the condition that each ingredient's cups should be greater than or equal to 10% of the total volume.

Substituting the objective function for carbs, which is C, you get:

C = 31.40*x1 + 114.74*x2 + 148.12*x3 + 33.68*x4

So, the objective function is C = 31.40*x1 + 114.74*x2 + 148.12*x3 + 33.68*x4.

The constraints are:
1. x1 + x2 + x3 + x4 = 10 (Total volume constraint)
2. 855*x1 + 435*x2 + 1024*x3 + 162*x4 < 7000 (Calories constraint)
3. x1 >= 0.1*(x1 + x2 + x3 + x4) (Peanuts constraint)
4. x2 >= 0.1*(x1 + x2 + x3 + x4) (Raisins constraint)
5. x3 >= 0.1*(x1 + x2 + x3 + x4) (M&Ms constraint)
6. x4 >= 0.1*(x1 + x2 + x3 + x4) (Pretzels constraint)

You can now use these constraints to solve the problem using the simplex method or any other optimization technique.