Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've tried to make a meal planner that used linear programming to ensure that I got all of the needed nutrients and minimized calories, but it didn't work out. It really liked to suggest moose meat and some insanely healthful fruit from Argentina. It also suggested I drink 642 cups of coffee a day, I guess because coffee has some trace amount of whatever nutrient everything else lacked.

It was also difficult to figure out exactly how much of each nutrient I needed. There is no one list that has all of the nutrients, and different lists that cover different nutrients suggest different amounts of the nutrients that intersect the lists.



Soylent Orange. :) Although I haven't min maxed the ratios yet. https://docs.google.com/spreadsheet/ccc?key=0AjA38cUd4BZBdGZ...


How did you solve your LP? I think the issue might be due to an extreme point solution from simplex-type methods. Interior point methods might give you something different. Have you tried that?


To be honest, I don't remember... I think I was using a Linux command-line LP solver.


I'm pretty sure that meal planning is a packing problem, so it can't really be "solved".

In fact it's worse than that; it's a multi-objective optimisation problem if you care about macro ratios and micronutrients.


In LP, you can tell it that your variables must be greater than or less than certain values, so my intention was to keep each nutrient between the recommended minimums and maximums.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: