The Diet Problem Applet

The Diet Problem case study provides the history and presents a linear programming formulation of the diet problem. The objective of the diet problem is to select a set of foods that will satisfy a set of daily nutritional requirements at minimum cost. In this interactive demo, you can select the foods to be considered and specify the nutrient levels to be satisfied. You might be surprised at the contents of an optimized menu!

Create your own optimized menu!

To create your own optimized menu, select the foods that you would like to consider in your menu and specify the nutritional constraints that you would like to satisfy.

Food Selection

  • Mark the checkbox next to each food that you would like to consider in your menu. Note that you are more likely to get a solution if you select more food choices.
  • Edit the "Min" and "Max" values if you would like to change the defaults for the number of servings of each food from Min = 0 and Max = 10.
  • If you hover the mouse over the food name, you can view the nutritional information. For complete nutritional data, click here to go to the table at the bottom of the page.

Nutritional Requirements

  • Unselect the checkbox next to any nutrients that you do not want to consider.
  • Edit the "Min" and "Max" values for the nutrient levels if you would like to change them from their defaults.

Applet Buttons

  • Submit: Click the Submit button to solve the problem using the NEOS Server.
  • Reset: Click the Reset button to clear (uncheck) all of the food selections and return the Min and Max values to the default values.
  • Default: Click the Default button to select the default food selections.

Results

The results of the optimization are displayed in a new window.

  • Food Cost Table: The foods that are included in the menu are highlighted in green.
  • Dual Cost Table: The dual cost table displays the constraint activity for the foods and the nutrients. If the number of servings of a food or the total nutrient level is equal to its lower bound or upper bound, it will be highlighted in yellow. You can modify the number of servings or the nutrient level for these selections and resubmit the problem to see the effects of the changes. See this section of the case study for more information on interpreting the solution.


Complete Nutritional Data

