Optimization Models Module 9 OPTIMIZATION MODELS EXTERNAL INPUTS OUTPUT MODEL DECISION INPUTS Optimization models answer the question, “What decision values give the best outputs?” SCARCITY CONSTRAINTS DECISION INPUTS Optimization models are necessary because resources are always limited. LINEAR PROGRAMMING CONSTRAINTS 2x + 6y < 150 x + .8y < 40 x + 1.5y < 50 DECISION INPUTS x y OUTPUT MODEL (objective function) 10x + 18y Linear programming is a special type of optimization model that sets up constraints as linear equations and solves them simultaneously while maximizing an objective function. EXAMPLE 1: BOB’S MUFFLER SHOP Bob manufactures 2 types of mufflers, family and sport. Each family muffler nets him $10 and each sport muffler nets him $18. These numbers are known as the products’ ‘contribution margin’. His profit is determined by the function $10f + $18s, where f and s are the total number of each type of muffler sold. This is his objective function. His decision variables are the number of family and sport mufflers to manufacture each month. In an unconstrained situation, he would want to sell as many sport mufflers as because of their higher contribution. However… EXAMPLE 1: BACKGROUND In order to create a muffler, Bob must use brackets, labor hours, and alloy. The resources needed for each type are: Family Sports Brackets 2.00 6.00 Labor hours 1.00 0.80 1 1.5 Max Alloy In any given month, he is limited in all three resources to these amounts: Quantity Brackets 150 Labor hours 40 Max Alloy 50 These are the problem constraints. EXAMPLE 1: MODELING CONSTRAINTS AS LINEAR EQUATIONS These constraints can be modeled as a system of linear equations: 2f + 6s ≤ 150 f + .8s ≤ 40 50f + 33.33s ≤ 50 (brackets) (labor) (alloy) Bob also has an outstanding contract that forces him to manufacture 5 sports style mufflers each month and knows, from historical performance, that demand for family mufflers in a given month will not exceed 35. These constraints can be modeled as: f ≤ 35 s ≥ 5 (maximum demand) (contractual obligation) The objective function (profit) is: 10f + 18s EXAMPLE 1: GRAPHING A CONSTRAINT This situation can be represented graphically. Consider the constraint imposed by brackets: 2f + 6s ≤ 150. If zero family mufflers are manufactured, the equation changes to (0)f + 6s ≤ 150, which reduces to s ≤ 25. Thus a maximum of 25 sports mufflers can be made if no family mufflers are made. Similarly, 75 family mufflers can be made if there are no sports mufflers manufactured. Connecting these points gives a graphical representation of this constraint. EXAMPLE 1: RANGE OF FEASIBILITY Points on the line are scenarios in which all available brackets are used. The area under the line is called the Range of Feasibility because it covers all product mixes that the constraint allows. Any point above the line is infeasible because Bob does not have enough brackets to create that combination of mufflers. Infeasible Point: Range of Feasibility (30 sport, 40 family) EXAMPLE 1: GRAPHING ALL CONSTRAINTS The rest of the constraints can then be added in a similar fashion. 2f + 6s ≤ f + .8s ≤ f + 1.5s ≤ f ≤ s ≥ 150 40 50 35 5 (brackets) (labor) (alloy) (maximum demand) (contractual obligation) EXAMPLE 1: THE COMPOSITE RANGE OF FEASIBILITY The Range of Feasibility for the model is the area enclosed by all lines. 2f + 6s ≤ f + .8s ≤ f + 1.5s ≤ f ≤ s ≥ Range of Feasibility 150 40 50 35 5 (brackets) (labor) (alloy) (maximum demand) (contractual obligation) EXAMPLE 1: POTENTIAL PROFIT LINES The profit function will be a line with the slope of -5/9, the ratio of the contribution margin of family mufflers to sports mufflers. Each line corresponds to a particular level of total profit. The further out the line is, the greater the amount of profit. Total Profit: $100 $190 $280 $370 $460 $550 EXAMPLE 1: FEASIBLE PROFIT LINES By combining the profit lines with the range of feasibility, you can identify the highest profit line that touches a feasible point. EXAMPLE 1: OPTIMAL SOLUTION VIA GRAPHICAL METHOD The optimal point is a mix of 25 family mufflers and 16.67 sport mufflers. This combination will net Bob $550. Optimal point EXAMPLE 1: SPREADSHEET MODEL The situation can be modeled in Excel and an optimal solution found with Solver. EXAMPLE 1: SPREADSHEET MODEL Contribution Margins Resources needed for each type of muffler Available resources Max demand Contract Decisions: How many of each muffler to make Modeled constraints Profit EXAMPLE 1: SOLVER INPUTS Select the profit cell and choose solver from the tools menu. EXAMPLE 1: SOLVER INPUTS Objective function (profit) Click Decision variables Constraints EXAMPLE 1: SOLVER RESULTS Solver finds a solution. Select the answer and sensitivity reports for further analysis. EXAMPLE 1: OPTIMAL SOLUTION Solver found the same optimal solution as the graphical method. EXAMPLE 1: ANSWER REPORT Brackets: 2f + 6s ≤ 150 Labor: f + .8s ≤ 40 The total resources used in the optimal solution ‘Binding’ means all available resources are used Slack is the amount of leftover resources All available brackets are used in the optimal solution, making it a binding constraint. There are 1.67 labor hours left over, or slack. EXAMPLE 1: SENSITIVITY ANALYSIS The shadow price is the amount of profit that an additional unit of available resources would yield. A non-binding constraint will have a shadow price of 0 because there is already an excess of the resource. An additional available bracket (a total of 151) will yield $1 of profit. An additional labor hour will yield no profit because there is already an excess. The allowable increase is the amount of resources that would have to be available to change the optimal solution. If 50 additional brackets are available, the optimal product mix will change. The allowable decrease is the amount of fewer resources that will change the optimal mix. EXAMPLE 1: SENSITIVITY ANALYSIS If an additional unit of resource can be obtained for less than the shadow price, then the difference will be profit. The allowable increase and decrease tells you how sensitive the decision inputs of the optimal solution (final value column) are to the right hand sides of each constraint. EXAMPLE 1: RANGE OF OPTIMALITY Profit: 10 f + 18 s The contribution margin for each type of muffler may be uncertain. The range of optimality is the range of contribution margins (coefficients in the objective function) in which a particular solution is the optimal solution. EXAMPLE 1: RANGE OF OPTIMALITY Profit: 8 ≤ contribution margin ≤ 14 Sports mufflers range: 10 f + 18 s 15 ≤ contribution margin ≤ 30 $18 + $12 = $30 $18 - $3 = $15 The range of optimality tells you how sensitive the decision inputs for the optimal solution are to variation in the coefficients of the objective function.