Читать книгу Excel Data Analysis For Dummies - Paul McFedries - Страница 50

Optimizing a result with Solver

Оглавление

You set up your Solver model by using the Solver Parameters dialog box. In the Set Objective field, you specify the objective cell. You use the options in the To group to tell Solver what you want from the objective cell: the maximum possible value, the minimum possible value, or a specific value. Finally, you use the By Changing Variable Cells box to specify the cells that Solver can use to plug in values to optimize the result.

When Solver finds a solution, you can choose either Keep Solver Solution or Restore Original Values. If you choose Keep Solver Solution, Excel permanently changes the worksheet. You can’t undo the changes.

With your Solver-ready worksheet model prepared, here are the steps to follow to find an optimal result for your model using Solver:

1 Choose Data ⇒ Solver.Excel opens the Solver Parameters dialog box.

2 In the Set Objective box, enter the address of your model’s objective cell.In the example in the “When should you use Solver?” section, previously in the chapter (refer to Figure 2-11), the objective cell is B14. Note that if you click the cell to enter it, Solver automatically enters an absolute cell address (for example, $B$14 instead of B14). Solver works fine either way.

3 In the To group, select an option:Max: Returns the maximum possible value.Min: Returns the minimum possible value.Value Of: Enter a number to set the objective cell to that number.For the example model, I selected Value Of and entered 0 in the text box.

4 In the By Changing Variable Cells box, enter the addresses of the cells you want Solver to change while it looks for a solution.In the example, the changing cells are B4 and C4. Figure 2-12 shows the completed Solver Parameters dialog box. (What about constraints? I talk about those in the next section.)FIGURE 2-12: The completed Solver Parameters dialog box.

5 Click Solve.Solver gets down to business. As Solver works on the problem, the Show Trial Solution dialog boxes might show up one or more times.

6 In any Show Trial Solution dialog box that appears, click Continue to move things along.When the optimization is complete, Excel displays the Solver Results dialog box, shown in Figure 2-13.

7 Select the Keep Solver Solution option.If you don't want to accept the result, select the Restore Original Values option instead.

8 Click OK.

You can ask Solver to display one or more reports that give you extra information about the results. In the Solver Results dialog box, use the Reports list to select each report you want to view:

 Answer: Displays information about the model’s objective cell, variable cells, and constraints. For the objective cell and variable cells, Solver shows the original and final values.

 Sensitivity: Attempts to show how sensitive a solution is to changes in the model’s formulas. The layout of the Sensitivity report depends on the type of model you’re using.

 Limits: Displays the objective cell and its value, as well as the variable cells and their addresses, names, and values.

Solver can use one of several solving methods. In the Solver Parameters dialog box, use the Select a Solving Method list to select one of the following:

 Simplex LP: Use if your worksheet model is linear. In the simplest possible terms, a linear model is one in which the variables are not raised to any powers and none of the so-called transcendent functions — such as SIN and COS — are used.

 GRG Nonlinear: Use if your worksheet model is nonlinear and smooth. In general terms, a smooth model is one in which a graph of the equation doesn’t show sharp edges or breaks.

 Evolutionary: Use if your worksheet model is nonlinear and nonsmooth.

Do you have to worry about any of this? Almost certainly not. Solver defaults to using GRG Nonlinear, and that should work for almost anything you do with Solver.


FIGURE 2-13: The Solver Results dialog box and the solution to the break-even problem.

Excel Data Analysis For Dummies

Подняться наверх