Вы находитесь на странице: 1из 7

Appendix A

Using the Solver Table

Solver Table is an add-in developed by the authors that is useful for doing sensitivity analysis on

any spreadsheet model that has been solved using the Solver. In particular, it will allow you to

vary one or two data cells in a model and see the impact on the optimal values of the changing

cells, the target cell, and/or any other output cells of interest. The Solver Table add-in and

installation instructions are contained on the CD-ROM that is packaged with this textbook. This

appendix gives instructions for using the Solver Table add-in. We also will use the Wyndor

Glass Co. problem from Chapters 2 and 5 to illustrate the use of Solver Table

Using Solver Table to Do One-Way Sensitivity Analysis

Solver Table is used to show the results in the changing cells and/or certain output cells

for various trial values in a data cell. For each trial value in the data cell, Solver is called on to

re-solve the problem.

Before using Solver Table, the model must first be developed in the spreadsheet in the

usual way, including entering all of the appropriate parameters into the Solver (e.g., the location

of the target cell, changing cells, constraints, etc.). Figure A.1 shows the spreadsheet solution for

the Wyndor Glass Co. problem. Although this particular example is a linear programming model,

Solver Table also can be used on integer and nonlinear programming models, as well as on any

other model that can be solved using Solver.


Appendix A Installing and Using the Solver Table

A B C D E F G
1 Wyndor Glass Co. Product-Mix Problem
2
3 Doors Windows
4 Unit Profit $300 $500
5 Hours Hours
6 Hours Used Per Unit Produced Used Available
7 Plant 1 1 0 2 <= 4
8 Plant 2 0 2 12 <= 12
9 Plant 3 3 2 18 <= 18
10
11 Doors Windows Total Profit
12 Units Produced 2 6 $3,600
Figure A.1. The spreadsheet model for the Wyndor Glass Co. product-mix problem.

After formulating the model in a spreadsheet, Solver Table can then be used to determine

how the optimal solution will change for various trial values of a data cell (for example, the unit

profit from producing doors in the Wyndor problem). To use Solver Table, make a table on the

spreadsheet, with column headings for the data cell that will be changing, followed by any output

cells of interest, such as the changing cells and/or the target cell. For the Wyndor example, the

table might appear as in Figure A.2.

B C D E
16 Unit Profit Optimal Units Produced Total
17 for Doors Doors Windows Profit
18 =C12 =D12 =G12
19 $100
20 $200
21 $300
22 $400
23 $500
24 $600
25 $700
26 $800
27 $900
28 $1,000
Figure A.2. A table in a spreadsheet set up for Solver Table to determine the optimal solution

for various trial values of a data cell.

A-2
Appendix A Installing and Using the Solver Table

In the first column of the table (cells B18:B28 in Figure A.2), list the trial values for the data cell

(the unit profit for doors in this example), except leave the first row blank. The headings of the

next columns specify which output will be evaluated. For each of these columns, use the first

row of the table (cells C18:E18 in Figure A.2) to write an equation that refers to the relevant

changing cell or output cells of interest. In this example, the cells of interest are the doors

produced (C12), windows produced (D12), and total profit (G12), so the equations for C18:E18

are those shown in Figure A.2.

Next, select the entire table (not including the text headings). For this example, you

would click and drag from cell B18 through E28. Then choose Solver Table from the Add-Ins

tab (for Excel 2007 or 2010) or the Tools menu (for other versions of Excel). In the Solver Table

dialogue box (shown in Figure A.3), indicate the column input cell (C4 for this example), which

refers to the data cell that is being changed in the first column of the table. Nothing is entered for

the row input cell because no row is being used to list the trial values of a data cell in this case.

Figure A.3. The Solver Table dialogue box

Clicking on the OK button then generates the Solver Table automatically. One at a time,

the trial values listed in the first column of the table are put into the column input cell and then

Solver Table calls on the Solver to re-solve the problem. Then, since the first row of the Solver

Table has equations pointing to the output cells that now hold the new optimal solution, the first

row of the Solver Table will also show the optimal results for that particular trial value of the

A-3
Appendix A Installing and Using the Solver Table

column input cell. Solver Table copies these results from the first row of the table into the

corresponding row of the table for that trial value. This process is then repeated automatically for

each remaining trial value in the first column of the table. The end result when Solver Table is

finished (which happens very quickly for small problems) is that the Solver Table is completely

filled in (as shown in Figure A.4) and shows the optimal results for all trial values of the column

input cell. (The numbers currently displayed in the first row of the table in Figure A.4 come from

the original solution in the spreadsheet before changing the original value in the column input

cell.)

B C D E
16 Unit Profit Optimal Units Produced Total
17 for Doors Doors Windows Profit
18 2 6 $3,600
19 $100 2 6 $3,200
20 $200 2 6 $3,400
21 $300 2 6 $3,600
22 $400 2 6 $3,800
23 $500 2 6 $4,000
24 $600 2 6 $4,200
25 $700 2 6 $4,400
26 $800 4 3 $4,700
27 $900 4 3 $5,100
28 $1,000 4 3 $5,500
Figure A.4. The completed Solver Table showing the optimal solution for the Wyndor Glass

