Diet Problem in Linear Programming solved with Excel Solver

One of the classic applications of Linear Programming is the diet problem. The Diet Problem in Linear Programming was one of the first optimization problems studied in the 1930s and 1940s. The main goal is to select a set of foods that meets certain daily nutritional requirements and preferences and additionally at minimum cost. Let´s consider the following list of foods with their nutritional profile to illustrate this application:

foods-table-diet-problem

We wish to propose a diet containing at least 2,000 (Kcal), at least 55 grams of protein and 800 (mg) of calcium. In addition, to provide some variety in the diet, some limits are set for the daily portions of food. This information is required to find the diet that has the lowest cost associated with meeting the above requirements. To do this we define the following linear programming model:

Diet Problem in Linear Programming

1. Decision Variables: Select a set of foods to include in the daily diet.

decision-variables-diet-pro

2. Objective Function: Minimize the cost of the daily diet.

objective-function-diet-pro

3. Constrains: Meets daily nutritional requirements and preferences.

constraints-diet-problem-2

The implementation of this model in Excel Solver to get optimal solution and optimal value is shown in the following image:

optimal-solution-diet-probl

The optimal solution is X1=4, X2=0, X3=0, X4=2,08, X5=1,68, X6=2 and the optimal value (cost of the daily diet) is $764,07. As the model is linear programming, fractional values ​​are allowed for the decision variables. So if we only look for integer values ​​for the decision variables, in this case we define an integer programming model which we will review in a future article.

Do you want to have the Excel file with the solution of this problem with Solver? Recommend us on Facebook, Google or Twitter using the social network tool at the bottom of this article and then download the file.


Rating: 3.7/5. From 10 votes.
You voted 5, 4 weeks ago.
Please wait...

, , , , ,

No comments yet. Be the first to comment!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Our Site is Proudly Hosted on