Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modeling and Solving LP Problems in a Spreadsheet Chapter 3.

Similar presentations


Presentation on theme: "Modeling and Solving LP Problems in a Spreadsheet Chapter 3."— Presentation transcript:

1

2 Modeling and Solving LP Problems in a Spreadsheet Chapter 3

3 2  A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear constraints.  The linear model consists of the following components: – A set of decision variables. – An objective function. – A set of constraints. Introduction to Linear Programming

4 3  The Importance of Linear Programming –Many real world problems lend themselves to linear programming modeling. –Many real world problems can be approximated by linear models. –There are well-known successful applications in:  Manufacturing  Marketing  Finance (investment)  Advertising  Agriculture

5 4  The Importance of Linear Programming –There are efficient solution techniques that solve linear programming models. –The output generated from linear programming packages provides useful “what if” analysis. Introduction to Linear Programming

6 5  Assumptions of the linear programming model –The parameter values are known with certainty. –The objective function and constraints exhibit constant returns to scale. –There are no interactions between the decision variables (the additivity assumption). –The Continuity assumption: Variables can take on any value within a given feasible range.

7 6 The Galaxy Industries Production Problem – A Prototype Example  Galaxy manufactures two toy doll models: –Space Ray. –Zapper.  Resources are limited to –1000 pounds of special plastic. –40 hours of production time per week.

8 7  Marketing requirement –Total production cannot exceed 700 dozens. –Number of dozens of Space Rays cannot exceed number of dozens of Zappers by more than 350. Technological input –Space Rays requires 2 pounds of plastic and 3 minutes of labor per dozen. – Zappers requires 1 pound of plastic and 4 minutes of labor per dozen. The Galaxy Industries Production Problem – A Prototype Example

9 8  The current production plan calls for: –Producing as much as possible of the more profitable product, Space Ray ($8 profit per dozen). –Use resources left over to produce Zappers ($5 profit per dozen), while remaining within the marketing guidelines. The current production plan consists of: Space Rays = 450 dozen Zapper = 100 dozen Profit = $4100 per week The Galaxy Industries Production Problem – A Prototype Example 8(450) + 5(100)

10 9 A linear programming model can provide an insight and an intelligent solution to this problem.

11 10 :  Decisions variables: –X 1 = Weekly production level of Space Rays (in dozens) –X 2 = Weekly production level of Zappers (in dozens).  Objective Function: – Weekly profit, to be maximized The Galaxy Linear Programming Model

12 11 Max 8X 1 + 5X 2 (Weekly profit) subject to 2X 1 + 1X 2  1000 (Plastic) 3X 1 + 4X 2  2400 (Production Time) X 1 + X 2  700 (Total production) X 1 - X 2  350 (Mix) X j > = 0, j = 1,2 (Nonnegativity) The Galaxy Linear Programming Model

13 12 The Graphical Analysis of Linear Programming The set of all points that satisfy all the constraints of the model is called a FEASIBLE REGION

14 13 Using a graphical presentation we can represent all the constraints, the objective function, and the three types of feasible points.

15 14 The non-negativity constraints X2X2 X1X1 Graphical Analysis – the Feasible Region

16 15 1000 500 Feasible X2X2 Infeasible Production Time 3X 1 +4X 2  2400 Total production constraint: X 1 +X 2  700 (redundant) 500 700 The Plastic constraint 2X 1 +X 2  1000 X1X1 700 Graphical Analysis – the Feasible Region

17 16 1000 500 Feasible X2X2 Infeasible Production Time 3X 1 +4X2  2400 Total production constraint: X 1 +X 2  700 (redundant) 500 700 Production mix constraint: X 1 -X2  350 The Plastic constraint 2X 1 +X 2  1000 X1X1 700 Graphical Analysis – the Feasible Region There are three types of feasible points Interior points. Boundary points.Extreme points.

18 17 Solving Graphically for an Optimal Solution

