Download presentation
Presentation is loading. Please wait.
1
BUS 304 OPERATIONS RESEARCH
Applications of LP, Network, IP, NLP Applications of Decision A. and Project M. Inventory Modeling Queueing Analysis Markov Processes Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
2
Introduction to Optimization and Linear Programming
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
3
Applications of Mathematical Optimization
Determining Product Mix Manufacturing Routing and Logistics Financial Planning Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
4
Characteristics of Optimization Problems
Decisions Variables Constraints Objectives Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
5
General Form of a Linear Programming (LP) Problem
MAX (or MIN): c1X1 + c2X2 + … + cnXn Subject to: a11X1 + a12X2 + … + a1nXn <= b1 : ak1X1 + ak2X2 + … + aknXn >=bk am1X1 + am2X2 + … + amnXn = bm Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
6
An Example LP Problem Blue Ridge Hot Tubs produces two types of hot tubs: Aqua-Spas & Hydro-Luxes. Aqua-Spa Hydro-Lux Pumps 1 1 Labor 9 hours 6 hours Tubing 12 feet 16 feet Unit Profit $350 $300 There are 200 pumps, 1566 hours of labor, and 2880 feet of tubing available. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
7
5 Steps In Formulating LP Models:
1. Understand the problem. 2. Identify the decision variables. X1=number of Aqua-Spas to produce X2=number of Hydro-Luxes to produce 3. State the objective function as a linear combination of the decision variables. MAX: 350X X2 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
8
5 Steps In Formulating LP Models (continued)
4. State the constraints as linear combinations of the decision variables. 1X1 + 1X2 <= 200 } pumps 9X1 + 6X2 <= 1566 } labor 12X1 + 16X2 <= 2880 } tubing 5. Identify any upper or lower bounds on the decision variables. X1 >= 0 X2 >= 0 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
9
Summary of the LP Model for Blue Ridge Hot Tubs
MAX: 350X X2 S.T.: 1X1 + 1X2 <= 200 9X1 + 6X2 <= 1566 12X1 + 16X2 <= 2880 X1 >= 0 X2 >= 0 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
10
Solving LP Problems: An Intuitive Approach
Idea: Each Aqua-Spa (X1) generates the highest unit profit ($350), so let’s make as many of them as possible! How many would that be? Let X2 = 0 1st constraint: 1X1 <= 200 2nd constraint: 9X1 <= or X1 <=174 3rd constraint: 12X1 <= or X1 <= 240 If X2=0, the maximum value of X1 is 174 and the total profit is $350*174 + $300*0 = $60,900 This solution is feasible, but is it optimal? No! Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
11
Solving LP Problems: A Graphical Approach
The constraints of an LP problem defines its feasible region. The best point in the feasible region is the optimal solution to the problem. For LP problems with 2 variables, it is easy to plot the feasible region and find the optimal solution. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
12
boundary line of pump constraint
Plotting the First Constraint X2 250 (0, 200) 200 boundary line of pump constraint X1 + X2 = 200 150 100 50 (200, 0) 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
13
boundary line of labor constraint
Plotting the Second Constraint X2 (0, 261) 250 boundary line of labor constraint 200 9X1 + 6X2 = 1566 150 100 50 (174, 0) 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
14
boundary line of tubing constraint
Plotting the Third Constraint X2 250 (0, 180) 200 150 boundary line of tubing constraint 12X1 + 16X2 = 2880 100 Feasible Region 50 (240, 0) 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
15
Plotting A Level Curve of the Objective Function
X2 Plotting A Level Curve of the Objective Function 250 200 (0, ) objective function 150 350X X2 = 35000 100 (100, 0) 50 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
16
A Second Level Curve of the Objective Function
X2 250 (0, 175) objective function 200 350X X2 = 35000 objective function 150 350X X2 = 52500 100 (150, 0) 50 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
17
Using A Level Curve to Locate the Optimal Solution
X2 250 objective function 200 350X X2 = 35000 150 optimal solution 100 objective function 350X X2 = 52500 50 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
18
Calculating the Optimal Solution
The optimal solution occurs where the “pumps” and “labor” constraints intersect. This occurs where: X1 + X2 = (1) and 9X1 + 6X2 = (2) From (1) we have, X2 = 200 -X1 (3) Substituting (3) for X2 in (2) we have, 9X1 + 6 (200 -X1) = 1566 which reduces to X1 = 122 So the optimal solution is, X1=122, X2=200-X1=78 Total Profit = $350*122 + $300*78 = $66,100 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
19
Enumerating The Corner Points
X2 250 obj. value = $54,000 (0, 180) 200 obj. value = $64,000 150 (80, 120) obj. value = $66,100 100 (122, 78) 50 obj. value = $0 obj. value = $60,900 (0, 0) (174, 0) 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. Note: This technique will not work if the solution is unbounded.
20
alternate optimal solutions
X2 Example of Alternate Optimal Solutions 250 objective function level curve 450X X2 = 78300 200 150 100 alternate optimal solutions 50 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
21
Example of a Redundant Constraint
250 boundary line of tubing constraint 200 boundary line of pump constraint 150 boundary line of labor constraint 100 Feasible Region 50 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
22
Example of an Unbounded Solution
1000 objective function X1 + X2 = 600 -X1 + 2X2 = 400 800 objective function X1 + X2 = 800 600 400 200 X1 + X2 = 400 200 400 600 800 1000 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
23
Example of Infeasibility
250 200 X1 + X2 = 200 feasible region for second constraint 150 100 feasible region for first constraint 50 X1 + X2 = 150 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
24
Modeling and Solving LP Problems in a Spreadsheet
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
25
Introduction Solving LP problems graphically is only possible when there are two decision variables Few real-world LP have only two decision variables Fortunately, we can now use spreadsheets to solve LP problems Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
26
Spreadsheet Solvers The company that makes the Solver in Excel, Lotus 1-2-3, and Quattro Pro is Frontline Systems, Inc. Check out their web site: Other packages for solving MP problems: AMPL LINDO CPLEX MPSX Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
27
The Steps in Implementing an LP Model in a Spreadsheet
1. Organize the data for the model on the spreadsheet. 2. Reserve separate cells in the spreadsheet to represent each decision variable in the model. 3. Create a formula in a cell in the spreadsheet that corresponds to the objective function. 4. For each constraint, create a formula in a separate cell in the spreadsheet that corresponds to the left-hand side (LHS) of the constraint. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
28
Let’s Implement a Model for the Blue Ridge Hot Tubs Example...
MAX: 350X X2 } profit S.T.: 1X1 + 1X2 <= 200 } pumps 9X1 + 6X2 <= 1566 } labor 12X1 + 16X2 <= 2880 } tubing X1, X2 >= 0 } nonnegativity Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
29
Implementing the Model
See file Fig3-1.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
30
How Solver Views the Model
Target cell - the cell in the spreadsheet that represents the objective function Changing cells - the cells in the spreadsheet representing the decision variables Constraint cells - the cells in the spreadsheet representing the LHS formulas on the constraints Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
31
Let’s go back to Excel and see how Solver works...
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
32
Goals For Spreadsheet Design
Communication - A spreadsheet's primary business purpose is that of communicating information to managers. Reliability - The output a spreadsheet generates should be correct and consistent. Auditability - A manager should be able to retrace the steps followed to generate the different outputs from the model in order to understand the model and verify results. Modifiability - A well-designed spreadsheet should be easy to change or enhance in order to meet dynamic user requirements. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
33
Spreadsheet Design Guidelines
Organize the data, then build the model around the data. Do not embed numeric constants in formulas. Things which are logically related should be physically related. Use formulas that can be copied. Column/rows totals should be close to the columns/rows being totaled. The English-reading eye scans left to right, top to bottom. Use color, shading, borders and protection to distinguish changeable parameters from other model elements. Use text boxes and cell notes to document various elements of the model. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
34
Sensitivity Analysis Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
35
Introduction When solving an LP model we assume that all relevant factors are known with certainty. Such certainty rarely exists. Sensitivity analysis helps answer questions about how sensitive the optimal solution is to changes in various coefficients in an LP model. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
36
General Form of a Linear Programming (LP) Problem
MAX (or MIN): c1X1 + c2X2 + … + cnXn Subject to: a11X1 + a12X2 + … + a1nXn <= b1 : ak1X1 + ak2X2 + … + aknXn <= bk am1X1 + am2X2 + … + amnXn = bm How sensitive is a solution to changes in the ci, aij, and bi? Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
37
Approaches to Sensitivity Analysis
Change the data and re-solve the model! Sometimes this is the only practical approach. Solver also produces sensitivity reports that can answer questions about: amounts objective function coefficients can change without changing the solution. the impact on the optimal objective function value of changes in various constrained resources. the impact on the optimal objective function value of forced changes in certain decision variables. the impact changes in constraint coefficients will have on the optimal solution. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
38
Once Again, We’ll Use The Blue Ridge Hot Tubs Example...
MAX: 350X X2 } profit S.T.: 1X1 + 1X2 <= 200 } pumps 9X1 + 6X2 <= 1566 } labor 12X1 + 16X2 <= 2880 } tubing X1, X2 >= 0 } nonnegativity Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
39
The Answer Report See file Fig4-1.xls
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
40
The Sensitivity Report
See file Fig4-1.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
41
original optimal solution
How Changes in Objective Coefficients Change the Slope of the Level Curve X2 250 original level curve 200 new optimal solution 150 original optimal solution 100 new level curve 50 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
42
Changes in Objective Function Coefficients
Values in the “Allowable Increase” and “Allowable Decrease” columns for the Changing Cells indicate the amounts by which an objective function coefficient can change without changing the optimal solution, assuming all other coefficients remain constant. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
43
Alternate Optimal Solutions
Values of zero (0) in the “Allowable Increase” or “Allowable Decrease” columns for the Changing Cells indicate that an alternate optimal solution exists. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
44
Changes in Constraint RHS Values
The shadow price of a constraint indicates the amount by which the objective function value changes given a unit increase in the RHS value of the constraint, assuming all other coefficients remain constant. Shadow prices hold only within RHS changes falling within the values in “Allowable Increase” and “Allowable Decrease” columns. Shadow prices for nonbinding constraints are always zero. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
45
Comments About Changes in Constraint RHS Values
Shadow prices only indicate the changes that occur in the objective function value as RHS values change. Changing a RHS value for a binding constraint also changes the feasible region and the optimal solution (see graph on following slide). To find the optimal solution after changing a binding RHS value, you must re-solve the problem. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
46
X2 How Changing the RHS Value of a Constraint Can Change the Feasible Region and Optimal Solution 250 Suppose available labor hours increase from 1,566 to 1,728 200 150 old optimal solution old labor constraint 100 new optimal solution 50 new labor constraint 50 100 150 200 250 X1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
47
Other Uses of Shadow Prices
Suppose a new Hot Tub (the Typhoon-Lagoon) is being considered. It generates a marginal profit of $320 and requires: 1 pump (shadow price = $200) 8 hours of labor (shadow price = $16.67) 13 feet of tubing (shadow price = $0) Q: Would it be profitable to produce any? A: $320 - $200*1 - $16.67*8 - $0*13 = -$13.33 = No! Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
48
The Meaning of Reduced Costs
The Reduced Cost for each product equals its per-unit marginal profit minus the per-unit value of the resources it consumes (priced at their shadow prices). Optimal Value of Optimal Value of Type of Problem Decision Variable Reduced Cost at simple lower bound <=0 Maximization between lower & upper bounds =0 at simple upper bound >=0 at simple lower bound >=0 Minimization between lower & upper bounds =0 at simple upper bound <=0 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
49
Key Points The shadow prices of resources equate the marginal value of the resources consumed with the marginal benefit of the goods being produced. Resources in excess supply have a shadow price (or marginal value) of zero. The reduced cost of a product is the difference between its marginal profit and the marginal value of the resources it consumes. Products whose marginal profits are less than the marginal value of the goods required for their production will not be produced in an optimal solution. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
50
Analyzing Changes in Constraint Coefficients
Q: Suppose a Typhoon-Lagoon required only 7 labor hours rather than 8. Is it now profitable to produce any? A: $320 - $200*1 - $16.67*7 - $0*13 = $3.31 = Yes! Q: What is the maximum amount of labor Typhoon-Lagoons could require and still be profitable? A: We need $320 - $200*1 - $16.67*L3 - $0*13 >=0 The above is true if L3 <= $120/$16.67 = $7.20 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
51
Make vs. Buy Decisions: The Electro-Poly Corporation
Electro-Poly is a leading maker of slip-rings. A $750,000 order has just been received. Model 1 Model 2 Model 3 Number ordered 3,000 2, Hours of wiring/unit Hours of harnessing/unit 1 2 1 Cost to Make $50 $83 $130 Cost to Buy $61 $97 $145 The company has 10,000 hours of wiring capacity and 5,000 hours of harnessing capacity. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
52
Defining the Decision Variables
M1 = Number of model 1 slip rings to make in-house M2 = Number of model 2 slip rings to make in-house M3 = Number of model 3 slip rings to make in-house B1 = Number of model 1 slip rings to buy from competitor B2 = Number of model 2 slip rings to buy from competitor B3 = Number of model 3 slip rings to buy from competitor Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
53
Defining the Objective Function
Minimize the total cost of filling the order. MIN: 50M1 + 83M M3 + 61B1 + 97B B3 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
54
Defining the Constraints
Demand Constraints M1 + B1 = 3,000 } model 1 M2 + B2 = 2,000 } model 2 M3 + B3 = } model 3 Resource Constraints 2M M2 + 3M3 <= 10,000 } wiring 1M M2 + 1M3 <= 5,000 } harnessing Nonnegativity Conditions M1, M2, M3, B1, B2, B3 >= 0 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
55
Implementing the Model
See file Fig3-17.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
56
An Investment Problem: Retirement Planning Services, Inc.
A client wishes to invest $750,000 in the following bonds. Years to Company Return Maturity Rating Acme Chemical 8.65% 11 1-Excellent DynaStar 9.50% 10 3-Good Eagle Vision 10.00% 6 4-Fair Micro Modeling 8.75% 10 1-Excellent OptiPro 9.25% 7 3-Good Sabre Systems 9.00% 13 2-Very Good Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
57
Investment Restrictions
No more than 25% can be invested in any single company. At least 50% should be invested in long-term bonds (maturing in 10+ years). No more than 35% can be invested in DynaStar, Eagle Vision, and OptiPro. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
58
Defining the Decision Variables
X1 = amount of money to invest in Acme Chemical X2 = amount of money to invest in DynaStar X3 = amount of money to invest in Eagle Vision X4 = amount of money to invest in MicroModeling X5 = amount of money to invest in OptiPro X6 = amount of money to invest in Sabre Systems Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
59
Defining the Objective Function
Maximize the total annual investment return. MAX: X X X X X X6 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
60
Defining the Constraints
Total amount is invested X1 + X2 + X3 + X4 + X5 + X6 = 750,000 No more than 25% in any one investment Xi <= 187,500, for all i 50% long term investment restriction. X1 + X2 + X4 + X6 >= 375,000 35% Restriction on DynaStar, Eagle Vision, and OptiPro. X2 + X3 + X5 <= 262,500 Nonnegativity conditions Xi >= 0 for all i Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
61
Implementing the Model
See file Fig3-20.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
62
A Transportation Problem: Tropicsun
Processing Groves Plants Distances (in miles) Supply Capacity 21 Mt. Dora Ocala 200,000 275,000 1 50 4 40 35 Eustis 30 Orlando 400,000 600,000 2 5 22 55 Clermont 20 Leesburg 300,000 225,000 3 6 25 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
63
Defining the Decision Variables
Xij = # of bushels shipped from node i to node j Specifically, the nine decision variables are: X14 = # of bushels shipped from Mt. Dora (node 1) to Ocala (node 4) X15 = # of bushels shipped from Mt. Dora (node 1) to Orlando (node 5) X16 = # of bushels shipped from Mt. Dora (node 1) to Leesburg (node 6) X24 = # of bushels shipped from Eustis (node 2) to Ocala (node 4) X25 = # of bushels shipped from Eustis (node 2) to Orlando (node 5) X26 = # of bushels shipped from Eustis (node 2) to Leesburg (node 6) X34 = # of bushels shipped from Clermont (node 3) to Ocala (node 4) X35 = # of bushels shipped from Clermont (node 3) to Orlando (node 5) X36 = # of bushels shipped from Clermont (node 3) to Leesburg (node 6) Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
64
Defining the Objective Function
Minimize the total number of bushel-miles. MIN: 21X X X16 + 35X X X26 + 55X X X36 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
65
Defining the Constraints
Capacity constraints X14 + X24 + X34 <= 200,000 } Ocala X15 + X25 + X35 <= 600,000 } Orlando X16 + X26 + X36 <= 225,000 } Leesburg Supply constraints X14 + X15 + X16 = 275,000 } Mt. Dora X24 + X25 + X26 = 400,000 } Eustis X34 + X35 + X36 = 300,000 } Clermont Nonnegativity conditions Xij >= 0 for all i and j Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
66
Implementing the Model
See file Fig3-24.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
67
A Blending Problem: The Agri-Pro Company
Agri-Pro has received an order for 8,000 pounds of chicken feed to be mixed from the following feeds. Nutrient Feed 1 Feed 2 Feed 3 Feed 4 Corn 30% 5% 20% 10% Grain 10% 3% 15% 10% Minerals 20% 20% 20% 30% Cost per pound $0.25 $0.30 $0.32 $0.15 Percent of Nutrient in The order must contain at least 20% corn, 15% grain, and 15% minerals. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
68
Defining the Decision Variables
X1 = pounds of feed 1 to use in the mix X2 = pounds of feed 2 to use in the mix X3 = pounds of feed 3 to use in the mix X4 = pounds of feed 4 to use in the mix Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
69
Defining the Objective Function
Minimize the total cost of filling the order. MIN: X X X X4 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
70
Defining the Constraints
Produce 8,000 pounds of feed X1 + X2 + X3 + X4 = 8,000 Mix consists of at least 20% corn (0.3X X X X4)/8000 >= 0.2 Mix consists of at least 15% grain (0.1X X X X4)/8000 >= 0.15 Mix consists of at least 15% minerals (0.2X X X X4)/8000 >= 0.15 Nonnegativity conditions X1, X2, X3, X4 >= 0 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
71
A Comment About Scaling
Notice that the coefficient for X2 in the ‘corn’ constraint is 0.05/8000 = As Solver solves our problem, intermediate calculations must be done that make coefficients large or smaller. Storage problems may force the computer to use approximations of the actual numbers. Such ‘scaling’ problems sometimes prevents Solver from being able to solve the problem accurately. Most problems can be formulated in a way to minimize scaling errors... Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
72
Re-Defining the Decision Variables
X1 = thousands of pounds of feed 1 to use in the mix X2 = thousands of pounds of feed 2 to use in the mix X3 = thousands of pounds of feed 3 to use in the mix X4 = thousands of pounds of feed 4 to use in the mix Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
73
Re-Defining the Objective Function
Minimize the total cost of filling the order. MIN: X X X X4 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
74
Re-Defining the Constraints
Produce 8,000 pounds of feed X1 + X2 + X3 + X4 = 8 Mix consists of at least 20% corn (0.3X X X X4)/8 >= 0.2 Mix consists of at least 15% grain (0.1X X X X4)/8 >= 0.15 Mix consists of at least 15% minerals (0.2X X X X4)/8 >= 0.15 Nonnegativity conditions X1, X2, X3, X4 >= 0 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
75
A Comment About Scaling
Earlier the largest coefficient in the constraints was 8,000 and the smallest is 0.05/8 = Now the largest coefficient in the constraints is 8 and the smallest is 0.05/8 = The problem is now more evenly scaled. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
76
The Assume Linear Model Option
The Solver Options dialog box has an option labeled “Assume Linear Model”. When you select this option Solver performs some tests to verify that your model is in fact linear. These test are not 100% accurate & often fail as a result of a poorly scaled model. If Solver tells you a model isn’t linear when you know it is, try solving it again. If that doesn’t work, try re-scaling your model. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
77
Implementing the Model
See file Fig3-33.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
78
A Production Planning Problem: The Upton Corporation
Upton is planning the production of their heavy-duty air compressors for the next 6 months. Unit Production Cost $240 $250 $265 $285 $280 $260 Units Demanded 1,000 4,500 6,000 5,500 3,500 4,000 Maximum Production 4,000 3,500 4,000 4,500 4,000 3,500 Minimum Production 2,000 1,750 2,000 2,250 2,000 1,750 Month Beginning inventory = 2,750 units Safety stock = 1,500 units Unit carrying cost = 1.5% of unit production cost Maximum warehouse capacity = 6,000 units Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
79
Defining the Decision Variables
Pi = number of units to produce in month i, i=1 to 6 Bi = beginning inventory month i, i=1 to 6 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
80
Defining the Objective Function
Minimize the total cost production & inventory costs. MIN: 240P1+ 250P P P P P (B1+B2)/ (B2+B3)/ (B3+B4)/ (B4+B5)/ (B5+ B6)/ (B6+B7)/2 Note: The beginning inventory in any month is the same as the ending inventory in the previous month. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
81
Defining the Constraints
Production levels 2,000 <= P1 <= 4,000 } month 1 1,750 <= P2 <= 3,500 } month 2 2,000 <= P3 <= 4,000 } month 3 2,250 <= P4 <= 4,500 } month 4 2,000 <= P5 <= 4,000 } month 5 1,750 <= P6 <= 3,500 } month 6 Ending Inventory (EI = BI + P - D) 1,500 <= B1 + P1 - 1,000 <= 6,000 } month 1 1,500 <= B2 + P2 - 4,500 <= 6,000 } month 2 1,500 <= B3 + P3 - 6,000 <= 6,000 } month 3 1,500 <= B4 + P4 - 5,500 <= 6,000 } month 4 1,500 <= B5 + P5 - 3,500 <= 6,000 } month 5 1,500 <= B6 + P6 - 4,000 <= 6,000 } month 6 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
82
Defining the Constraints (cont’d)
Beginning Balances B1 = 2750 B2 = B1 + P1 - 1,000 B3 = B2 + P2 - 4,500 B4 = B3 + P3 - 6,000 B5 = B4 + P4 - 5,500 B6 = B5 + P5 - 3,500 B7 = B6 + P6 - 4,000 Notice that the Bi can be computed directly from the Pi. Therefore, only the Pi need to be identified as changing cells. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
83
Implementing the Model
See file Fig3-31.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
84
A Multi-Period Cash Flow Problem: The Taco-Viva Sinking Fund - I
Taco-Viva needs to establish a sinking fund to pay $800,000 in building costs for a new restaurant in the next 6 months. Payments of $250,000 are due at the end of months 2 and 4, and a final payment of $300,000 is due at the end of month 6. The following investments may be used. Investment Available in Month Months to Maturity Yield at Maturity A 1, 2, 3, 4, 5, % B 1, 3, % C 1, % D % Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
85
Summary of Possible Cash Flows
Cash Inflow/Outflow at the Beginning of Month Investment A B1 -1 <_____> 1.035 C1 -1 <_____> <_____> D1 -1 <_____> <_____> <_____> <_____> <_____> 1.11 A A B <_____> A C <_____> <_____> A B <_____> A Req’d Payments $0 $0 $250 $0 $250 $0 $300 (in $1,000s) Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
86
Defining the Decision Variables
Ai = amount (in $1,000s) placed in investment A at the beginning of month i=1, 2, 3, 4, 5, 6 Bi = amount (in $1,000s) placed in investment B at the beginning of month i=1, 3, 5 Ci = amount (in $1,000s) placed in investment C at the beginning of month i=1, 4 Di = amount (in $1,000s) placed in investment D at the beginning of month i=1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
87
Defining the Objective Function
Minimize the total cash invested in month 1. MIN: A1 + B1 + C1 + D1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
88
Defining the Constraints
Cash Flow Constraints 1.018A1 – 1A2 = } month 2 1.035B A2 – 1A3 – 1B3 = } month 3 1.058C A3 – 1A4 – 1C4 = 0 } month 4 1.035B A4 – 1A5 – 1B5 = } month 5 1.018A5 –1A6 = } month 6 1.11D C B A6 = 300 } month 7 Nonnegativity Conditions Ai, Bi, Ci, Di >= 0, for all i Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
89
Implementing the Model
See file Fig3-35.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
90
Network Modeling Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
91
Introduction A number of business problems can be represented graphically as networks. This chapter focuses on several types of network flow problems: Transshipment Problems Shortest Path Problems Maximal Flow Problems Transportation/Assignment Problems Generalized Network Flow Problems We also consider a different type of network problem called the Minimum Spanning Tree Problem Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
92
Characteristics of Network Flow Problems
Network flow problems can be represented as a collection of nodes connected by arcs. There are three types of nodes: Supply Demand Transshipment We’ll use negative numbers to represent supplies and positive numbers to represent demand. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
93
A Transshipment Problem: The Bavarian Motor Company
+100 Boston $30 $50 2 Newark -200 1 Columbus +60 3 $40 $40 $35 $30 Richmond +80 Atlanta 4 +170 5 $25 $45 $50 $35 +70 Mobile J'ville 6 -300 $50 7 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
94
Defining the Decision Variables
For each arc in a network flow model we define a decision variable as: Xij = the amount being shipped (or flowing) from node i to node j For example, X12 = the number of cars shipped from node 1 (Newark) to node 2 (Boston) X56 = the number of cars shipped from node 5 (Atlanta) to node 6 (Mobile) Note: The number of arcs determine the number of variables in a network flow problem! Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
95
Defining the Objective Function
Minimize total shipping costs. MIN: 30X X X X35 +40X X X X65 + 50X X X76 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
96
Constraints for Network Flow Problems: The Balance-of-Flow Rules
For Minimum Cost Network Apply This Balance-of-Flow Flow Problems Where: Rule At Each Node: Total Supply > Total Demand Inflow-Outflow >= Supply or Demand Total Supply < Total Demand Inflow-Outflow <=Supply or Demand Total Supply = Total Demand Inflow-Outflow = Supply or Demand Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
97
Defining the Constraints
In the BMC problem: Total Supply = 500 cars Total Demand = 480 cars So for each node we need a constraint of the form: Inflow - Outflow >= Supply or Demand Constraint for node 1: –X12 – X14 >= (there is no inflow for node 1!) This is equivalent to: +X12 + X14 <= 200 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
98
Defining the Constraints
Flow constraints –X12 – X14 >= – } node 1 +X12 – X23 >= } node 2 +X23 + X53 – X35 >= } node 3 + X14 + X54 + X74 >= } node 4 + X35 + X65 + X75 – X53 – X54 – X56 >= +170 } node 5 + X56 + X76 – X65 >= } node 6 –X74 – X75 – X76 >= – } node 7 Nonnegativity conditions Xij >= 0 for all ij Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
99
Implementing the Model
See file Fig5-2.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
100
Optimal Solution to the BMC Problem
+100 Boston $30 $50 2 Newark -200 120 20 1 Columbus +60 80 3 $40 $40 40 Richmond +80 Atlanta 4 +170 5 $45 210 70 +70 Mobile J'ville 6 -300 $50 7 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
101
Generalized Network Flow Problems
In some problems, a gain or loss occurs in flows over arcs. Examples Oil or gas shipped through a leaky pipeline Imperfections in raw materials entering a production process Spoilage of food items during transit Theft during transit Interest or dividends on investments These problems require some modeling changes. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
102
Coal Bank Hollow Recycling
Recycling Process 1 Recycling Process 2 Material Cost Yield Cost Yield Supply Newspaper $13 90% $12 85% 70 tons Mixed Paper $11 80% $13 85% 50 tons White Office Paper $9 95% $10 90% 30 tons Cardboard $13 75% $14 85% 40 tons Newsprint Packaging Paper Print Stock Pulp Source Cost Yield Cost Yield Cost Yield Recycling Process 1 $5 95% $6 90% $8 90% Recycling Process 2 $6 90% $8 95% $7 95% Demand 60 tons 40 tons 50 tons Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
103
Network for Recycling Problem
-70 Newspaper $13 1 $12 +0 95% Newsprint 90% +60 pulp 7 80% $5 $11 Mixed Recycling 90% -50 paper Process 1 95% $6 2 5 $13 $8 75% 90% Packing paper +40 pulp $9 8 White 85% 95% 85% -30 office $6 paper $10 3 Recycling $8 90% 90% Process 2 Print 6 $7 stock +50 85% $13 95% pulp +0 9 -40 Cardboard $14 4 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
104
Defining the Objective Function
Minimize total cost. MIN: 13X X X X26 + 9X35+ 10X X X46 + 5X X58 + 8X59 + 6X67 + 8X68 + 7X69 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
105
Defining the Constraints
Raw Materials -X15 -X16 >= -70 } node 1 -X25 -X26 >= -50 } node 2 -X35 -X36 >= -30 } node 3 -X45 -X46 >= -40 } node 4 Recycling Processes +0.9X X X X45 -X57 -X58 -X59 >= 0 } node 5 +0.85X X X X46 -X67 -X68 -X69 >= 0 } node 6 Paper Pulp +0.95X X67 >= 60 } node 7 +0.90X X67 >= 40 } node 8 +0.90X X67 >= 50 } node 9 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
106
Implementing the Model
See file Fig5-17.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
107
Integer Linear Programming
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
108
An Employee Scheduling Problem: Air-Express
Day of Week Workers Needed Sunday 18 Monday 27 Tuesday 22 Wednesday 26 Thursday 25 Friday 21 Saturday 19 Shift Days Off Wage 1 Sun & Mon $680 2 Mon & Tue $705 3 Tue & Wed $705 4 Wed & Thr $705 5 Thr & Fri $705 6 Fri & Sat $680 7 Sat & Sun $655 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
109
Defining the Decision Variables
X1 = the number of workers assigned to shift 1 X2 = the number of workers assigned to shift 2 X3 = the number of workers assigned to shift 3 X4 = the number of workers assigned to shift 4 X5 = the number of workers assigned to shift 5 X6 = the number of workers assigned to shift 6 X7 = the number of workers assigned to shift 7 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
110
Defining the Objective Function
Minimize the total wage expense. MIN: 680X1 +705X2 +705X3 +705X4 +705X5 +680X6 +655X7 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
111
Defining the Constraints
Workers required each day 0X1 + 1X2 + 1X3 + 1X4 + 1X5 + 1X6 + 0X7 >= 18 } Sunday 0X1 + 0X2 + 1X3 + 1X4 + 1X5 + 1X6 + 1X7 >= 27 } Monday 1X1 + 0X2 + 0X3 + 1X4 + 1X5 + 1X6 + 1X7 >= 22 }Tuesday 1X1 + 1X2 + 0X3 + 0X4 + 1X5 + 1X6 + 1X7 >= 26 } Weds. 1X1 + 1X2 + 1X3 + 0X4 + 0X5 + 1X6 + 1X7 >= 25 } Thurs. 1X1 + 1X2 + 1X3 + 1X4 + 0X5 + 0X6 + 1X7 >= 21 } Friday 1X1 + 1X2 + 1X3 + 1X4 + 1X5 + 0X6 + 0X7 >= 19 } Saturday Nonnegativity & integrality conditions Xi >= 0 and integer for all i Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
112
Implementing the Model
See file Fig6-14.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
113
Binary Variables Binary variables are integer variables that can assume only two values: 0 or 1. These variables can be useful in a number of practical modeling situations…. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
114
A Capital Budgeting Problem: CRT Technologies
Expected NPV Project (in $000s) Year 1 Year 2 Year 3 Year 4 Year 5 1 $141 $75 $25 $20 $15 $10 2 $187 $90 $35 $0 $0 $30 3 $121 $60 $15 $15 $15 $15 4 $83 $30 $20 $10 $5 $5 5 $265 $100 $25 $20 $20 $20 6 $127 $50 $20 $10 $30 $40 Capital (in $000s) Required in The company currently has $250,000 available to invest in new projects. It has budgeted $75,000 for continued support for these projects in year 2 and $50,000 per year for years 3, 4, and 5. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
115
Defining the Decision Variables
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
116
Defining the Objective Function
Maximize the total NPV of selected projects. MAX: 141X X X3 + 83X X X6 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
117
Defining the Constraints
Capital Constraints 75X1 + 90X2 + 60X3 + 30X X5 + 50X6 <= 250 } year 1 25X1 + 35x2 + 15X3 + 20X X5 + 20X6 <= 75 } year 2 20X1 + 0x2 + 15X3 + 10X X5 + 10X6 <= 50 } year 3 15X1 + 0X2 + 15X3 + 5X X5 + 30X6 <= 50 } year 4 10X1 + 30X2 + 15X3 + 5X X5 + 40X6 <= 50 } year 5 Binary Constraints All Xi must be binary Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
118
Implementing the Model
See file Fig6-17.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
119
Binary Variables & Logical Conditions
Binary variables are also useful in modeling a number of logical conditions. Of projects 1, 3 & 6, no more than one may be selected X1 + X3 + X6 <= 1 Of projects 1, 3 & 6, exactly one must be selected X1 + X3 + X6 = 1 Project 4 cannot be selected unless project 5 is also selected X4 – X5 <= 0 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
120
The Fixed-Charge Problem
Many decisions result in a fixed or lump-sum cost being incurred: The cost to lease, rent, or purchase a piece of equipment or a vehicle that will be required if a particular action is taken. The setup cost required to prepare a machine or production line to produce a different type of product. The cost to construct a new production line or facility that will be required if a particular decision is made. The cost of hiring additional personnel that will be required if a particular decision is made. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
121
Example Fixed-Charge Problem : Remington Manufacturing
Hours Required By: Operation Prod. 1 Prod. 2 Prod. 3 Hours Available Machining Grinding Assembly Unit Profit $48 $55 $50 Setup Cost $1000 $800 $900 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
122
Defining the Decision Variables
Xi = the amount of product i to be produced, i = 1, 2, 3 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
123
Defining the Objective Function
Maximize total profit. MAX: 48X1 + 55X2 + 50X3 – 1000Y1 – 800Y2 – 900Y3 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
124
Defining the Constraints
Resource Constraints 2X1 + 3X2 + 6X3 <= 600 } machining 6X1 + 3X2 + 4X3 <= 300 } grinding 5X1 + 6X2 + 2X3 <= 400 } assembly Binary Constraints All Yi must be binary Nonnegativity conditions Xi >= 0, i = 1, 2, ..., 6 Is there a missing link? Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
125
Defining the Constraints (cont’d)
Linking Constraints (with “Big M”) X1 <= M1Y1 or X1 - M1Y1 <= 0 X2 <= M2Y2 or X2 - M2Y2 <= 0 X3 <= M3Y3 or X3 - M3Y3 <= 0 If Xi > 0 these constraints force the associated Yi to equal 1. If Xi = 0 these constraints allow Yi to equal 0 or 1, but the objective will cause Solver to choose 0. Note that Mi imposes an upper bounds on Xi. It helps to find reasonable values for the Mi. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
126
Finding Reasonable Values for M1
Consider the resource constraints 2X1 + 3X2 + 6X3 <= 600 } machining 6X1 + 3X2 + 4X3 <= 300 } grinding 5X1 + 6X2 + 2X3 <= 400 } assembly What is the maximum value X1 can assume? Let X2 = X3 = 0 X1 = MIN(600/2, 300/6, 400/5) = MIN(300, 50, 80) = 50 Maximum values for X2 & X3 can be found similarly. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
127
Summary of the Model MAX: 48X1 + 55X2 + 50X Y Y Y3 Subject to: 2X1 + 3X2 + 6X3 <= 600 } machining 6X1 + 3X2 + 4X3 <= 300 } grinding 5X1 + 6X2 + 2X3 <= 400 } assembly X1 - 50Y1 <= 0 X2 - 67Y2 <= linking X3 - 75Y3 <= 0 All Yi must be binary Xi >= 0, i = 1, 2, 3 } Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
128
Potential Pitfall Do not use IF( ) functions to model the relationship between the Xi and Yi. Suppose cell A5 represents X1 Suppose cell A6 represents Y1 You’ll want to let A6 = IF(A5>0,1,0) This will not work with Solver! Treat the Yi just like any other variable. Make them changing cells. Use the linking constraints to enforce the proper relationship between the Xi and Yi. Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
129
Implementing the Model
See file Fig6-21.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
130
Nonlinear Programming
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
131
The Portfolio Optimization Problem
A financial planner wants to create the least risky portfolio with at least a 12% expected return using the following stocks. Annual Return Year IBC NMC NBS 1 11.2% 8.0% 10.9% 2 10.8% 9.2% 22.0% 3 11.6% 6.6% 37.9% 4 -1.6% 18.5% -11.8% 5 -4.1% 7.4% 12.9% 6 8.6% 13.0% -7.5% 7 6.8% 22.0% 9.3% 8 11.9% 14.0% 48.7% 9 12.0% 20.5% -1.9% 10 8.3% 14.0% 19.1% 11 6.0% 19.0% -3.4% % 9.0% 43.0% Avg 7.64% 13.43% 14.93% Covariance Matrix IBC NMC NBS IBC NMC NBS Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
132
Defining the Decision Variables
p1 = proportion of funds invested in IBC p2 = proportion of funds invested in NMC p3 = proportion of funds invested in NBS Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
133
Defining the Objective
Minimize the portfolio variance (risk). Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
134
Defining the Constraints
Expected return p p p3 >= 0.12 Proportions p1 + p2 + p3 = 1 p1, p2, p3 >= 0 p1, p2, p3 <= 1 Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
135
Implementing the Model
See file Fig8-26.xls Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.