Introduction To Solver: Smalcolm - Doc, and The Excel File Malcolm - XLS) - The Sample Excel
Introduction To Solver: Smalcolm - Doc, and The Excel File Malcolm - XLS) - The Sample Excel
5 X2
60
1 X1 +
0 X2
10 X1 +
20 X2
150
1 X1 +
0 X2
0 X1 +
1 X2
The Excel file malcolm.xls shows how to set up the problem for solution
with Solver. Figure 1 shows the LP Formulation worksheet from
malcolm.xls.
When you set up a problem for Solver, you follow four steps:
1. Create a spreadsheet with all the information from the LP problem.
In the example (Figure 1) you can see the LP information in the first 10
rows.
2. Specify the target cell (which contains the formula for the
objective function) that you want to minimize, maximize, or set to a
certain value. In MALCOLM.XLS, the target cell is F2, which contains
the formula =+B4*B2+C4*C2.
3. Specify the changing cells (called decision variables in LP
lexicon) that you want to be adjusted until a solution is found. You can
specify up to 200 changing cells, but for this problem we only need 2.
The number of cases of 6-oz. glasses to be produced appears in cell B2
(in hundreds of cases), and the number of cases of 10-oz. glasses to be
produced appears in cell C2. It doesnt matter what exact values you
put into these cells, because Solver will change them anyway, but you
do need to put some feasible starting values in the cells. In this
example the starting values are set to 1.
4. Specify constraint cells that must fall within certain limits or satisfy
target values. You can specify up to 500 constraints, 2 for each
changing cell plus 100 additional constraints, representing a total of no
more than 1000 cells in a problem. In this example there are five
constraints.
In the example, the constraint cells are D13 through D17. Each of
these cells contains a formula which refers to the constraint matrix
from B6 to D10. For example, cell D13 contains the formula
=+B6*B2+C6*C2, cell D14 contains the formula =+B7*B2+C7*C2, and
so forth.
After setting up the problem, select Tools - Solver to open up the
Solver Parameters dialog box (Figure 2).
Decision Models
Prof. Juran
In this dialog box, you specify (1) the target cell containing the formula
for the objective function (F2 in the example); (2) the range of cells
containing the decision variables, which Solver calls changing cells
(B2.C2 in the example); (3) a set of constraints, clicking on the Add
button to use the Add Constraint dialog box (Figure 3). Dont forget
to choose the appropriate Equal to radio button for the problem; in
this case we want to maximize profit so we select Max.
The completed Solver Parameters dialog box for the example problem
appears as Figure 4.
After setting up the problem, click on the Solve button and wait for
Solver to find a solution. You can create three types of reports that
summarize the results of a successful solution process. For the
purposes of this course, we are interested in the Answer Report
(Figure 5) and the Sensitivity Report (Figure 6).
Decision Models
Prof. Juran
Prof. Juran
than $2.86 per unit. You may recall that storage space was defined in
hundredths in our formulation, so Malcolm should be prepared to spend
up to $.0286 per cubic foot per week for additional storage space.
Decision Models
Prof. Juran
profit this week in order to keep a loyal customer. The point here is that
the results of any mathematical model ought to be scrutinized with
common sense before being implemented.
(2) Solver is a relatively new optimization tool, and does not yet
completely replace older and more powerful software (e. g. Lindo,
Storm, AMPL). In this class we are using Solver for its accessibility, as a
vehicle to introduce basic concepts of linear optimization with a
familiar spreadsheet package. To solve more complicated problems,
you will probably want to take a course in mathematical programming
or solicit the help of someone who has.
(3) Some users have reported computational problems with Solver.
There are some problems, for example, for which Solver comes up with
different answers depending on the initial values of the changing cells.
One way to help avoid problems with this is to solve your problem
several times using different sets of initial changing cell values.
(4) When selecting reports for Solver to generate, hold down the Shift
key to select more than one type of report at a time.
Decision Models
Prof. Juran