Ozgrid, Experts in Microsoft Excel Spreadsheets
Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com
Learn how to create Excel dashboards.

Linear Programming Dietary optimization (Maximum Calories and Minimal Cost)

Try out: Analyzer XL | Downloader XL | Smart VBA | Trader XL Pro (best value) | ConsoXL | MergeXL | O2OLAP for Excel | MORE>>

linear programming GIPALS Start

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

linear programming GIPALS Start

Linear programming examples

There are several examples of linear programming intended to make the users of GIPALS familiar with it. These examples are included in GIPALS installation and can be found in ..\GIPALS\Examples folder.

See Screen Shots: Variables Page | Calculation Process | Constraint Page (Compact view) | Matrix Palette Dialog | Result Page | Debug Options Dialog

GIPALS Linear Programming $197.95 - 15000 Constraints & Variables | $297.00 - Unlimited Number of Constraints & Variables

Special ! Free Choice of Complete Excel Training Course or Excel Add-ins Collection on all purchases totaling over $70.00. ALL purchases totaling over $150.00 gets you BOTH! Purchases MUST be made via this site. Send payment proof to special@ozgrid.com 31 days after purchase date.



Instant Download and Money Back Guarantee on Most Software

Try out: Analyzer XL | Downloader XL | Smart VBA | Trader XL Pro (best value) | ConsoXL | MergeXL | O2OLAP for Excel | MORE>>

Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!

Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft

GIVE YOURSELF OR YOUR COMPANY 24/7 MICROSOFT EXCEL SUPPORT & QUESTIONS