start excel build or retrieve your optimization model save your workbook!! choose “solver…” in...

17
START EXCEL BUILD OR RETRIEVE YOUR OPTIMIZATION MODEL SAVE YOUR WORKBOOK!! SAVE YOUR WORKBOOK!! CHOOSE “Solver…” IN THE “Tools” MENU SPECIFY IN SOLVER DIALOG BOX: 1. CELL TO BE OPTIMIZED 2. CHANGING CELLS 3. CONSTRAINTS IN OPTIONS DIALOG, CLICK “ASSUME LINEAR MODEL” & CLICK THE “OK” BUTTON CLICK ON “SOLVE” BUTTON TO BEGIN OPTIMIZATION REVIEW SOLVER COMPLETION MESSAGE MODIFY MODEL Solver Flowchart Solver Flowchart

Upload: john-cummings

Post on 25-Dec-2015

225 views

Category:

Documents


2 download

TRANSCRIPT

START EXCEL

BUILD OR RETRIEVE YOUROPTIMIZATION MODEL

SAVE YOUR WORKBOOK!!SAVE YOUR WORKBOOK!!

CHOOSE “Solver…” IN THE “Tools” MENU

SPECIFY IN SOLVER DIALOG BOX:1. CELL TO BE OPTIMIZED 2. CHANGING CELLS

3. CONSTRAINTS

IN OPTIONS DIALOG, CLICK “ASSUME LINEAR MODEL” & CLICK THE “OK” BUTTON

CLICK ON “SOLVE” BUTTON TO BEGIN OPTIMIZATION

REVIEW SOLVER COMPLETION MESSAGE

MODIFY MODEL

SolverFlowchartSolverFlowchart

SolverFlowchart

SolverFlowchart

SOLVER FOUNDOPTIMUM SOLUTION?

NO

YES

CLICK “KEEP SOLVER SOLUTION”& CLICK “OK” BUTTON

WANT TO CHANGE MODELAND RE-OPTIMIZE?

NO

YES

SAVE FINAL MODEL AND EXIT EXCEL

Overview of Solver

Objective function

Decision variables

Constraints

Constraint functions (LHS)

RHS

LP Model

Set Cell

Changing Variable Cells

Constraints

Constraint Cell Reference

Constraint or Bound

Assume Linear Model orStandard Simplex LP

LP Modeling TerminologyLP Modeling Terminology Solver TerminologySolver Terminology

NOTE: if you get a negative decision and it is not meaningful to your model, be sure to specify the nonnegativity constraints in your LP model before optimizing with Solver.

The Solver Parameters dialog box will appear.

By default, Max is selected (for maximization) and the cursor is in the first edit field: Set Target Cell.

Look for the Premium button. If it is not there, then you have not installed Premium Solver for Education (available from the CD). Please install this version.

Clicking on Premium allows you to specify the type of optimization that it will perform.

We will use the default Standard Simplex LP optimization.

With your cursor in the Set Target Cell: edit field, specify the cell to be optimized (i.e., your model’s performance measure).

The easiest way to do this is to move the dialog (drag the title bar) so that cell D4 is exposed and then click on that cell.

You can also click on the button in the edit field of the dialog to collapse the dialog, click on the cell, and then click on the button to expand the dialog.

The Equal to: field allows you to specify the type of optimization. You can either maximize or minimize the performance variable or cause the Target Cell to be equal to a value of your choosing (select Value of:).

Specify the Oak Product model’s decision variables (cells B4:C4) in the By Changing Cells: edit field.

To specify the constraints, click on the Add button to open the Add Constraint dialog.

For the LHS of the constraint, specify the cell ranges for the Total LHSTotal LHS of

either one constraint or a

group of similar constraints (i.e.,

constraints with the same inequality) in the Cell Reference: edit field of the Add Constraint dialog.

For the RHS of the constraint, specify the cell ranges of either one resource limitation or a group of similar limitations in the Constraint: edit field.

Note that when specifying many constraints at the same time, the number of cells referenced in the LHS must equal the number in the RHS.

Click Add to add these constraints to Solver.

Note that the inequality is > for this constraint.

Finally, add the Chair Production

constraint.

Here is the resulting Solver dialog after adding all of the constraints:

Now, in the Solver Parameters dialog, click the Options button to specify a linear model.

In the resulting Solver Options dialog, click on the following options:

Assume Linear Model

Assume Non-Negative

Use Automatic Scaling

(Specifies an LP model, same as

Standard Simplex LP)

(Apply nonnegativity constraints)

(to be discussed later)

It is important to check to see if Solver found a solution and if all constraints and optimality conditions were satisfied. This information will be displayed in the first sentence in this dialog. ALWAYS READ THIS SENTENCE!ALWAYS READ THIS SENTENCE!

Click OK to return to the Solver Parameters window and then click Solve to start the optimization.Remember that this is an iterative technique and may take a few seconds or a few minutes depending on the size of the model.When completed, the Solver Results dialog will appear.

Upon the successful completion of the Solver program, you have the following options:

Keep the Solver Solution

Restore the Original Values (throw the solution away)

Receive up to three reports on the solution (each formatted as a new worksheet added to the Excel workbook.

NOTE: The Premium edition may also list an Infeasibility Report and a Non-Linear Report if there is a problem.

Recommendations for Solver

Three LP modeling habits you should develop for better use of Solver:

1. Make sure the numbers in your LP model are scaled such that the difference between the smallest and largest numbers in the spreadsheet is no more than 6 or 7 digits of precision (e.g., .05 and 10.00 is an acceptable range while .05 and 1,000,000 is not).

2. All RHS’s in the Constraints section of the Solver Parameters dialog should contain cell references (to the RHS cells in the spreadsheet model itself), and

Recommendations for Solver

The RHS cells on the spreadsheet model itself should contain constants and not formulas (or more precisely, no formulas that involve decision variables directly or indirectly).

3. Use Excel’s Range Naming commands to give range names to the performance measure cell, its decision cells, its constraint function (Total LHS) cells, and its RHS cells.

Recommendations for Solver

These names will automatically be substituted for the corresponding cell ranges in the Solver Parameters dialog.