Download presentation
Presentation is loading. Please wait.
Published byBonnie Hudson Modified over 8 years ago
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
2
8 - 2 Excel Optimization Software Solver Standard with Excel Premium Solver for Education 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
3
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 Solver’s sophisticated software Still relatively easy to construct models beyond Solver’s capabilities
4
8 - 4 Solver Parameters Window Target Cell Maximize, minimize, or set equal to target value Changing cells Decision variables Constraints Restrictions on decision variables Should predict outcome before clicking Solve button
5
8 - 5 Solver Window ***insert Figure 8.2
6
8 - 6 Adding Constraints Click on Add button in Parameters window Use formula cell on leftUse number cell on right
7
8 - 7 Solver Options Check if decision variables known to be non-negative Scaling discussed later – usually not needed Check unless want to use reports Only used if need intermediate results e.g., for debugging
8
8 - 8 Formulation Decision variables What must be decided? Be explicit with units Objective function What measure compares decision variables? Use only one measure – put in target cell Constraints What restrictions limit our choice of decision variables?
9
8 - 9 Constraints Left-hand-side (LHS) Usually a function Right-hand-side (RHS) Usually a number (i.e., a parameter) Three types of constraints LHS <= RHS(LT constraint) LHS >= RHS(GT constraint) LHS = RHS(EQ constraint)
10
8 - 10 Types of Constraints LT constraints (LHS<=RHS) Capacities or ceilings GT constraints (LHS>=RHS) Commitments or thresholds EQ constraints (LHS=RHS) Material balance Define related variables consistently
11
8 - 11 A Standard Model Template Is Recommended Enhances ability to communicate Provides common language Reinforces understanding how models shaped Improves ability to diagnose errors Permits scaling more easily
12
8 - 12 Layout Organize in modules Decision variables, objective function, constraints Place decision variables in single row or column Use color or border highlighting Place objective in single highlighted cell Use SUM or SUMPRODUCT where appropriate Arrange constraints to make LHS and RHS clear Use SUMPRODUCT for LHS where appropriate
13
8 - 13 Ranges for Decision Variables and Constraints Changing cells allows for commas but better to put in one contiguous range Add Constraint window allows for ranges Group LT, GT, EQ, constraints together Enter as ranges LHS will be matched with RHS in one-to-one correspondence
14
8 - 14 Results Optimal values of decision variables Best course of action for the model Optimal value of objective function Best level of performance possible Constraint outcomes Constraint is tight or binding if LHS=RHS in LT or GT constraint, otherwise slack
15
8 - 15 Optimization Solution Tactical information Plan for decision variables Strategic information What factors could lead to better levels of performance? Binding constraints are economic factors that restrict the value of the objective
16
8 - 16 Model Classification Linear optimization or linear programming Objective and all constraints are linear functions of the decision variables Nonlinear optimization or nonlinear programming Either objective or a constraint (or both) are nonlinear functions of the decision variables Techniques for solving linear models are more powerful Use wherever possible
17
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
18
8 - 18 Local and Global Optimum The highest peak is the global optimum What we want to find Any peak higher than all points around it is a local optimum 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
19
8 - 19 Properties of Linear Functions Additivity Proportionality Divisibility
20
8 - 20 1.Start with a feasible set of decision variables that corresponds to a corner on a diamond 2.Check to see if a feasible neighboring corner point is better 3.If not, stop; otherwise move to that better neighbor and return to step 2 Guaranteed to converge to the global optimal solution The Simplex Algorithm For Linear Optimization
21
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 Integer nonlinear programming Solver’s solutions cannot be considered reliable
22
8 - 22 Nonlinear Programming Problems Revenue maximization Maximize revenue in the presence of a demand curve Curve fitting Fit a function to observed data points Economic Order Quantities Trade-off ordering and carrying costs for inventory
23
8 - 23 Sensitivity Analysis for Nonlinear Programs Solver Sensitivity Found under Sensitivity Toolkit Inputs similar to Data Sensitivity tool Shows effect of parameter changes on optimal value of objective Resolves optimization for each input value
24
8 - 24 Linear Programming Problems Allocation models Maximize objective (e.g., profit) subject to LT constraints on capacity Covering models Minimize objective (e.g., cost) subject to GT constraints on required coverage Blending models Mix materials with different properties to find best blend Network models Describe patterns of flow in a connected system
25
8 - 25 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
26
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 Preferable for model-builder to do the scaling
27
8 - 27 Sensitivity Analysis for Linear Programs A distinct pattern to the change in the optimal solution when varying a coefficient in the objective function In some interval around the base case No change in optimal decisions Objective will change if decision variable is positive Outside this interval a different set of values is optimal for decision variables
28
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
29
8 - 29 Sensitivity Analysis for Binding Capacity Constraints A distinct pattern in sensitivity tables when varying availability of scare resource In some interval around the base case: 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
30
8 - 30 Patterns in Linear Programming Solutions The optimal solution tells a “story” about a pattern of economic priorities 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
31
8 - 31 Constructing Patterns Decision variables Which are positive and which are zero? Constraints Which are binding and which are not? “Construct” the optimal solution from the given parameters Determine one variable at a time Can be interpreted as a list of priorities which reveal the economic forces at work
32
8 - 32 Defining Patterns Qualitative description Pattern should be complete and unambiguous Leads to full solution Always leads to same solution Ask where shadow prices come from Should be able to trace the incremental changes to derive shadow price of constraint
33
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 int: variable must be an integer bin: variable must be binary, i.e, 0 or 1 Tolerance parameter under options Distance away from the optimal solution given solution allowed to be Default is 5% (quite large) – allows for fast solutions
34
8 - 34 Binary Variables All or nothing variables (0 or 1) Represent go/no-go decisions PROJ i = Indicator for Project i = Can use to represent structural or policy relationships Select at least m of the possible projects Select at most n of the possible projects 1 accept Project i 0 reject Project i
35
8 - 35 Logical Relationships with Binary 0/1 Variables 1. K out of N Projects Constraint Example: Must Choose at least one of Projects 5, 6, 7 2. Mutually Exclusive Constraints Example: Can’t select both Project 1 and Project 3 3. Contingency Constraints Example: Project 4 cannot be done unless Project 2 is done PROJ 1 + PROJ 3 1 PROJ 4 PROJ 2 or PROJ 4 - PROJ 2 0 PROJ 5 + PROJ 6 + PROJ 7 1
36
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
37
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 M = upper bound on x x =0 if y=0 (can’t have activity if no-go)
38
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 (can’t have activity if no-go)
39
8 - 39 Guidelines for Optimization Modeling Follow a standard form whenever possible Enter cell references in Solver windows Keep numerical values in cells Use linear models in preference to nonlinear Use the weak form of a constraint Give the model maximum flexibility
40
8 - 40 Guidelines for Optimization Modeling (Continued) Explore some feasible (and infeasible) possibilities as a way of debugging Test intuition and suggest hypotheses before running Solver Identify the patterns of economic priorities that appear in the solution
41
8 - 41 Summary Optimization: what values of the decision variables lead to the best possible value of the objective? Excel Solver: Collection of procedures Linear, (linear) integer, non-linear programs Steps: Formulating, Solving, and Interpreting Results Results still need to be interpreted in the real world Look for the pattern, or economic priorities, in solution
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.