The Simplex Method With Excel
The Simplex Method With Excel
Each shirt produces $26 in profit and each coat $57 in profit.
Find the number of shirts & coats which will maximize the profit.
What is this maximum profit?
1
Solution:
X1 = # shirts
X2 = # coats
X1 + 4X2 28
5X1 + 3X2 55
X2 – X 1 2
X1 + 2 X 2 4
Excel has an add-in called the Solver which may solve systems
of equations or inequalities. If Solver has not been activated on
your computer, do the following:
The Microsoft Excel spread sheet and instructions are shown on the
following page. Note - This was written for an older version of Excel.
Details of use will depend on what version you happen to be using.
2
Steps in using the Solver in Excel
Open EXCEL and enter the comment information in B2, B3, B5, B7, B8, B9, B10,
B11, B13, D5, F8, F9, F10, F11, G8, G9, G10, G11. Comment information is not
used in the EXCEL calculations. It helps the user to enter the correct information
in the equation information.
Enter the equation information.
Type in the following equations:
In Cell E8 type the following: = C5 + 4*E5 then hit the Enter key
In Cell E9 type the following: = 5*C5 + 3*E5 then hit the Enter key
In Cell E10 type the following: = E5 – C5 then hit the Enter key
In Cell E11 type the following: = C5 + 2*E5 then hit the Enter key
In Cell E13 type the following: = 26*C5 + 57*E5 then hit Enter key
[Notice that the formula cells will show zeros (C5 = 0, E5 = 0, E8 = 0, E9
= 0, E10 = 0, E11 = 0, E13 = 0), the data cells (C5, E5) will be blank]
Left-click on the optimization (target) cell, i.e., E13. We will maximize or minimize
this expression.
Left-click on Tools (with a newer version of Excel, click on Data and
you should see Solver show up on the extreme right) and select Solver.
If you don’t see Solver, you will need to activate it (see the instructions
appearing above).
Select the Max or Min circle as needed.
Make sure target cell is correct with E13
In the white box below By Changing Cells, left-click on the desired cell C5,
then add a comma. Left-click on the next desired cell E5.
Add constraints by left-clicking on the Add button on the right. Add the first
constraint by left-clicking on E8. Then chose test option <=. Then type the
constraint value of 28. Now repeat this process on E9, E10, and E11 by
left-clicking on Add. Left-click on OK on last constraint.
Select Options and check boxes for Linear Model (Simplex LP) and Non-
Negative (Make Unconstrained Variables Non-negative). Left-click on OK.
Left-click on Solve
If solutions are OK, then left-click on keep solutions.
3
Solution: x1 = 8 and x2 = 5; objective function = 493
Note: Click Options and check the Linear Model and Non-Negative.
Another example
Be sure to
Make the test >= in the Solver constraints
Click the Min (imize) circle in the Solver