| Excel Companion Chapter 2 | |||
| Chapter 2 Index | |||
| EC_2 | LINEAR OPTIMIZATION | ||
| Vitamins.xls | |||
| Machines.xls | |||
| Rlestate.xls | |||
| Linear Programming | Vitamins.xls | ||
Solving linear programming problems involves determining maximum or minimum value(s) of a linear objective function expressed in two or more decision variables subject to certain constraints. All of the decision variables must be non-negative and each constraint must be either a linear inequality or a linear equation.
Open the workbook Vitamins.xls to the sheet Graph 1.
SITUATION: A special diet utilizes food X and food Y to supply the following minimum daily requirements: 45 milligrams of vitamin A, 64 milligrams of vitamin B, and 45 milligrams of vitamin C. Each unit of food X costs $0.35 and supplies 15 milligram of vitamin A, 8 milligrams of vitamin B, and 5 milligrams of vitamin C. Each unit of food Y costs $0.45 and supplies 3 milligrams of vitamin A, 8 milligrams of vitamin B, and 9 milligrams of vitamin C. The goal is to determine the mixture of food X and food Y that minimizes the total cost and to calculate that minimum cost.
Vitamins.xls contains a formulation of this two variable LP problem and illustrates two different solution methods. The graphical method, shown in Graph 1, is based on the fact that optimal solutions to LP problems are found at a corner point or on an edge that connects corner points. The second method, illustrated in Solver 1, finds an optimal solution by a very powerful numerical algorithm called the simplex method.
Appendix B, entitled Linear Optimization Problems --- Using Excel and Excel Solver, contains detailed instructions on preparing worksheets for the Solver Add-in. Appendix B also shows the dialog boxes that appear in the process of directing Solver to apply the simplex method. We strongly recommend that you work through this appendix step by step.

Vitamins.xls - Graph 1
For the vitamins problem the objective function is of the form Z = ax + by where a is the unit cost for Food X and b is the unit cost for Food Y. By changing a and b we can change the cost function which could lead to a different optimal solution. The values of a and b in Vitamins.xls are initially set to 0 .35 and 0.45 respectively.
Since there is no "shading" or "fill" tool in Excel, you must be able to the correctly identify the feasible region from the Excel graph by visualizing those points in the first quadrant that satisfy all of the constraints. Each of the vitamin constraints in the Vitamins problem defines a region on or above a boundary line.
![]() |
![]() |
The actual feasible region is unbounded. In the figure on the right, the feasible region is the un-shaded part. The four corner points P, Q, R, and S are listed in counter-clockwise order:
P (0.00, 15.00), Q (1.75, 6.25), R (6.75, 1.25), and S (9.00, 0.00).
It may be necessary to use zoom control in order to see each of the corner points clearly. The square dots correspond to a $4.00 cost. The dotted line with the double headed arrows corresponds to a line with an approximate $6.00 cost. All cost lines, called iso-value lines or level curves, are parallel to each other. The slope of an iso-cost line is determined by the coefficients a and b of the cost function. Observe that the associated costs decrease as the iso-cost lines get closer to the origin (0,0). Click on the middle part of the cost line with the arrows and slowly move it toward the origin. You should observe that the last iso-value line in contact with the feasible region contains the corner point R(6.75, 1.25). This point corresponds to a minimum cost. We can verify this observation by evaluating all four corner points in the objective function.
![]()
Copyright © Joseph F. Aieta, Babson
College 1997