Research & Papers

New MIGP algorithm beats meal planning with 66% better solutions than rounding

No more 0.37 bananas—integer servings with 100% feasibility in under 100ms.

Deep Dive

Determining what to eat to meet nutritional goals has been a classic operations research problem, but existing models have two persistent flaws: continuous variables produce impractical fractional servings (e.g., 1.7 eggs, 0.37 bananas), and hard nutrient constraints often make solutions infeasible when targets conflict. A systematic review of 56 diet optimization papers found none combined integer programming with goal programming to address both issues. Now, researcher Francisco Aguilero Moreno introduces Mixed Integer Goal Programming (MIGP), which uses integer variables for natural serving units (one egg, one tablespoon) while employing goal programming deviations for soft nutrient targets. The formulation includes inverse-target normalization to balance multi-nutrient optimization and eliminates post-hoc rounding errors.

In a computational evaluation across 810 instances (30 USDA foods, 9 configurations, 3 methods), MIGP strictly outperformed GP with post-hoc rounding in 66% of cases and never yielded worse results, while maintaining 100% feasibility. In contrast, hard-constraint integer programming achieved only 48% feasibility. For meals with 15+ foods, integer solutions matched the continuous optimum on every benchmark. Solve times stay under 100ms for typical meal sizes using the open-source HiGHS solver. An open-source Python module is available, integrated into an interactive meal planning application.

Key Points
  • MIGP replaces fractional servings (e.g., 1.7 eggs) with integer counts (1 egg, 2 tablespoons) using per-food serving granularity.
  • Tested on 810 instances across 30 USDA foods, MIGP achieves 100% feasibility vs. 48% for hard-constraint IP, and beats post-hoc rounding in 66% of cases.
  • Solve times under 100ms via open-source HiGHS solver; implementation available as a Python module with an interactive meal planning app.

Why It Matters

MIGP makes AI-driven meal planning practical for real kitchens, replacing theory with integer servings and guaranteed feasibility.