PowerPoint Slides Prepared By: Tava Olsen Washington University in St. Louis
7-1
8-1
Optimization
Find the best set of decisions for a particular measure of performance Includes:
The goal of finding the best set The algorithms to accomplish this goal
8-2
Standard with Excel Comes with text install off text CD More advanced than standard solver Is preferred tool throughout text Click on Premium button in Solver Parameters window to toggle to premium version
8-3
Decision Variables
Levers to improve performance Want to find the best values for the variables Finding these best values can be challenging
Need Solvers sophisticated software Still relatively easy to construct models beyond Solvers capabilities
8-4
Maximize, minimize, or set equal to target value Decision variables Restrictions on decision variables
Changing cells
Constraints
Solver Window
***insert Figure 8.2
8-6
Adding Constraints
Click on Add button in Parameters window
8-7
Solver Options
Only used if need intermediate results e.g., for debugging
Formulation
Decision variables
What must be decided? Be explicit with units What measure compares decision variables? Use only one measure put in target cell What restrictions limit our choice of decision variables?
8-9
Objective function
Constraints
Constraints
Left-hand-side (LHS)
Usually a function Usually a number (i.e., a parameter) LHS <= RHS LHS >= RHS LHS = RHS (LT constraint) (GT constraint) (EQ constraint)
8 - 10
Right-hand-side (RHS)
Types of Constraints
LT constraints (LHS<=RHS)
Capacities or ceilings Commitments or thresholds Material balance Define related variables consistently
8 - 11
GT constraints (LHS>=RHS)
EQ constraints (LHS=RHS)
8 - 12
Layout
Organize in modules
Decision variables, objective function, constraints Use color or border highlighting Use SUM or SUMPRODUCT where appropriate
Group LT, GT, EQ, constraints together Enter as ranges LHS will be matched with RHS in one-to-one correspondence
8 - 14
Results
Optimal values of decision variables
Best course of action for the model Best level of performance possible Constraint is tight or binding if LHS=RHS in LT or GT constraint, otherwise slack
8 - 15
Constraint outcomes
Optimization Solution
Tactical information
Plan for decision variables What factors could lead to better levels of performance? Binding constraints are economic factors that restrict the value of the objective
Strategic information
8 - 16
Model Classification
Linear optimization or linear programming
Objective and all constraints are linear functions of the decision variables
Either objective or a constraint (or both) are nonlinear functions of the decision variables
8 - 17
Hill Climbing
Technique used by Solver for nonlinear optimization Called GRG (Generalized Reduced Gradient) algorithm Hill climbing in a fog
Try to follow steepest path going up After each step, or group of steps, again find steepest path and follow it Stop if no path leads up
8 - 18
What the GRG algorithm locates Except in special circumstances, there is no way to guarantee that a local optimum is the global optimum If multiple local optima, then which is found depends on starting point for decision variables may want to run Solver starting from multiple points
8 - 19
8 - 20
8 - 21
Integer Values
If fractional decision variables not appropriate Integer linear programming
Implicitly enumerate all possible assignments of integer values runs simplex algorithm for each Reliable solution but may take a while
Curve fitting
Inputs similar to Data Sensitivity tool Shows effect of parameter changes on optimal value of objective
8 - 24
Covering models
Blending models
Network models
Model Scaling
Consider scaling parameters to appear in thousands or millions Saves work in data entry decreases errors Spreadsheet looks less crowded Helps with Solver algorithms
Value of objective, constraints, and decision variables should not differ from each other by more than a factor of 1000, at most 10,000
Can always display model output on separate sheet with separate units
8 - 26
Automatic Scaling
Use if scaling problems difficult to avoid Consider when:
Solver claims linearity conditions not met in a model that is definitely linear Solver reports convergence but not that the optimality conditions are satisfied in a nonlinear model
Outside this interval a different set of values is optimal for decision variables
8 - 28
Shadow Prices
Improvement in objective function from a unit increase (or decrease) in RHS of constraint Presented in third column of Solver Table from Solver Sensitivity Break-even price where attractive to acquire more of a scarce resource
8 - 29
Marginal value (shadow price) of capacity remains constant Some variables change linearly with capacity Others remain the same
Below this interval the value decreases and eventually reaches zero
8 - 30
Leads to more convincing explanations for solutions Can anticipate answers to what-if questions Provides a level of understanding that enhances decision making
After optimization should always try to discern the qualitative pattern in the solution
8 - 31
Constructing Patterns
Decision variables
Constraints
Determine one variable at a time Can be interpreted as a list of priorities which reveal the economic forces at work
8 - 32
Defining Patterns
Qualitative description Pattern should be complete and unambiguous
Leads to full solution Always leads to same solution Should be able to trace the incremental changes to derive shadow price of constraint
8 - 33
Integer Programming
Fractional solutions are less important for strategic rather than tactical implications of model Solver constraints window allows choices of int and bin for any variable
Binary Variables
All or nothing variables (0 or 1) Represent go/no-go decisions PROJi = Indicator for Project i =
Select at least m of the possible projects Select at most n of the possible projects
8 - 35
3. Contingency Constraints
Example: Project 4 cannot be done unless Project 2 is done
PROJ4 PROJ2 or PROJ4 - PROJ2 0
8 - 36
Excel Use
The logical functions in Excel (IF, AND, OR, etc.) can express logical relationships Such functions are nonlinear Models with IF statements will often stop at local optimum Using binary variables is the preferred approach
8 - 37
Fixed Costs
F fixed cost c per unit cost x units of activity (regular variable) y go/no go of activity (binary variable) Cost = Fy + cx Constraint: x <= My or x - My <= 0
8 - 38
Threshold Levels
A decision variable must be at least as large as a specified minimum m, else it is zero x units of activity (regular variable) y go/no go of activity (binary variable) Constraints:
x >= my or x my >=0 x <= My or x - My <= 0 M = upper bound on x x >= m if y=1 (must meet minimum level if go) x = 0 if y=0 (cant have activity if no-go)
8 - 39
Use linear models in preference to nonlinear Use the weak form of a constraint
8 - 40
8 - 41
Summary
Optimization: what values of the decision variables lead to the best possible value of the objective? Excel Solver: Collection of procedures
Steps: Formulating, Solving, and Interpreting Results Results still need to be interpreted in the real world