1 / 19

5. Linear Programming

5. Linear Programming. Introduction to Constrained Optimization Three elements: objective, constraints, decisions General formulation Terminology Linear Programming Properties of LP Solving LP problems using Solver

Download Presentation

5. Linear Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 5. Linear Programming • Introduction to Constrained Optimization • Three elements: objective, constraints, decisions • General formulation • Terminology • Linear Programming • Properties of LP • Solving LP problems using Solver • Sensitivity analysis: constraints and shadow prices, objective function coefficients

  2. Portfolio Management • A portfolio manager wants to structure a portfolio from several investments: A, B, C, D • Decisions: • Objective: • Constraints: • If is more important • Objective: • Constraints:

  3. Constrained Optimization: find decisions that Maximize (or minimize): objective function Subject to: constraints (limitations on resources) Applications Portfolio management -- Distribution Location planning -- Production planning Production scheduling -- Workforce planning Many others Example: Produce and ship 100 products from 20 plants to 50 DCs around the world, to minimize costs. Constraints? Decisions? Objective? Constrained Optimization

  4. General Formulation LHS RHS

  5. Terminology • Decision variables - things we can control • Objective function - performance measure • Feasible region - The region in which the decision variables satisfy all of the constraints (choice set) • Feasible solution - A solution that satisfies all constraints (lies within the feasible region). • Optimal solution - the feasible solution that achieves the best (max or min) value for the objective function. • Optimal objective function value - The value of the objective function at the optimal solution.

  6. Linear Programs • An important tractable special case • Very easy for the computer to solve a large scale problem • Wide applications • Linear objective function and constraints • The feasible region will be a convexpolyhedron • Convex: No holes or indentations • Polyhedron: flat sides • Optimal solution will always be at a corner – ignore infinite feasible points on sides and interior points

  7. Products A B Available Machine Hours hours Machines M1 2 4 20 M2 2 1.5 12 Marginal Profit $6.00 $16.00 Product Mix Problem Maximize Subject to:

  8. LP in Excel: Formulation(LP_MILP.xls) In Excel Spreadsheet: For given values of the decision variables in C3:D3, • calculate the objective value: F4 = SUMPRODUCT(C4:D4, C3:D3) • calculate the LHS of the constraints: F6 = SUMPRODUCT(C6:D6, $C$3:$D$3) • F7 = SUMPRODUCT(C7:D7, $C$3:$D$3) We must tell Excel’s Solver that: • Objective function is in F4 (Target Cell) • Decision variables are in C3:D3 (Changing Cells) • Constraints are F6:F7 (hours used)  E6:E7 (hours available) • It is a Linear Model with Non-Negative decision variables (under Options)

  9. LP in Excel: Instructions for Solver (LP_MILP.xls) Go to Tools and find Solver Solver Options: Select “Linear Model” & “Non-Negative”

  10. Answer Report: The Solution (LP_MILP.xls) What is the solution? ProdA = , ProdB = Profit = How much machine time? Mach1 = , Mach2 = Unused machine time? Mach1 = , Mach2 = Max 6XA + 16XB s.t. 2XA + 4XB  20 2XA + 1.5XB  12 XA  0, XB  0

  11. Sensitivity Report: Sensitivity Analysis of Objective Function Why would we lose $2 to produce 1 unit of ProdA (Reduced Cost)? (a) How much must the profit margin of ProdA increase before we will produce it (Allowable Increase)? (b) What if the profit margin of ProdA increases by more than $2 (Allowable Increase)?

  12. Sensitivity Report: Sensitivity Analysis of Objective Function • If you change an Objective Coefficient within its Allowable Increase/Decrease, the “Final Values of the Variables” do not change (i.e. the same corner is optimal) • Outside that range, the “Final Values” change (i.e., new optimal solution).

  13. Sensitivity Report: Sensitivity Analysis of Constraints The shadow price is the rate of change of objective function per unit increase of the RHS (constraint limit). If 2 hours of Mach 1 time were unavailable (i.e. 20 decreases to 18), how much would the objective function change? Why is the Shadow Price = zero for Mach 2? • Within the Allowable Increase/Decrease for the RHS , the “Shadow Price” is constant. • Outside that range, the “Shadow Price” changes

  14. Takeaways • Introduction to Constrained Optimization • Three elements: objective (max or min), constraints (≤, ≥, =), decision variables • Formulation • Linear Programming: linear constraints and objective function • Properties of LP: optimal solution at a corner • Solving LP problems using Solver • Answer: optimal objective value, decisions, binding/nonbinding constraints • Sensitivity analysis: • Objective function coefficients: reduced cost, allowable increase/decrease (when zero, multiple solutions) • Constraints: shadow prices (if 0, non-bottleneck), allowable increase/decrease on RHS of constraints

  15. Graph 1: Solution Which constraints are “binding” the optimal solution? XB 1 2 3 4 5 6 7 8 9 10 11 12 2XA + 1.5XB = 12 (Machine 2) • See Output 1: Solution 2XA + 4XB = 20 (Machine 1) 1 2 3 4 5 6 7 8 9 10 11 12 XA

  16. Solution Which constraints are “binding” the optimal solution? XB 1 2 3 4 5 6 7 8 9 10 11 12 2XA + 1.5XB = 12 (Machine 2) 6XA + 16XB = 80 • See Output 1: Solution 6XA + 16XB = 32 6XA + 16XB = 16 2XA + 4XB = 20 (Machine 1) 1 2 3 4 5 6 7 8 9 10 11 12 XA

  17. Changing One of the Objective Function Coefficient How many optimal solutions are there in this case? XB Let’s add 2 to the objective coefficient of XA: 8XA + 16XB = 80 Allowable Increase = 2 for Objective Coefficient of Product A 1 2 3 4 5 6 7 8 9 10 11 12 2XA + 1.5XB = 12 (Machine 2) 6XA + 16XB = 80 • • • • • • • • • 2XA + 4XB = 20 (Machine 1) 1 2 3 4 5 6 7 8 9 10 11 12 XA

  18. Changing the Objective Function Coefficient More thanthe Allowable Increase or Decrease XB Allowable Increase = 2 for Objective Coefficient of Product A Now Try: 10XA + 16XB = 80 1 2 3 4 5 6 7 8 9 10 11 12 2XA + 1.5XB = 12 (Machine 2) 6XA + 16XB = 80 New Solution: ( ) • 2XA + 4XB = 20 (Machine 1) 1 2 3 4 5 6 7 8 9 10 11 12 XA

  19. Changing the LHS of a Constraint Machine 1 Constraint has: Constraint R.H. Side = 20, Allowable Increase = 12, Allowable Decrease = 20 XB • Do the decision variables change? • Does the objective function change? 1 2 3 4 5 6 7 8 9 10 11 12 2XA + 1.5XB = 12 (Machine 2) • 2XA + 4XB = 20 Now lets try 2XA + 4XB = 16 1 2 3 4 5 6 7 8 9 10 11 12 XA

More Related