19 18 The search for an optimal solution Start at some arbitrary profit, say profit = $2,000... Then increase the profit, if possible......and continue until it becomes infeasible Profit =$4360 500 700 1000 500 X2X2 X1X1

20 19 Summary of the optimal solution Space Rays = 320 dozen Zappers = 360 dozen Profit = $4360 –This solution utilizes all the plastic and all the production hours. –Total production is only 680 (not 700). –Space Rays production exceeds Zappers production by only 40 dozens.

21 20 –If a linear programming problem has an optimal solution, an extreme point is optimal. Extreme points and optimal solutions

22 21 For multiple optimal solutions to exist, the objective function must be parallel to one of the constraints Multiple optimal solutions Any weighted average of optimal solutions is also an optimal solution.

23 22 2.4 The Role of Sensitivity Analysis of the Optimal Solution  Is the optimal solution sensitive to changes in input parameters?  Possible reasons for asking this question: –Parameter values used were only best estimates. –Dynamic environment may cause changes. –“What-if” analysis may provide economical and operational information.

24 23  Range of Optimality –The optimal solution will remain unchanged as long as  An objective function coefficient lies within its range of optimality  There are no changes in any other input parameters. –The value of the objective function will change if the coefficient multiplies a variable whose value is nonzero. Sensitivity Analysis of Objective Function Coefficients.

25 24 500 1000 500800 X2X2 X1X1 Max 8X 1 + 5X 2 Max 4X 1 + 5X 2 Max 3.75X 1 + 5X 2 Max 2X 1 + 5X 2 Sensitivity Analysis of Objective Function Coefficients.

26 25 500 1000 400600800 X2X2 X1X1 Max8X 1 + 5X 2 Max 3.75X 1 + 5X 2 Max 10 X 1 + 5X 2 Range of optimality: [3.75, 10] Sensitivity Analysis of Objective Function Coefficients.

27 26  Reduced cost Assuming there are no other changes to the input parameters, the reduced cost for a variable X j that has a value of “0” at the optimal solution is: –The negative of the objective coefficient increase of the variable X j (-  C j ) necessary for the variable to be positive in the optimal solution –Alternatively, it is the change in the objective value per unit increase of X j.  Complementary slackness At the optimal solution, either the value of a variable is zero, or its reduced cost is 0.

28 27  In sensitivity analysis of right-hand sides of constraints we are interested in the following questions: –Keeping all other factors the same, how much would the optimal value of the objective function (for example, the profit) change if the right-hand side of a constraint changed by one unit? –For how many additional or fewer units will this per unit change be valid? Sensitivity Analysis of Right-Hand Side Values

29 28  Any change to the right hand side of a binding constraint will change the optimal solution.  Any change to the right-hand side of a non-binding constraint that is less than its slack or surplus, will cause no change in the optimal solution. Sensitivity Analysis of Right-Hand Side Values

30 29 Shadow Prices  Assuming there are no other changes to the input parameters, the change to the objective function value per unit increase to a right hand side of a constraint is called the “Shadow Price”

31 30 1000 500 X2X2 X1X1 2X 1 + 1x 2 <=1000 When more plastic becomes available (the plastic constraint is relaxed), the right hand side of the plastic constraint increases. Production time constraint Maximum profit = $4360 2X 1 + 1x 2 <=1001 Maximum profit = $4363.4 Shadow price = 4363.40 – 4360.00 = 3.40 Shadow Price – graphical demonstration The Plastic constraint

32 31 Range of Feasibility  Assuming there are no other changes to the input parameters, the range of feasibility is –The range of values for a right hand side of a constraint, in which the shadow prices for the constraints remain unchanged. –In the range of feasibility the objective function value changes as follows: Change in objective value = [Shadow price][Change in the right hand side value]

33 32 Range of Feasibility 1000 500 X2X2 X1X1 2X 1 + 1x 2 <=1000 Increasing the amount of plastic is only effective until a new constraint becomes active. The Plastic constraint This is an infeasible solution Production time constraint Production mix constraint X 1 + X 2  700 A new active constraint

