← Back to Handbooks

Diet Optimization - Handbook

Type: LP (Linear Programming)

This handbook explains the Diet Optimization sample problem in the LP Black Box platform.


The Problem

Scenario

Plan a daily menu using four foods to meet nutritional requirements at minimum cost.

FoodCost ($)CaloriesProtein (g)Iron (mg)
Bread25021
Milk310080.1
Meat8200253
Vegetables43032

Your Goal

Minimize total food cost while meeting daily nutritional requirements.

The Constraints

  1. Calories: At least 2000 calories

    Formula: 50×bread + 100×milk + 200×meat + 30×veg ≥ 2000

  2. Protein: At least 50g

    Formula: 2×bread + 8×milk + 25×meat + 3×veg ≥ 50

  3. Iron: At least 15mg

    Formula: 1×bread + 0.1×milk + 3×meat + 2×veg ≥ 15


How to Use

Step 1: Load the Sample

Select Diet Optimization from the dropdown.

Step 2: Solve

The solver finds the cheapest combination that meets all nutritional needs.


Try It Yourself


This classic LP problem demonstrates how to meet multiple requirements at minimum cost.