That was hilarious. Figuring out sensible constraints seems to be a long iterative process.<p>One diet suggested drinking 32l (~8.5 gallons) of water.<p>This one was the computed "maximize protein" diet:<p><pre><code> status = solve(m) = :Optimal
10 grams Folic acid
1 grams Vitamin C
667 grams Flour, soya
24034 grams Lard
800 grams Suet
845 grams Amino acid or creatine powder
42752 grams Intense sweetener, containing aspartame,
powdered formulation
</code></pre>
Almost 43 kg (~94 pounds) of intense sweetener? Sounds healthy!
I remember reading about a study that attempted something similar, they found that dietary guidelines were in fact impossible to meet using a "natural diet" without supplements (scare quotes because I don't remember the exact dietary constraints). I think the constraints also included lower bounds for things like sodium and potassium (this model only has upper bounds for them).
The idea is interesting, though the results have indeed zero applicability unless a few additional rules are added to the system - like proportion of macro-nutrients (fats/proteins/carbohydrates) and some sensible variability to the meal plans (ie, no point in suggesting "1 gram" of some food source, either you suggest a "portion" or nothing).<p>Personally, I think it would be easier to start with one's own dietary approach and try to put that into rules, then optimize it using additional guidelines (or removing some rules) instead of starting with something too loosely defined and letting the program choose different sources randomly.
Source is on github,
<a href="https://github.com/oxinabox/oxinabox.github.io/blob/master/notebook_posts/Optimizing%20your%20diet%20with%20JuMP.ipynb" rel="nofollow">https://github.com/oxinabox/oxinabox.github.io/blob/master/n...</a>
Feel encouraged to mess around with it