34 33 Range of Feasibility 1000 500 X2X2 X1X1 The Plastic constraint Production time constraint Note how the profit increases as the amount of plastic increases. 2X 1 + 1x 2  1000

35 34 Range of Feasibility 1000 500 X2X2 X1X1 2X 1 + 1X 2  1100 Less plastic becomes available (the plastic constraint is more restrictive). The profit decreases A new active constraint Infeasible solution

36 35 –Sunk costs: The shadow price is the value of an extra unit of the resource, since the cost of the resource is not included in the calculation of the objective function coefficient. –Included costs: The shadow price is the premium value above the existing unit value for the resource, since the cost of the resource is included in the calculation of the objective function coefficient. The correct interpretation of shadow prices

37 36 Other Post - Optimality Changes  Addition of a constraint.  Deletion of a constraint.  Addition of a variable.  Deletion of a variable.  Changes in the left - hand side coefficients.

38 37 1 No point, simultaneously, lies both above line and below lines and. 1 23 2 3 Infeasible Model

39 38 Solver – Infeasible Model

40 39 Unbounded solution The feasible region Maximize the Objective Function

41 40  Solver does not alert the user to the existence of alternate optimal solutions.  Many times alternate optimal solutions exist when the allowable increase or allowable decrease is equal to zero.  In these cases, we can find alternate optimal solutions using Solver by the following procedure: Solver – An Alternate Optimal Solution

42 41  Observe that for some variable X j the Allowable increase = 0, or Allowable decrease = 0.  Add a constraint of the form: Objective function = Current optimal value.  If Allowable increase = 0, change the objective to Maximize X j  If Allowable decrease = 0, change the objective to Minimize X j Solver – An Alternate Optimal Solution

43 42 Cost Minimization Diet Problem Mix two sea ration products: Texfoods, Calration. Minimize the total cost of the mix. Meet the minimum requirements of Vitamin A, Vitamin D, and Iron.

44 43  Decision variables –X1 (X2) -- The number of two-ounce portions of Texfoods (Calration) product used in a serving.  The Model Minimize 0.60X1 + 0.50X2 Subject to 20X1 + 50X2  100Vitamin A 25X1 + 25X2  100 Vitamin D 50X1 + 10X2  100 Iron X1, X2  0 Cost per 2 oz. % Vitamin A provided per 2 oz. % required Cost Minimization Diet Problem

45 44 10 245 Feasible Region Vitamin “D” constraint Vitamin “A” constraint The Iron constraint The Diet Problem - Graphical solution

46 45  Summary of the optimal solution –Texfood product = 1.5 portions (= 3 ounces) Calration product = 2.5 portions (= 5 ounces) –Cost =$ 2.15 per serving. –The minimum requirement for Vitamin D and iron are met with no surplus. –The mixture provides 155% of the requirement for Vitamin A. Cost Minimization Diet Problem

47 46  Linear programming software packages solve large linear models.  Most of the software packages use the algebraic technique called the Simplex algorithm.  The input to any package includes: –The objective function criterion (Max or Min). –The type of each constraint:. –The actual coefficients for the problem. Computer Solution of Linear Programs With Any Number of Decision Variables

48 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 for 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.

49 Let’s Implement a Model for the Blue Ridge Hot Tubs Example... MAX: 350X 1 + 300X 2 } profit S.T.:1X 1 + 1X 2 <= 200} pumps 9X 1 + 6X 2 <= 1566} labor 12X 1 + 16X 2 <= 2880} tubing X 1, X 2 >= 0} nonnegativity

50 How Solver Views the Model  Objective cell - the cell in the spreadsheet that represents the objective function  Variable cells - the cells in the spreadsheet representing the decision variables  Constraint cells - the cells in the spreadsheet representing the LHS formulas on the constraints

51 Let’s go back to Excel and see how “Solver” works...

52 Goals For Spreadsheet Design  Communication - A spreadsheet's primary business purpose is 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 and verify results.  Modifiability - A well-designed spreadsheet should be easy to change or enhance in order to meet dynamic user requirements.