Food Calories Chol Total Fat Sodium Carbs Fiber Protein Vit A Vit C Calcium Iron
Apple,Raw,W/Skin 81.4 0.0 0.5 0.0 21.0 3.7 0.3 73.1 7.9 9.7 0.2
Bagels 78.0 0.0 0.5 151.4 15.1 0.6 3.0 0.0 0.0 21.0 1.0
Banana 104.9 0.0 0.5 1.1 26.7 2.7 1.2 92.3 10.4 6.8 0.4
Bologna,Turkey 56.4 28.1 4.3 248.9 0.3 0.0 3.9 0.0 0.0 23.8 0.4
Bread, Wheat 65.0 0.0 1.0 134.5 12.4 1.3 2.2 0.0 0.0 10.8 0.7
Bread, White 65.0 0.0 1.0 132.5 11.8 1.1 2.3 0.0 0.0 26.2 0.8
Broccoli, Frozen 73.8 0.0 0.8 68.2 13.6 8.5 8.0 5867.4 160.2 159.0 2.3
Butter,Regular 35.8 10.9 4.1 41.3 0.0 0.0 0.0 152.9 0.0 1.2 0.0
Carrots,Raw 23.7 0.0 0.1 19.2 5.6 1.6 0.6 15471.0 5.1 14.9 0.3
Celery, Raw 6.4 0.0 0.1 34.8 1.5 0.7 0.3 53.6 2.8 16.0 0.2
Cereal, Cap'N Crunch 119.6 0.0 2.6 213.3 23.0 0.5 1.4 40.6 0.0 4.8 7.5
Cereal, Cheerios 111.0 0.0 1.8 307.6 19.6 2.0 4.3 1252.2 15.1 48.6 4.5
Cereal, Kellogg'S Corn Flakes 110.5 0.0 0.1 290.5 24.5 0.7 2.3 1252.2 15.1 0.9 1.8
Cereal, Kellg'S Raisin Bran 115.1 0.0 0.7 204.4 27.9 4.0 4.0 1250.2 0.0 12.9 16.8
Cereal, Rice Krispies 112.2 0.0 0.2 340.8 24.8 0.4 1.9 1252.2 15.1 4.0 1.8
Cereal, Special K 110.8 0.0 0.1 265.5 21.3 0.7 5.6 1252.2 15.1 8.2 4.5
Cheese, Cheddar 112.7 29.4 9.3 173.7 0.4 0.0 7.0 296.5 0.0 202.0 0.2
Chicken, Roasted 277.4 129.9 10.8 125.6 0.0 0.0 42.2 77.4 0.0 21.9 1.8
Chowder, New England Clam 163.7 22.3 6.6 992.0 16.6 1.5 9.5 163.7 3.5 186.0 1.5
Cookies, Chocolate Chip 78.1 5.1 4.5 57.8 9.3 0.0 0.9 101.8 0.0 6.2 0.4
Cookies, Oatmeal 81.0 0.0 3.3 68.9 12.4 0.6 1.1 2.9 0.1 6.7 0.5
Corn, Frozen 72.2 0.0 0.6 2.5 17.1 2.0 2.5 106.6 5.2 3.3 0.3
Couscous 100.8 0.0 0.1 4.5 20.9 1.3 3.4 0.0 0.0 7.2 0.3
Eggs, Poached 74.5 211.5 5.0 140.0 0.6 0.0 6.2 316.0 0.0 24.5 0.7
Eggs, Scrambled 99.6 211.2 7.3 168.0 1.3 0.0 6.7 409.2 0.1 42.6 0.7
Frankfurter, Beef 141.8 27.4 12.8 461.7 0.8 0.0 5.4 0.0 10.8 9.0 0.6
Grapes 15.1 0.0 0.1 0.5 4.1 0.2 0.2 24.0 1.0 3.4 0.1
Ham,Sliced,Extralean 37.1 13.3 1.4 405.1 0.3 0.0 5.5 0.0 7.4 2.0 0.2
Hamburger W/Toppings 275.0 42.8 10.2 563.9 32.7 0.0 13.6 126.3 2.6 51.4 2.5
Hotdog, Plain 242.1 44.1 14.5 670.3 18.0 0.0 10.4 0.0 0.1 23.5 2.3
Kielbasa,Prk 80.6 17.4 7.1 279.8 0.6 0.0 3.4 0.0 5.5 11.4 0.4
Kiwifruit, Fresh 46.4 0.0 0.3 3.8 11.3 2.6 0.8 133.0 74.5 19.8 0.3
Lettuce,Iceberg 2.6 0.0 0.0 1.8 0.4 0.3 0.2 66.0 0.8 3.8 0.1
Macaroni,Cooked 98.7 0.0 0.5 0.7 19.8 0.9 3.3 0.0 0.0 4.9 1.0
Malt-O-Meal,Choc 607.2 0.0 1.5 16.5 128.2 0.0 17.3 0.0 0.0 23.1 47.2
Milk, Lowfat 2% 121.2 18.3 4.7 121.8 11.7 0.0 8.1 500.2 2.3 296.7 0.1
Milk, Skim 85.5 4.4 0.4 126.2 11.9 0.0 8.4 499.8 2.4 302.3 0.1
Milk, Whole 149.9 33.2 8.1 119.6 11.4 0.0 8.0 307.4 2.3 291.3 0.1
Oatmeal 145.1 0.0 2.3 2.3 25.3 4.0 6.1 37.4 0.0 18.7 1.6
Oranges 61.6 0.0 0.2 0.0 15.4 3.1 1.2 268.6 69.7 52.4 0.1
Peanut Butter 188.5 0.0 16.0 155.5 6.9 2.1 7.7 0.0 0.0 13.1 0.6
Peppers, Sweet 20.0 0.0 0.1 1.5 4.8 1.3 0.7 467.7 66.1 6.7 0.3
Pie, Apple 67.2 0.0 3.1 75.4 9.6 0.5 0.5 35.2 0.9 3.1 0.1
Pizza W/Pepperoni 181.0 14.2 7.0 267.0 19.9 0.0 10.1 281.9 1.6 64.6 0.9
Popcorn,Air-Popped 108.3 0.0 1.2 1.1 22.1 4.3 3.4 55.6 0.0 2.8 0.8
Pork 710.8 105.1 72.2 38.4 0.0 0.0 13.8 14.7 0.0 59.9 0.4
Potatoes, Baked 171.5 0.0 0.2 15.2 39.9 3.2 3.7 0.0 15.6 22.7 4.3
Potato Chips,Bbqflvr 139.2 0.0 9.2 212.6 15.0 1.2 2.2 61.5 9.6 14.2 0.5
Pretzels 108.0 0.0 1.0 486.2 22.5 0.9 2.6 0.0 0.0 10.2 1.2
Rice, White 102.7 0.0 0.2 0.8 22.3 0.3 2.1 0.0 0.0 7.9 0.9
Sardines in Oil 49.9 34.1 2.7 121.2 0.0 0.0 5.9 53.8 0.0 91.7 0.7
Soup, Cream of Mushroom 203.4 19.8 13.6 1076.3 15.0 0.5 6.1 153.8 2.2 178.6 0.6
Soup, Bean and bacon 172.0 2.5 5.9 951.3 22.8 8.6 7.9 888.0 1.5 81.0 2.0
Soup, Chicken Noodle 150.1 12.3 4.6 1862.2 18.7 1.5 7.9 1308.7 0.0 27.1 1.5
Soup, Split Pea&Ham 184.8 7.2 4.0 964.8 26.8 4.1 11.1 4872.0 7.0 33.6 2.1
Soup, Vegetable Beef 158.1 10.0 3.8 1915.1 20.4 4.0 11.2 3785.1 4.8 32.6 2.2
Soup, New England Clam 175.7 10.0 5.0 1864.9 21.8 1.5 10.9 20.1 4.8 82.8 2.8
Soup, Tomato 170.7 0.0 3.8 1744.4 33.2 1.0 4.1 1393.0 133.0 27.6 3.5
Spaghetti W/ Sauce 358.2 0.0 12.3 1237.1 58.3 11.6 8.2 3055.2 27.9 80.2 2.3
Taco 369.4 56.4 20.6 802.0 26.7 0.0 20.7 855.0 2.2 220.6 2.4
Tofu 88.2 0.0 5.5 8.1 2.2 1.4 9.4 98.6 0.1 121.8 6.2
Tomato,Red,Ripe,Raw 25.8 0.0 0.4 11.1 5.7 1.4 1.0 766.3 23.5 6.2 0.6
Tortilla Chip 142.0 0.0 7.4 149.7 17.8 1.8 2.0 55.6 0.0 43.7 0.4
Tuna, White in Water 115.6 35.7 2.1 333.2 0.0 0.0 22.7 68.0 0.0 3.4 0.5

 

Optimization Category (Linear Programing, Integer, MIP and etc.):