Home

Woodcutting

Products

GNCutter

GNCutter32

GIPALS

Features

Screen Shots

Examples

GIPALS32

Download

Purchase

Links

Awards

Contacts

 

Dietary optimization (Maximum Calories and Minimal Cost)

There are six different foods: Bread, Milk, Cheese, Fish, Potato and Yogurt:

  Bread Milk Cheese Potato Fish Yogurt
Cost, $ 2.0 3.5 8.0 1.5 11.0 1.0
Protein, g 4.0 8.0 7.0 1.3 8.0 9.2
Fat, g 1.0 5.0 9.0 0.1 7.0 1.0
Carbohydrates, g 15.0 11.7 0.4 22.6 0.0 17.0
Calories, Cal 90 120 106 97 130 180

We have to find a diet that contains not less than 150 calories, not more than 10 g of protein, not less than 10 g of carbohydrates and not less than 8 g of fat. Also, the diet should have minimal cost.
In addition the diet should include at least 0.5 g of fish and not more than 1 cups of milk.

Let construct a linear program for this problem:

  1. We have six unknown variables that define weight of the food.
  2.  There is a lower bound for Fish as 0.5 g.
  3. There is an upper bound for Milk as 1 cup.
  4. The objective function is a total cost of the diet. 
  5. We need to minimize the total cost.
  6. There are four constraints.


The problem has been solved successfully with the following diet:
Milk 0.564 cups
Cheese 0.185 g
Potato 0.147 g
Fish 0.5 g

Bread and Yogurt are excluded from the diet.

The Total Cost is $9.17


Download the example in GIPALS format

 

Copyright © 2004-2008 Optimalon Software. All rights reserved.