53 Spreadsheet Design Guidelines - I  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.

54 Spreadsheet Design Guidelines - II  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.

55 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.  The company has 10,000 hours of wiring capacity and 5,000 hours of harnessing capacity. Model 1 Model 2Model 3 Number ordered3,0002,000900 Hours of wiring/unit21.53 Hours of harnessing/unit121 Cost to Make$50$83$130 Cost to Buy$61$97$145

56 Defining the Decision Variables M 1 = Number of model 1 slip rings to make in-house M 2 = Number of model 2 slip rings to make in-house M 3 = Number of model 3 slip rings to make in-house B 1 = Number of model 1 slip rings to buy from competitor B 2 = Number of model 2 slip rings to buy from competitor B 3 = Number of model 3 slip rings to buy from competitor

57 Defining the Objective Function Minimize the total cost of filling the order. MIN:50M 1 + 83M 2 + 130M 3 + 61B 1 + 97B 2 + 145B 3

58 Defining the Constraints  Demand Constraints M 1 + B 1 = 3,000} model 1 M 2 + B 2 = 2,000} model 2 M 3 + B 3 = 900} model 3  Resource Constraints 2M 1 + 1.5M 2 + 3M 3 <= 10,000 } wiring 1M 1 + 2.0M 2 + 1M 3 <= 5,000 } harnessing  Nonnegativity Conditions M 1, M 2, M 3, B 1, B 2, B 3 >= 0

59 An Investment Problem: Retirement Planning Services, Inc.  A client wishes to invest $750,000 in the following bonds. Years to CompanyReturn MaturityRating Acme Chemical8.65%111-Excellent DynaStar9.50%103-Good Eagle Vision10.00%64-Fair Micro Modeling8.75%101-Excellent OptiPro9.25%73-Good Sabre Systems9.00%132-Very Good

60 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.

61 Defining the Decision Variables X 1 = amount of money to invest in Acme Chemical X 2 = amount of money to invest in DynaStar X 3 = amount of money to invest in Eagle Vision X 4 = amount of money to invest in MicroModeling X 5 = amount of money to invest in OptiPro X 6 = amount of money to invest in Sabre Systems

62 Defining the Objective Function Maximize the total annual investment return: MAX:.0865X 1 +.095X 2 +.10X 3 +.0875X 4 +.0925X 5 +.09X 6

63 Defining the Constraints  Total amount is invested X 1 + X 2 + X 3 + X 4 + X 5 + X 6 = 750,000  No more than 25% in any one investment X i <= 187,500, for all i  50% long term investment restriction. X 1 + X 2 + X 4 + X 6 >= 375,000  35% Restriction on DynaStar, Eagle Vision, and OptiPro. X 2 + X 3 + X 5 <= 262,500  Nonnegativity conditions X i >= 0 for all i

64 A Transportation Problem: Tropicsun Mt. Dora 1 Eustis 2 Clermont 3 Ocala 4 Orlando 5 Leesburg 6 Distances (in miles) Capacity Supply 275,000 400,000 300,000 225,000 600,000 200,000 Groves Processing Plants 21 50 40 35 30 22 55 25 20

65 Defining the Decision Variables X ij = # of bushels shipped from node i to node j Specifically, the nine decision variables are: X 14 = # of bushels shipped from Mt. Dora (node 1) to Ocala (node 4) X 15 = # of bushels shipped from Mt. Dora (node 1) to Orlando (node 5) X 16 = # of bushels shipped from Mt. Dora (node 1) to Leesburg (node 6) X 24 = # of bushels shipped from Eustis (node 2) to Ocala (node 4) X 25 = # of bushels shipped from Eustis (node 2) to Orlando (node 5) X 26 = # of bushels shipped from Eustis (node 2) to Leesburg (node 6) X 34 = # of bushels shipped from Clermont (node 3) to Ocala (node 4) X 35 = # of bushels shipped from Clermont (node 3) to Orlando (node 5) X 36 = # of bushels shipped from Clermont (node 3) to Leesburg (node 6)

