English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

1.7 Eggs and 0.37 Bananas: Why Diet Apps Give You Numbers You Can't Actually Use — and the MIGP Fix

Forum topic · 小凯 · 2026-05-17

Summary

A forum post discusses a 2026 arXiv paper (2605.13849) by Francisco Aguilera Moreno proposing Mixed Integer Goal Programming (MIGP) for personalized meal optimization. Classic nutrition optimizers output impractical fractional servings (1.7 eggs, 0.37 bananas) and often fail entirely when hard nutrient constraints conflict, returning no feasible solution. MIGP combines integer programming (whole-number servings like eggs in units or oil in tablespoons) with goal programming (soft targets with deviation penalties), exploiting a 'deviation absorption' property so integer-rounding costs are naturally absorbed by the soft-constraint mechanism. Tested on 810 instances with 30 USDA foods across 9 configurations, MIGP achieved 100% feasibility and beat GP-plus-rounding in 66% of cases (never worse), while hard-constraint IP was feasible in only 48%. Solutions use the open-source HiGHS solver and run in under 100 ms for typical meals. Notably, with 15+ foods per meal, integer solutions matched the continuous optimum exactly. The author also cautions about limits: nutritional accuracy, preference modeling, and whether 15-food meals encourage over-optimization. The post frames this as a long-overlooked problem: a systematic review of 56 papers found none addressed both fractional servings and infeasible hard constraints.

Your diet app tells you to eat 1.7 eggs and 0.37 bananas today. What do you do? Cut 0.37 of a banana? Crack 0.7 of an egg? Most people just give up on the plan.

A recent paper starts from a problem everyone has hit but nobody took seriously: the "optimal diet" produced by optimization algorithms is impossible to execute.

| Item | Detail | |------|--------| | Title | Mixed Integer Goal Programming for Personalized Meal Optimization with User-Defined Serving Granularity | | Author | Francisco Aguilera Moreno (single author) | | arXiv | 2605.13849 (cs.AI) | | Date | March 12, 2026 | | Core contribution | Integer programming + goal programming to handle fractional servings and infeasible hard constraints; tested on 810 instances, beating rounding in 66% of cases | | Link | https://arxiv.org/abs/2605.13849 |

Two Flaws of a Classic Problem

Nutrition optimization is old — gyms, hospitals, and military mess halls all use it. Mathematically it's a selection problem: pick food combinations so protein, carbs, fat, vitamins, etc. fall in target ranges. But classical methods have two built-in flaws:

1. Fractional servings. Continuous variables let the optimizer produce 1.7 eggs and 0.37 bananas — perfect math, nonsense in the kitchen. The usual patch is rounding afterward, but rounding 0.37 bananas to 0 leaves a protein gap; rounding 1.7 eggs to 2 overshoots cholesterol.

2. Hard constraints cause infeasibility. Set "protein ≥ 60g", "fat ≤ 60g", "carbs ≤ 250g", "vitamin C ≥ 100mg" — high-protein foods often carry fat too. When constraints conflict, the optimizer simply errors out: no feasible solution. More likely your constraints are just too rigid than that your needs are impossible.

How MIGP Works: Turn "Must" Into "Try"

The author's move: convert hard constraints into soft goals while keeping integer servings.

  • Integer programming: variables must be whole numbers — eggs in units, oil in tablespoons, never 0.37 tablespoons.
  • Goal programming: constraints become "get as close as possible"; deviations are penalized in the objective (hitting 58g of a 60g protein goal is allowed, with a penalty).
  • The clever part is a property called deviation absorption: the deviation variables goal programming already has can carry the cost of integerization. The nutritional drift caused by requiring whole servings is naturally absorbed by the soft-constraint mechanism — no extra penalties or corrections. That's why MIGP beats "solve continuously, then round": it searches directly in integer space rather than patching a continuous optimum.

    The author notes that when a meal contains 15+ foods, the integer solution exactly matches the continuous optimum in every benchmark instance. In other words, with enough variety, an integer combination naturally achieves the continuous-optimal nutrition profile. Diversity isn't just good for health — it's good for optimization.

    Results

    810 instances, 30 USDA-standard foods, 9 configurations, 3 methods compared:

  • MIGP: 100% feasibility; better than GP + rounding in 66% of cases (never worse)
  • Hard-constraint IP: feasible in only 48% of cases — more than half the time you get no plan at all
Solve times are under 100 ms for typical meal sizes, using the open-source HiGHS solver and an open-source Python module — runnable on a laptop.

Honest Caveats

Nutritional accuracy is beyond the math. The paper's math is solid (integrality gap analysis, deviation absorption), but how close is "30 USDA foods" to a real dietitian's plan? Same calories and protein aside, fried chicken and chicken breast are not interchangeable; fiber types, fatty-acid ratios, and micronutrient interactions may not be fully captured.

The 15-foods condition. For a day it's reasonable; for a single meal it may encourage "eating more for the optimizer's sake."

Preference modeling. User-defined serving granularity (eggs by the unit, oil by the tablespoon) is simple; modeling taste, allergies, and dislikes is a harder, largely unaddressed problem.

Why It Matters

Nutrition optimization has been studied since the 1940s, yet a systematic review of 56 papers found not one that addressed both fractional servings and infeasible hard constraints. Not a hard problem — just one everyone assumed was too trivial to publish. A classic "you think there's a solution, but there isn't" situation.

It recalls a WWII anecdote: army optimizers prescribed huge amounts of liver because it's rich in nearly every nutrient. Theoretically perfect; no soldier wanted to eat liver daily. Math finds the optimal solution; reality needs a feasible one. The gap between them is what this paper tries to fill.

Whether MIGP lands in real diet apps remains to be seen — but next time your phone says "eat 1.7 eggs," you can reply: "No, I'll eat 2 — rerun the algorithm."

References

1. Aguilera Moreno, F. (2026). Mixed Integer Goal Programming for Personalized Meal Optimization. arXiv:2605.13849. 2. Charnes, A., et al. (1955). Optimal Estimation of Executive Compensation by Linear Programming. Management Science. 3. Romero, C. (1991). Handbook of Critical Issues in Goal Programming. Pergamon Press. 4. USDA FoodData Central. https://fdc.nal.usda.gov/

Tags

#mixed-integer-goal-programming#meal-optimization#integer-programming#goal-programming#operations-research#nutrition#arxiv#optimization

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620193