1
$\begingroup$

I'm just starting to explore linear programming in Excel and have hit a VERY newbie problem I'm sure.

I'm using it to optimise a "diet" plan with a few ingredients. The problem I've hit is as follows.

Serving Limits

What I'd like to do somehow is limit the number of possible servings as well. I can't imaging anyone wanting to eat 500 servings of mushrooms and nothing else.

Just to be clear I'm trying to achieve a minimise CP100 (Calories per 100g) while maintaining a decent desire (tasty) level.

Any ideas? I've Googled, but come up short so far...

$\endgroup$
  • $\begingroup$ You'd need to add additional constraints or make the desire constraint more complex. My first guess would be to make the desire dependent on the number of servings instead of constant, but that might make the problem nonlinear. $\endgroup$ – DylanSp Apr 19 '16 at 17:19
  • $\begingroup$ I've had nonlinear problems already! Will keep looking $\endgroup$ – Dan Apr 19 '16 at 17:21
0
$\begingroup$

If you want to achieve something more meaningful, just say that you have a level of desire at $0$ and more you eat, less you like until you are digusted

$$ \text{Desire_for_food_A}(\text{g_of_food_A_I_eat}) = \text{Before_eating_food_A_desire} - \text{Speed_of_how_I_am_digusted_of_food_A}\times\text{g_of_food_A_I_eat}$$

$$\begin{array}{r|c|c|c} \text{Food}& \text{CP100} & \text{Before eating desire} & \text{Speed of how of I am digusted} \\ \hline \text{Chicken} & 124 & 7 & \frac{7}{200} \\ \text{Bacon} & 300 & 10 & \frac{10}{50} \\ \end{array} $$ In this example, I like more Bacon ($10>7$) than Chicken but I can eat less Bacon than Chicken before being digusted $(0=10-50\times\frac{10}{50}<7-50\times\frac{7}{200})$.

Hope this answer can help.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.