66 Defining the Objective Function Minimize the total number of bushel-miles. MIN:21X 14 + 50X 15 + 40X 16 + 35X 24 + 30X 25 + 22X 26 + 55X 34 + 20X 35 + 25X 36

67 Defining the Constraints  Capacity constraints X 14 + X 24 + X 34 <= 200,000} Ocala X 15 + X 25 + X 35 <= 600,000} Orlando X 16 + X 26 + X 36 <= 225,000} Leesburg  Supply constraints X 14 + X 15 + X 16 = 275,000} Mt. Dora X 24 + X 25 + X 26 = 400,000} Eustis X 34 + X 35 + X 36 = 300,000} Clermont  Nonnegativity conditions X ij >= 0 for all i and j

68 Implementing the Model See file Fig3-26.xlsmFig3-26.xlsm

69 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. NutrientFeed 1Feed 2 Feed 3Feed 4 Corn30%5%20%10% Grain10%3%15%10% Minerals20%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.

70 Defining the Decision Variables X 1 = pounds of feed 1 to use in the mix X 2 = pounds of feed 2 to use in the mix X 3 = pounds of feed 3 to use in the mix X 4 = pounds of feed 4 to use in the mix

71 Defining the Objective Function Minimize the total cost of filling the order. MIN: 0.25X 1 + 0.30X 2 + 0.32X 3 + 0.15X 4

72 Defining the Constraints  Produce 8,000 pounds of feed X 1 + X 2 + X 3 + X 4 = 8,000  Mix consists of at least 20% corn (0.3X 1 + 0.5X 2 + 0.2X 3 + 0.1X 4 )/8000 >= 0.2  Mix consists of at least 15% grain (0.1X 1 + 0.3X 2 + 0.15X 3 + 0.1X 4 )/8000 >= 0.15  Mix consists of at least 15% minerals (0.2X 1 + 0.2X 2 + 0.2X 3 + 0.3X 4 )/8000 >= 0.15  Nonnegativity conditions X 1, X 2, X 3, X 4 >= 0

73 A Comment About Scaling  Notice the coefficient for X 2 in the ‘corn’ constraint is 0.05/8000 = 0.00000625  As Solver runs, intermediate calculations are made that make coefficients larger 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...

74 Re-Defining the Decision Variables X 1 = thousands of pounds of feed 1 to use in the mix X 2 = thousands of pounds of feed 2 to use in the mix X 3 = thousands of pounds of feed 3 to use in the mix X 4 = thousands of pounds of feed 4 to use in the mix

75 Re-Defining the Objective Function Minimize the total cost of filling the order. MIN: 250X 1 + 300X 2 + 320X 3 + 150X 4

76 Re-Defining the Constraints  Produce 8,000 pounds of feed X 1 + X 2 + X 3 + X 4 = 8  Mix consists of at least 20% corn (0.3X 1 + 0.5X 2 + 0.2X 3 + 0.1X 4 )/8 >= 0.2  Mix consists of at least 15% grain (0.1X 1 + 0.3X 2 + 0.15X 3 + 0.1X 4 )/8 >= 0.15  Mix consists of at least 15% minerals (0.2X 1 + 0.2X 2 + 0.2X 3 + 0.3X 4 )/8 >= 0.15  Nonnegativity conditions X 1, X 2, X 3, X 4 >= 0

77 Scaling: Before and After  Before: –Largest constraint coefficient was 8,000 –Smallest constraint coefficient was 0.05/8 = 0.00000625.  After: –Largest constraint coefficient is 8 –Smallest constraint coefficient is 0.05/8 = 0.00625.  The problem is now more evenly scaled!

78 Implementing the Model See file Fig3-30.xlsmFig3-30.xlsm

79 A Production Planning Problem: The Upton Corporation  Upton is planning the production of their heavy-duty air compressors for the next 6 months. 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 12 3456 Unit Production Cost$240$250$265$285$280$260 Units Demanded1,0004,5006,0005,5003,5004,000 Maximum Production4,0003,5004,0004,5004,0003,500 Minimum Production2,0001,7502,0002,2502,0001,750 Month

