Type: LP (Linear Programming)
This handbook explains the Diet Optimization sample problem in the LP Black Box platform.
Plan a daily menu using four foods to meet nutritional requirements at minimum cost.
| Food | Cost ($) | Calories | Protein (g) | Iron (mg) |
|---|---|---|---|---|
| Bread | 2 | 50 | 2 | 1 |
| Milk | 3 | 100 | 8 | 0.1 |
| Meat | 8 | 200 | 25 | 3 |
| Vegetables | 4 | 30 | 3 | 2 |
Minimize total food cost while meeting daily nutritional requirements.
Calories: At least 2000 calories
Formula: 50×bread + 100×milk + 200×meat + 30×veg ≥ 2000
Protein: At least 50g
Formula: 2×bread + 8×milk + 25×meat + 3×veg ≥ 50
Iron: At least 15mg
Formula: 1×bread + 0.1×milk + 3×meat + 2×veg ≥ 15
Select Diet Optimization from the dropdown.
The solver finds the cheapest combination that meets all nutritional needs.
This classic LP problem demonstrates how to meet multiple requirements at minimum cost.