Daily requirements of 70 g of protein, 1 g calcium, 12 mg iron, and 3000 calories are needed for a balanced diet. The following foods are available for consumption with the cost and nutrients per 100 g as shown.
Protein
(g)
Calories
Calcium
(g)
Iron
Cost
GH¢
Brown Bread
12
246
0.1
3.2
0.5
Cheese
24.9
423
0.2
0.3
2
Butter
0.1
793
0.03
0
1
Baked Beans
6
93
0.05
2.3
0.25
Spinach
3
26
0.1
2
0.25
The objective is to find a balanced diet with minimum cost.
(a) Formulate a linear programming model for this problem.
(b) Use solver to find optimal solution and sensitivity report.
a) The objective is to find a balanced diet with minimum cost.
Let:
- number of 100 g units of brown bread
- number of 100 g units of cheese
- number of 100 g units of butter
- number of 100 g units of baked beans
- number of 100 g units of baked beans
The linear programming problem is then:
Minimize:
Constraints:
b) Using online solver (https://cbom.atozmath.com), we get:
It was used Two-Phase Simplex method.
Phase 1:
after 1st step: maz
after 2nd step: max
after 3rd step: max
after 4th step: max
after 5th step: all
optimal solution:
Phase 1:
we eliminate the artificial variables and change the objective function for the original,
after 1st step: max
after 2nd step: max
after 3rd step: all
Finally, optimal solution:
Conclusion:
To get minimal cost ( ) of diet, it's enough to use of brown bread and of butter. And we don't need any cheese, baked beans or spinach.
Comments