80 Defining the Decision Variables P i = number of units to produce in month i, i =1 to 6 B i = beginning inventory month i, i =1 to 6

81 Defining the Objective Function Minimize the total cost production & inventory costs. MIN : 240P 1 +250P 2 +265P 3 +285P 4 +280P 5 +260P 6 + 3.6(B 1 +B 2 )/2 + 3.75(B 2 +B 3 )/2 + 3.98(B 3 +B 4 )/2 + 4.28(B 4 +B 5 )/2 + 4.20(B 5 + B 6 )/2 + 3.9(B 6 +B 7 )/2 Note: The beginning inventory in any month is the same as the ending inventory in the previous month.

82 Defining the Constraints - I  Production levels 2,000 <= P 1 <= 4,000 } month 1 1,750 <= P 2 <= 3,500 } month 2 2,000 <= P 3 <= 4,000 } month 3 2,250 <= P 4 <= 4,500 } month 4 2,000 <= P 5 <= 4,000 } month 5 1,750 <= P 6 <= 3,500 } month 6

83 Defining the Constraints - II  Ending Inventory (EI = BI + P - D) 1,500 < B 1 + P 1 - 1,000 < 6,000 } month 1 1,500 < B 2 + P 2 - 4,500 < 6,000 } month 2 1,500 < B 3 + P 3 - 6,000 < 6,000 } month 3 1,500 < B 4 + P 4 - 5,500 < 6,000 } month 4 1,500 < B 5 + P 5 - 3,500 < 6,000 } month 5 1,500 < B 6 + P 6 - 4,000 < 6,000 } month 6

84 Defining the Constraints - III  Beginning Balances B 1 = 2750 B 2 = B 1 + P 1 - 1,000 B 3 = B 2 + P 2 - 4,500 B 4 = B 3 + P 3 - 6,000 B 5 = B 4 + P 4 - 5,500 B 6 = B 5 + P 5 - 3,500 B 7 = B 6 + P 6 - 4,000 Notice that the B i can be computed directly from the P i. Therefore, only the P i need to be identified as changing cells.

85 Implementing the Model See file Fig3-33.xlsmFig3-33.xlsm

86 A Multi-Period Cash Flow Problem: The Taco-Viva Sinking Fund - I  Taco-Viva needs 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. InvestmentAvailable in MonthMonths to MaturityYield at Maturity A1, 2, 3, 4, 5, 611.8% B1, 3, 523.5% C1, 435.8% D1611.0%

87 Summary of Possible Cash Flows Investment1234567 A 1 -11.018 B 1 -1 1.035 C 1 -1 1.058 D 1 -1 1.11 A 2 -11.018 A 3 -11.018 B 3 -1 1.035 A 4 -11.018 C 4 -1 1.058 A 5 -11.018 B 5 -1 1.035 A 6 -11.018 Req’d Payments $0$0$250 $0$250$0$300 (in $1,000s) Cash Inflow/Outflow at the Beginning of Month

88 Defining the Decision Variables A i = amount (in $1,000s) placed in investment A at the beginning of month i =1, 2, 3, 4, 5, 6 B i = amount (in $1,000s) placed in investment B at the beginning of month i =1, 3, 5 C i = amount (in $1,000s) placed in investment C at the beginning of month i =1, 4 D i = amount (in $1,000s) placed in investment D at the beginning of month i =1

89 Defining the Objective Function Minimize the total cash invested in month 1. MIN: A 1 + B 1 + C 1 + D 1

90 Defining the Constraints  Cash Flow Constraints 1.018A 1 – 1A 2 = 0 } month 2 1.035B 1 + 1.018A 2 – 1A 3 – 1B 3 = 250 } month 3 1.058C 1 + 1.018A 3 – 1A 4 – 1C 4 = 0 } month 4 1.035B 3 + 1.018A 4 – 1A 5 – 1B 5 = 250 } month 5 1.018A 5 –1A 6 = 0 } month 6 1.11D 1 + 1.058C 4 + 1.035B 5 + 1.018A 6 = 300 } month 7  Nonnegativity Conditions A i, B i, C i, D i >= 0, for all i