Co. product-mix problem for various trial values of a data cell.

A-4
Appendix A Installing and Using the Solver Table

Summary of Steps to Create a One-Way Solver Table

1. Create a column heading for both the data cell to be changed and the output cells of interest.

2. In the first column of the table (skipping the first row), list the trial values for the data cell to be changed.

3. In the first row of the table, write equations referring to the output cells of interest.

4. Select the entire table (not including the headings).

5. Choose Solver Table from the Add-Ins tab (for Excel 2007 or 2010) or Tools menu (for other versions).

6. Enter the location of the data cell to be changed in the Column Input Cell box, and press OK.

Using Solver Table to Do Two-Way Sensitivity Analysis

A two-way Solver Table provides a way of systematically investigating the effect of

simultaneously changing two different data cells (for example, the unit profit for both doors and

windows in the Wyndor Glass Co. problem). This kind of Solver Table shows the results in a

single output cell for various trial values in two data cells. For example, it can be used to show

how the total profit (G12 in Figure A.1) varies over a range of trial values in the two data cells,

such as the unit profits. For each pair of trial values in the data cells, Solver is called on to re-

solve the problem.

To create a two-way Solver Table for the problem, expand the original spreadsheet to

make a table with column and row headings like those shown in Figure A.5. In the upper-left-

hand corner of the table (C17 in Figure A.5), write an equation that refers to the output cell of

interest. In this Wyndor example, =G12 is entered in cell C17 to show the results of the target

cell. In the first column of the table (column C, below the equation in cell C17 in Figure A.5),

insert various trial values for the first data cell of interest (the unit profit for doors for this

example). In the first row of the table (row 17, to the right of the equation in cell C17 in Figure

A-5
Appendix A Installing and Using the Solver Table

A.5), insert various trial values for the second data cell of interest (the unit profit for windows for

this example).

B C D E F G H
16 Total Profit Unit Profit for Windows
17 =G12 $100 $200 $300 $400 $500
18 $300
19 Unit Profit $400
20 for Doors $500
21 $600
Figure A.5. A table in a spreadsheet set up for Solver Table to determine the optimal total profit

for the Wyndor Glass Co. product-mix problem for various trial values of two data

cells.

Next, select the entire table (not including the text headings). For this example, you

would click and drag from cell C17 through H21. Then choose Solver Table from the Add-Ins

tab (for Excel 2007 or 2010) or the Tools menu (for other versions of Excel). In the Solver Table

dialogue box (shown in Figure A.6), indicate which data cells are being changed simultaneously.

The column input cell C4 refers to the data cell whose various trial values are listed in the first

column of the table (C18:C21), while the row input cell refers to the data cell whose various trial

values are listed in the first row of the table (D17:H17).

Figure A.6. The Solver Table dialogue box

A-6
Appendix A Installing and Using the Solver Table

Clicking on the OK button then generates the Solver Table automatically. One at a time,

a pair of trial values listed in the first column and first row of the table are put into the column

input cell and row input cell, respectively, and then the Solver Table calls on Solver to re-solve

the problem. Then, since the cell in the upper left-hand corner of the Solver Table (C17 for this

example) has an equation referring to the output cell of interest (the target cell for this example)

that now holds the new optimal solution, the cell in the upper left-hand corner now also shows

the optimal result for that particular pair of trial values. Solver Table copies this result into the

corresponding entry in the row and column of the table for that trial value pair. This process is

then repeated automatically for each remaining trial value pair. The end result when Solver Table

is finished is that the Solver Table is completely filled in (as shown in Figure A.7) and shows the

optimal result for all trial value pairs. (The number currently displayed in C17 in Figure A.7

comes from the original solution in the spreadsheet before changing the original values in the

column and row input cells.)

B C D E F G H
16 Total Profit Unit Profit for Windows
17 $3,600 $100 $200 $300 $400 $500
18 $300 $1,500 $1,800 $2,400 $3,000 $3,600
19 Unit Profit $400 $1,900 $2,200 $2,600 $3,200 $3,800
20 for Doors $500 $2,300 $2,600 $2,900 $3,400 $4,000
21 $600 $2,700 $3,000 $3,300 $3,600 $4,200
Figure A.7. The completed two-way Solver Table showing the optimal total profit for the

Wyndor Glass Co. product-mix problem for various trial values of two data cells.

Summary of Steps to Create a Two-Way Solver Table

1. In the first row of the table, list the trial values for the first data cell to be changed.

2. In the first column of the table, list the trial values for the second data cell to be changed.

3. In the upper-left corner of the table, write an equation referring to the output cell of interest.

4. Select the entire table (not including the headings).

5. Choose Solver Table from the Add-Ins tab (for Excel 2007 or 2010) or Tools menu (for other versions).

6. Enter the cell location of the first data cell to be changed in the Row Input Cell box.
A-7
7. Enter the cell location of the second data cell to be changed in the Column Input Cell box and press OK.

Вам также может понравиться