900 likes | 1.07k Views
Lecture 1. Linear Programming. Agenda. Math Programming Linear Programming Introduction Exercise: Lego Enterprises Terminology, Definitions Possible Outcomes Sensitivity Analysis. Math Programming.
E N D
Lecture 1 Linear Programming
Agenda • Math Programming • Linear Programming • Introduction • Exercise: Lego Enterprises • Terminology, Definitions • Possible Outcomes • Sensitivity Analysis
Math Programming • Deals with resource allocation to maximize or minimize an objective subject to certain constraints • Types: • Linear, Integer, Mixed, Nonlinear, Goal • Relatively easy to solve using modern computing technology (potentially too easy!)
Our Focus • Linear, Integer (& Mixed Linear/Integer) • Recognizing when linear/integer/mixed programming is appropriate • Developing basic models • Computer solution • Excel • Interpreting results
Lego Enterprises • Table profit is $16; Chair profit is $10 • Table design • 2 large blocks (side by side) • 2 small blocks (stacked under, centered) • Chair design • 1 large block (seat) • 2 small blocks (back, bottom) • Objective: select product mix to maximize profits using available resources
Understanding Lego Problem • Formulate as LP • Decision Variables, Objective Function, Constraints • Graph • Constraints, Objective function • Find solution
LP Formulation • Decision Variables • T = # of tables • C = # of chairs • Objective • Maximize profit = • Constraints • For large blocks: • For small blocks:
LP Formulation • Decision Variables • T = # of tables • C = # of chairs • Objective • Maximize profit: Z = 16T + 10C • Constraints • For large blocks: • For small blocks:
LP Formulation • Decision Variables • T = # of tables • C = # of chairs • Objective • Maximize profit: Z = 16T + 10C • Constraints • For large blocks: 2T + 1C < 6 • For small blocks:
LP Formulation • Decision Variables • T = # of tables • C = # of chairs • Objective • Maximize profit: Z = 16T + 10C • Constraints • For large blocks: 2T + 1C < 6 • For small blocks: 2T + 2C < 8
Graphing Lego Example • Draw quadrant & axes • use T on x-axis and C on y-axis • Add constraint lines • Find intercepts: set T to zero and solve for C, set C to zero and solve for T • Add profit equation • Select reasonable value • Move profit equation outwards, as far as feasible
Graphing Lego Example • Draw quadrant & axes • use T on x-axis and C on y-axis
Graphing Lego Example • Add constraint lines • Find intercepts: set T to zero and solve for C, set C to zero and solve for T • Large: • Tables: Max = 3 • Chairs: Max = 6
Graphing Lego Example • Add constraint lines • Find intercepts: set T to zero and solve for C, set C to zero and solve for T • Large: • Tables: Max = 3 • Chairs: Max = 6
Graphing Lego Example • Add constraint lines • Find intercepts: set T to zero and solve for C, set C to zero and solve for T • Small: • Tables: Max = 4 • Chairs: Max = 4
Graphing Lego Example • Add constraint lines • Find intercepts: set T to zero and solve for C, set C to zero and solve for T • Small: • Tables: Max = 4 • Chairs: Max = 4
Graphing Lego Example • Add profit equation • Select reasonable value • 40: • Tables: 40/16 = 2.5 • Chairs: 40/10 = 4
Graphing Lego Example • Add profit equation • Select reasonable value • 40: • Tables: 40/16 = 2.5 • Chairs: 40/10 = 4
Graphing Lego Example • Move profit equation outwards, as far as feasible • Solution: T = 2, C = 2 • Profit: 16(2)+10(2)=52
Characteristics Of LPs • Objective function and constraints are linear functions • Constraint types are <, = , or > • Variables can assume any fractional value • Decision variables are non-negative • Maximize or Minimize single objective
Characteristics Of LPs • Objective function and constraints are linear functions • Lego: All were linear trade-offs • Constraint types are <, = , or > • Variables can assume any fractional value • Decision variables are non-negative • Maximize or Minimize single objective
Characteristics Of LPs • Objective function and constraints are linear functions • Constraint types are <, = , or > • Lego: All Constraints implied maximums (<) • Variables can assume any fractional value • Decision variables are non-negative • Maximize or Minimize single objective
Characteristics Of LPs • Objective function and constraints are linear functions • Constraint types are <, = , or > • Variables can assume any fractional value • Lego: Fractional values can be viewed as work-in-process at the end of the day • Decision variables are non-negative • Maximize or Minimize single objective
Characteristics Of LPs • Objective function and constraints are linear functions • Constraint types are <, = , or > • Variables can assume any fractional value • Decision variables are non-negative • Lego: Cannot produce negative amounts • Maximize or Minimize single objective
Characteristics Of LPs • Objective function and constraints are linear functions • Constraint types are <, = , or > • Variables can assume any fractional value • Decision variables are non-negative • Maximize or Minimize single objective • Lego: Maximizing Profit
Key Definitions • Feasible solution: one that satisfies all constraints • can have many feasible solutions • Feasible region: set of all feasible solutions • Optimal solution: any feasible solution that optimizes the objective function • can have ties
Standard LP Form • All constraints expressed as equalities • use slack (<) or surplus (>) variables • All variables are nonnegative • All variables appear on the left side of the constraint functions • All constants appear on the right side of the constraint functions • Formulate Lego problem in standard form
Lego - Standard Form • Maximize profit: Z = 16T + 10C • Subject to • For large blocks: 2T + 1C + S1 = 6 • For small blocks: 2T + 2C + S2 = 8 • Non-negativities:, T, C, S1, S2> 0 • Useful, because of the concept of slack and surplus • While we will not formulate this way in Excel, we will still use these concepts
Possible LP Outcomes • Unique optimal solution • Alternate optimal solutions • Unbounded problem • Infeasible problem
Example: Unique Optimal Soln • Solve graphically for the optimal solution: Max: z = 6x1 + 2x2 s.t. 4x1 + 3x2> 12 x1 + x2< 8 x1, x2> 0
Example: Unique Optimal • There is only one point in the feasible set that maximizes the objective function (x1 = 8, x2 = 0) x2 8 Max 6x1 + 2x2 4x1 + 3x2> 12 4 x1 + x2< 8 x1 3 8
Example: Alternate Solutions • Solve graphically for the optimal solution: Max z = 6x1 + 3x2 s.t. 4x1 + 3x2> 12 2x1 + x2< 8 x1, x2> 0
Example: Alternate Solutions • There are infinite points satisfying both constraints - objective function falls on a constraint line 2x1 + x2< 8 x2 8 4x1 + 3x2> 12 Max 6x1 + 3x2 4 x1 3 4
Example: Infeasible Problem • Solve graphically for the optimal solution: Max z = 2x1 + 6x2 s.t. 4x1 + 3x2< 12 2x1 + x2> 8 x1, x2> 0
Example: Infeasible Problem • No points satisfy both constraints • no feasible region, no optimal solution x2 2x1 + x2> 8 8 4x1 + 3x2< 12 4 x1 3 4
Example: Unbounded Problem • Solve graphically for the optimal solution: Max z = 3x1 + 4x2 s.t. x1 + x2> 5 3x1 + x2> 8 x1, x2> 0
Example: Unbounded Problem • objective function can be moved outward without limit; z can be increased infinitely x2 3x1 + x2> 8 8 5 x1 + x2> 5 Max 3x1 + 4x2 x1 2.67 5
Characteristics Of LPs • Objective function and constraints are linear functions • Constraint types are <, = , or > • Variables can assume any fractional value • Decision variables are non-negative • Maximize or Minimize single objective
Formulation • Define decision variables: x1, x2, … • Objective Function (max, min) • s.t., with constraints listed • Variables on left side • Constants on right side • All variables nonnegative • NB: “Standard Form” requires constraints stated as equalities • add slack/surplus variables
Possible LP Outcomes • Unique optimal solution • Alternate optimal solutions • Unbounded problem • Infeasible problem
Break 15 Minutes
LP Models: Key Questions • What am I trying to decide? • What is the objective? • Is it to be minimized or maximized? • What are the constraints? • Are they limitations or requirements? • Are they explicit or implicit?
Example A chemical company makes and sells a product in 40-lb. and 80-lb. bags on a common production line. To meet anticipated orders, next week’s production should be at least 16,000 lbs. Profit contributions are $2 per 40-lb. bag, and $4 per 80-lb. bag. The packaging line operates 1500 minutes/week. 40-lb. bags require 1.2 min. of packaging time; 80-lb. bags require 3 min. The company has 6000 square feet of packaging material available. Each 40-lb. bag uses 6 square feet, and each 80-lb. bag uses 10 square feet. How many bags of each type should be produced?
Model Development • What do we need to decide? What are our decision variables?
Model Development • What do we need to decide? x1 = number of 40-lb. bags to produce x2 = number of 80-lb. bags to produce
Model Development • What is the objective?
Model Development • What is the objective? Maximize total profit
Model Development • What is the objective? Maximize total profit z = 2x1 + 4x2
Check Your Units! • Always be sure that your units are consistent with the problem • Our decision variable is measured in “Bags” • Our profit/objective function is in $