91 Implementing the Model See file Fig3-37.xlsmFig3-37.xlsm

92 Risk Management: The Taco-Viva Sinking Fund - II  Assume the CFO has assigned the following risk ratings to each investment on a scale from 1 to 10 (10 = max risk) InvestmentRisk Rating A1 B3 C8 D6  The CFO wants the weighted average risk to not exceed 5.

93 Defining the Constraints  Risk Constraints 1A 1 + 3B 1 + 8C 1 + 6D 1 < 5 A 1 + B 1 + C 1 + D 1 } month 1 1A 2 + 3B 1 + 8C 1 + 6D 1 < 5 A 2 + B 1 + C 1 + D 1 } month 2 1A 3 + 3B 3 + 8C 1 + 6D 1 < 5 A 3 + B 3 + C 1 + D 1 } month 3 1A 4 + 3B 3 + 8C 4 + 6D 1 < 5 A 4 + B 3 + C 4 + D 1 } month 4 1A 5 + 3B 5 + 8C 4 + 6D 1 < 5 A 5 + B 5 + C 4 + D 1 } month 5 1A 6 + 3B 5 + 8C 4 + 6D 1 < 5 A 6 + B 5 + C 4 + D 1 } month 6

94 An Alternate Version of the Risk Constraints  Equivalent Risk Constraints -4A 1 – 2B 1 + 3C 1 + 1D 1 < 0 } month 1 -2B 1 + 3C 1 + 1D 1 – 4A 2 < 0 } month 2 3C 1 + 1D 1 – 4A 3 – 2B 3 < 0 } month 3 1D 1 – 2B 3 – 4A 4 + 3C 4 < 0 } month 4 1D 1 + 3C 4 – 4A 5 – 2B 5 < 0 } month 5 1D 1 + 3C 4 – 2B 5 – 4A 6 < 0 } month 6 Note that each coefficient is equal to the risk factor for the investment minus 5 (the max. allowable weighted average risk).

95 Implementing the Model See file Fig3-40.xlsmFig3-40.xlsm

96 Data Envelopment Analysis (DEA): Steak & Burger  Steak & Burger needs to evaluate the performance (efficiency) of 12 units.  Outputs for each unit (O ij ) include measures of: Profit, Customer Satisfaction, and Cleanliness  Inputs for each unit (I ij ) include: Labor Hours, and Operating Costs  The “Efficiency” of unit i is defined as follows: Weighted sum of unit i’s outputs Weighted sum of unit i’s inputs =

97 Defining the Decision Variables w j = weight assigned to output j v j = weight assigned to input j A separate LP is solved for each unit, allowing each unit to select the best possible weights for itself.

98 Defining the Objective Function Maximize the weighted output for unit i : MAX:

99 Defining the Constraints  Efficiency cannot exceed 100% for any unit  Sum of weighted inputs for unit i must equal 1  Nonnegativity Conditions w j, v j >= 0, for all j

100 Important Point When using DEA, output variables should be expressed on a scale where “more is better” and input variables should be expressed on a scale where “less is better”.

101 Implementing the Model See file Fig3-43.xlsmFig3-43.xlsm

102 Psi Functions  Risk Solver Platform includes a number of custom functions that all begin with the letters “Psi” (short for polymorphic spreadsheet interpreter)  When running multiple optimizations: –PsiCurrentOpt( ) returns the integer index of the current optimization –PsiOptValue(cell, opt #) returns the optimal value of the indicated cell for a particular optimization (opt #)

103 Analyzing The Solution See file Fig3-48.xlsmFig3-48.xlsm

104 End of Lecture


Download ppt "Modeling and Solving LP Problems in a Spreadsheet Chapter 3."

Similar presentations


Ads by Google