© Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.
-
Upload
griffin-oconnor -
Category
Documents
-
view
221 -
download
0
Transcript of © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.
![Page 1: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/1.jpg)
© Copyright 2004, Alan Marshall 1
Lecture 1Lecture 1
Linear Programming
![Page 2: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/2.jpg)
© Copyright 2004, Alan Marshall 2
AgendaAgenda
>Math Programming>Linear Programming
• Introduction• Exercise: Lego Enterprises• Terminology, Definitions• Possible Outcomes• Sensitivity Analysis
![Page 3: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/3.jpg)
© Copyright 2004, Alan Marshall 3
Math ProgrammingMath 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!)
![Page 4: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/4.jpg)
© Copyright 2004, Alan Marshall 4
Our FocusOur Focus
>Linear, Integer (& Mixed Linear/Integer)
>Recognizing when linear/integer/mixed programming is appropriate
>Developing basic models>Computer solution
• Excel
>Interpreting results
![Page 5: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/5.jpg)
© Copyright 2004, Alan Marshall 5
Lego EnterprisesLego 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
![Page 6: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/6.jpg)
© Copyright 2004, Alan Marshall 6
Understanding Lego ProblemUnderstanding Lego Problem
> Formulate as LP• Decision Variables, Objective Function,
Constraints
>Graph• Constraints, Objective function
>Find solution
![Page 7: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/7.jpg)
© Copyright 2004, Alan Marshall 7
LP FormulationLP Formulation
>Decision Variables• T = # of tables• C = # of chairs
>Objective• Maximize profit =
>Constraints• For large blocks:• For small blocks:
![Page 8: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/8.jpg)
© Copyright 2004, Alan Marshall 8
LP FormulationLP Formulation
>Decision Variables• T = # of tables• C = # of chairs
>Objective• Maximize profit: Z = 16T + 10C
>Constraints• For large blocks:• For small blocks:
![Page 9: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/9.jpg)
© Copyright 2004, Alan Marshall 9
LP FormulationLP 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:
![Page 10: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/10.jpg)
© Copyright 2004, Alan Marshall 10
LP FormulationLP 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
![Page 11: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/11.jpg)
© Copyright 2004, Alan Marshall 11
Graphing Lego ExampleGraphing 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
![Page 12: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/12.jpg)
© Copyright 2004, Alan Marshall 12
Graphing Lego ExampleGraphing Lego Example
>Draw quadrant & axes• use T on x-axis and
C on y-axis
![Page 13: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/13.jpg)
© Copyright 2004, Alan Marshall 13
Graphing Lego ExampleGraphing 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
![Page 14: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/14.jpg)
© Copyright 2004, Alan Marshall 14
Graphing Lego ExampleGraphing 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
![Page 15: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/15.jpg)
© Copyright 2004, Alan Marshall 15
Graphing Lego ExampleGraphing 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
![Page 16: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/16.jpg)
© Copyright 2004, Alan Marshall 16
Graphing Lego ExampleGraphing 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
![Page 17: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/17.jpg)
© Copyright 2004, Alan Marshall 17
Graphing Lego ExampleGraphing Lego Example
>Add profit equation• Select reasonable
value
>40:• Tables: 40/16 = 2.5• Chairs: 40/10 = 4
![Page 18: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/18.jpg)
© Copyright 2004, Alan Marshall 18
Graphing Lego ExampleGraphing Lego Example
>Add profit equation• Select reasonable
value
>40:• Tables: 40/16 = 2.5• Chairs: 40/10 = 4
![Page 19: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/19.jpg)
© Copyright 2004, Alan Marshall 19
Graphing Lego ExampleGraphing Lego Example
>Move profit equation outwards, as far as feasible
>Solution: T = 2, C = 2
>Profit: 16(2)+10(2)=52
![Page 20: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/20.jpg)
© Copyright 2004, Alan Marshall 20
Characteristics Of LPsCharacteristics 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
![Page 21: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/21.jpg)
© Copyright 2004, Alan Marshall 21
Characteristics Of LPsCharacteristics 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
![Page 22: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/22.jpg)
© Copyright 2004, Alan Marshall 22
Characteristics Of LPsCharacteristics 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
![Page 23: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/23.jpg)
© Copyright 2004, Alan Marshall 23
Characteristics Of LPsCharacteristics 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
![Page 24: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/24.jpg)
© Copyright 2004, Alan Marshall 24
Characteristics Of LPsCharacteristics 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
![Page 25: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/25.jpg)
© Copyright 2004, Alan Marshall 25
Characteristics Of LPsCharacteristics 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
![Page 26: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/26.jpg)
© Copyright 2004, Alan Marshall 26
Key DefinitionsKey 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
![Page 27: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/27.jpg)
© Copyright 2004, Alan Marshall 27
Standard LP FormStandard 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
![Page 28: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/28.jpg)
© Copyright 2004, Alan Marshall 28
Lego - Standard FormLego - 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
![Page 29: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/29.jpg)
© Copyright 2004, Alan Marshall 29
Possible LP OutcomesPossible LP Outcomes
>Unique optimal solution>Alternate optimal solutions>Unbounded problem>Infeasible problem
![Page 30: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/30.jpg)
© Copyright 2004, Alan Marshall 30
Example: Unique Optimal Soln 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
![Page 31: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/31.jpg)
© Copyright 2004, Alan Marshall 31
xx22
xx11
44xx11 + 3 + 3xx22 >> 12 12
xx11 + + xx22 << 8 8
33 88
44
88
Max 6Max 6xx11 + 2 + 2xx22
Example: Unique OptimalExample: Unique Optimal
>There is only one point in the feasible set that maximizes the objective function (x1 = 8, x2 = 0)
![Page 32: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/32.jpg)
© Copyright 2004, Alan Marshall 32
Example: Alternate Solutions Example: Alternate Solutions
>Solve graphically for the optimal solution:Max z = 6x1 + 3x2
s.t. 4x1 + 3x2 > 12
2x1 + x2 < 8
x1, x2 > 0
![Page 33: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/33.jpg)
© Copyright 2004, Alan Marshall 33
xx22
xx11
44xx11 + 3 + 3xx22 >> 12 12
22xx11 + + xx22 << 8 8
33 44
44
88
Max 6Max 6xx11 + 3 + 3xx22
Example: Alternate SolutionsExample: Alternate Solutions
>There are infinite points satisfying both constraints - objective function falls on a constraint line
![Page 34: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/34.jpg)
© Copyright 2004, Alan Marshall 34
Example: Infeasible ProblemExample: Infeasible Problem
>Solve graphically for the optimal solution:Max z = 2x1 + 6x2
s.t. 4x1 + 3x2 < 12
2x1 + x2 > 8
x1, x2 > 0
![Page 35: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/35.jpg)
© Copyright 2004, Alan Marshall 35
xx22
xx11
44xx11 + 3 + 3xx22 << 12 12
22xx11 + + xx22 >> 8 8
33 44
44
88
Example: Infeasible ProblemExample: Infeasible Problem
>No points satisfy both constraints• no feasible region, no optimal solution
![Page 36: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/36.jpg)
© Copyright 2004, Alan Marshall 36
Example: Unbounded ProblemExample: Unbounded Problem
>Solve graphically for the optimal solution:Max z = 3x1 + 4x2
s.t. x1 + x2 > 5
3x1 + x2 > 8
x1, x2 > 0
![Page 37: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/37.jpg)
© Copyright 2004, Alan Marshall 37
x2
x1
33xx11 + + xx22 >> 8 8
xx11 + + xx22 >> 5 5
Max 3Max 3xx11 + 4 + 4xx22
5
5
88
2.67
Example: Unbounded ProblemExample: Unbounded Problem
>objective function can be moved outward without limit; z can be increased infinitely
![Page 38: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/38.jpg)
© Copyright 2004, Alan Marshall 38
RECAPRECAP
![Page 39: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/39.jpg)
© Copyright 2004, Alan Marshall 39
Characteristics Of LPsCharacteristics 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
![Page 40: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/40.jpg)
© Copyright 2004, Alan Marshall 40
FormulationFormulation
>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
![Page 41: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/41.jpg)
© Copyright 2004, Alan Marshall 41
Possible LP OutcomesPossible LP Outcomes
>Unique optimal solution>Alternate optimal solutions>Unbounded problem>Infeasible problem
![Page 42: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/42.jpg)
© Copyright 2004, Alan Marshall 42
BreakBreak
15 Minutes
![Page 43: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/43.jpg)
© Copyright 2004, Alan Marshall 43
LP Models: Key QuestionsLP 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?
![Page 44: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/44.jpg)
© Copyright 2004, Alan Marshall 44
ExampleExample
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?
![Page 45: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/45.jpg)
© Copyright 2004, Alan Marshall 45
Model DevelopmentModel Development
>What do we need to decide?What are our decision variables?
![Page 46: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/46.jpg)
© Copyright 2004, Alan Marshall 46
Model DevelopmentModel Development
>What do we need to decide?x1 = number of 40-lb. bags to produce
x2 = number of 80-lb. bags to produce
![Page 47: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/47.jpg)
© Copyright 2004, Alan Marshall 47
Model DevelopmentModel Development
>What is the objective?
![Page 48: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/48.jpg)
© Copyright 2004, Alan Marshall 48
Model DevelopmentModel Development
>What is the objective?Maximize total profit
![Page 49: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/49.jpg)
© Copyright 2004, Alan Marshall 49
Model DevelopmentModel Development
>What is the objective?Maximize total profitz = 2x1 + 4x2
![Page 50: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/50.jpg)
© Copyright 2004, Alan Marshall 50
Check Your Units!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 $
$bagsbag$
tObj.Fn.UniitDec.Var.Unf.Obj.Fn.Coe
![Page 51: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/51.jpg)
© Copyright 2004, Alan Marshall 51
Model DevelopmentModel Development
>What are the constraints?
![Page 52: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/52.jpg)
© Copyright 2004, Alan Marshall 52
Model DevelopmentModel Development
>What are the constraints?Aggregate production:Packaging time:Packaging materials:Nonnegativity:
![Page 53: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/53.jpg)
© Copyright 2004, Alan Marshall 53
Model DevelopmentModel Development
>What are the constraints?Prod: 40x1 + 80x2 > 16,000
Time:Mat:NN:
![Page 54: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/54.jpg)
© Copyright 2004, Alan Marshall 54
Model DevelopmentModel Development
>What are the constraints?Prod: 40x1 + 80x2 > 16,000
Time: 1.2x1 + 3x2 < 1,500
Mat:NN:
![Page 55: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/55.jpg)
© Copyright 2004, Alan Marshall 55
Model DevelopmentModel Development
>What are the constraints?Prod: 40x1 + 80x2 > 16,000
Time: 1.2x1 + 3x2 < 1,500
Mat:6x1 + 10x2 < 6,000
NN:
![Page 56: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/56.jpg)
© Copyright 2004, Alan Marshall 56
Model DevelopmentModel Development
>What are the constraints?Prod: 40x1 + 80x2 > 16,000
Time: 1.2x1 + 3x2 < 1,500
Mat:6x1 + 10x2 < 6,000
NN: x1, x2 > 0
![Page 57: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/57.jpg)
© Copyright 2004, Alan Marshall 57
Check The Units!Check The Units!
>What are the constraints?Prod: 40x1 + 80x2 > 16,000lbs/bag x bags
Time: 1.2x1 + 3x2 < 1,500 min/bag x bags
Mat: 6x1 + 10x2 < 6,000 ft2/bag x bags
NN: x1, x2 > 0
![Page 58: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/58.jpg)
© Copyright 2004, Alan Marshall 58
Complete ModelComplete Model
x1 = no. of 40-lb. bags to produce
x2 = no. of 80-lb. bags to produce
Maximize z = 2x1 + 4x2
subject to 40x1 + 80x2 > 16,000
1.2x1 + 3x2 < 1,500
6x1 + 10x2 < 6,000
x1, x2 > 0
![Page 59: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/59.jpg)
© Copyright 2004, Alan Marshall 59
ExcelExcel
>Model Input• Basic model• Solver: identify objective function &
constraints
>Results• Answer Report• Sensitivity Report• Limits Report
![Page 60: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/60.jpg)
© Copyright 2004, Alan Marshall 60
Spreadsheet ModelSpreadsheet Model
A B C D E F G1 40-lb 80-lb23 DecVar 0 04 Constraint Constraint5 ObFnCoef 2 4 0 Amount Slack67 MinProd'n 40 80 0 >= 16000 160008 MachTime 1.2 3 0 <= 1500 15009 PackMat 6 10 0 <= 6000 6000
![Page 61: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/61.jpg)
© Copyright 2004, Alan Marshall 61
Cell FormulasCell Formulas
A B C D E F G1 40-lb 80-lb23 DecVar 0 04 Constraint Constraint5 ObFnCoef 2 4 =SUMPRODUCT(B5:C5,$B$3:$C$3) Amount Slack67 MinProd'n 40 80 =SUMPRODUCT(B7:C7,$B$3:$C$3) >= 16000 =ROUND(F7-D7,2)8 MachTime 1.2 3 =SUMPRODUCT(B8:C8,$B$3:$C$3) <= 1500 =ROUND(F8-D8,2)9 PackMat 6 10 =SUMPRODUCT(B9:C9,$B$3:$C$3) <= 6000 =ROUND(F9-D9,2)
![Page 62: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/62.jpg)
© Copyright 2004, Alan Marshall 62
Using SolverUsing Solver
![Page 63: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/63.jpg)
© Copyright 2004, Alan Marshall 63
Adding ConstraintsAdding Constraints
![Page 64: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/64.jpg)
© Copyright 2004, Alan Marshall 64
Note Assumptions ticked - essential!
Solver OptionsSolver Options
![Page 65: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/65.jpg)
© Copyright 2004, Alan Marshall 65
Answer ReportAnswer Report
Microsoft Excel 8.0e Answer Report
Target Cell (Max)Cell Name Original Value Final Value
$D$5 ObFnCoef 0 2200
Adjustable CellsCell Name Original Value Final Value
$B$3 DecVar 40-lb 0 500$C$3 DecVar 80-lb 0 300
ConstraintsCell Name Cell Value Formula Status Slack
$D$8 MachTime 1500 $D$8<=$F$8 Binding 0$D$9 PackMat 6000 $D$9<=$F$9 Binding 0$D$7 MinProd'n 44000 $D$7>=$F$7 Not Binding 28000
![Page 66: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/66.jpg)
© Copyright 2004, Alan Marshall 66
Sensitivity ReportSensitivity Report
Microsoft Excel 8.0e Sensitivity Report
Adjustable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$3 DecVar 40-lb 500 0 2 0.4 0.4$C$3 DecVar 80-lb 300 0 4 1 0.666666667
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$8 MachTime 1500 0.666666667 1500 300 300$D$9 PackMat 6000 0.2 6000 1500 1000$D$7 MinProd'n 44000 0 16000 28000 1E+30
![Page 67: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/67.jpg)
© Copyright 2004, Alan Marshall 67
Optimal SolutionOptimal Solution
>Three parts: • decision variables• values of decision variables• value of objective function
>Decision variables:• basic (non-zero value),• non-basic (zero)• Basic variables are “in the solution”; non-
basic are not
![Page 68: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/68.jpg)
© Copyright 2004, Alan Marshall 68
Impact of Possible ChangesImpact of Possible Changes
>Change existing constraint• changes slope; may change size of
feasible region
>Add new constraint• may decrease feasible region (if binding)
>Remove constraint• may increase feasible region (if binding)
>Change objective• may change optimal solution
![Page 69: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/69.jpg)
© Copyright 2004, Alan Marshall 69
Sensitivity AnalysisSensitivity Analysis
>The next section will deal with the sensitivity analysis that can be done simply based on the reports generated, without rerunning the solution.
>While this can be useful, mastery of this material is not important for the course, or programme as you can always simply run the model again with the changes
>However, we will look at this briefly
![Page 70: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/70.jpg)
© Copyright 2004, Alan Marshall 70
Sensitivity AnalysisSensitivity Analysis
>Used to determine how optimal solution is affected by changes, within specified ranges: objective function or RHS coefficients (only 1 at a time)
>Important to managers who must operate in a dynamic environment with imprecise estimates of coefficients
>Sensitivity analysis allows us to ask certain what-if questions
![Page 71: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/71.jpg)
© Copyright 2004, Alan Marshall 71
Objective Function CoefficientsObjective Function Coefficients
>If an objective function coefficient changes, slope of objective function line changes. At some threshold, another corner point may become optimal.
>Question: How much can objective coefficient change without changing optimal corner point?
![Page 72: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/72.jpg)
© Copyright 2004, Alan Marshall 72
x2
x1
current optimal solution
new optimal solution
Geometric IllustrationGeometric Illustration
![Page 73: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/73.jpg)
© Copyright 2004, Alan Marshall 73
Sensitivity ReportSensitivity Report
Microsoft Excel 8.0e Sensitivity Report
Adjustable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$3 DecVar 40-lb 500 0 2 0.4 0.4$C$3 DecVar 80-lb 300 0 4 1 0.666666667
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$8 MachTime 1500 0.666666667 1500 300 300$D$9 PackMat 6000 0.2 6000 1500 1000$D$7 MinProd'n 44000 0 16000 28000 1E+30
![Page 74: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/74.jpg)
© Copyright 2004, Alan Marshall 74
Reduced Costs Reduced Costs (Objective Function Coefficients)(Objective Function Coefficients)
>Reduced cost for decision variable not in solution (current value is 0) is amount variable's objective function coefficient would have to improve (increase for max, decrease for min) before variable could enter solution
>Reduced cost for decision variable in solution is 0
![Page 75: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/75.jpg)
© Copyright 2004, Alan Marshall 75
Sensitivity ReportSensitivity Report
Microsoft Excel 8.0e Sensitivity Report
Adjustable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$3 DecVar 40-lb 500 0 2 0.4 0.4$C$3 DecVar 80-lb 300 0 4 1 0.666666667
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$8 MachTime 1500 0.666666667 1500 300 300$D$9 PackMat 6000 0.2 6000 1500 1000$D$7 MinProd'n 44000 0 16000 28000 1E+30
![Page 76: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/76.jpg)
© Copyright 2004, Alan Marshall 76
Objective Function RangesObjective Function Ranges
>Interval within which original solution remains optimal (same decision variables in solution) while keeping all other data constant
>Within this range, associated reduced cost is valid
>Value of the objective function might change in this range of optimality
![Page 77: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/77.jpg)
© Copyright 2004, Alan Marshall 77
Sensitivity ReportSensitivity Report
Microsoft Excel 8.0e Sensitivity Report
Adjustable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$3 DecVar 40-lb 500 0 2 0.4 0.4$C$3 DecVar 80-lb 300 0 4 1 0.666666667
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$8 MachTime 1500 0.666666667 1500 300 300$D$9 PackMat 6000 0.2 6000 1500 1000$D$7 MinProd'n 44000 0 16000 28000 1E+30
![Page 78: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/78.jpg)
© Copyright 2004, Alan Marshall 78
RHS Coefficient ChangesRHS Coefficient Changes
>When a right-hand-side value changes, the constraint moves parallel to itself
>Question: How is the solution affected, if at all?
>Two cases:• constraint is binding• constraint is nonbinding
![Page 79: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/79.jpg)
© Copyright 2004, Alan Marshall 79
x2
x1
optimal solution
Binding constraints
Binding constraints have zero slackNonbinding constraints have positive slack
Nonbinding constraint
Geometric IllustrationGeometric Illustration
![Page 80: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/80.jpg)
© Copyright 2004, Alan Marshall 80
Binding ConstraintsBinding Constraints
Microsoft Excel 8.0e Answer Report
Target Cell (Max)Cell Name Original Value Final Value
$D$5 ObFnCoef 0 2200
Adjustable CellsCell Name Original Value Final Value
$B$3 DecVar 40-lb 0 500$C$3 DecVar 80-lb 0 300
ConstraintsCell Name Cell Value Formula Status Slack
$D$8 MachTime 1500 $D$8<=$F$8 Binding 0$D$9 PackMat 6000 $D$9<=$F$9 Binding 0$D$7 MinProd'n 44000 $D$7>=$F$7 Not Binding 28000
![Page 81: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/81.jpg)
© Copyright 2004, Alan Marshall 81
Tightening & Relaxing ConstraintsTightening & Relaxing Constraints
>Tightening a constraint means to make it more restrictive; i.e. decreasing the RHS of a less than constraint, or increasing the RHS of a greater constraint. This compresses the feasible region.
>Relaxing a constraint means to make it less restrictive; i.e., expand the feasible region.
![Page 82: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/82.jpg)
© Copyright 2004, Alan Marshall 82
x2
x1
Original optimal solution
New optimal solution (z decreases)
Effect of Tightening a ConstraintEffect of Tightening a Constraint
![Page 83: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/83.jpg)
© Copyright 2004, Alan Marshall 83
x2
x1
optimal solution
Effect of Relaxing a ConstraintEffect of Relaxing a Constraint
![Page 84: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/84.jpg)
© Copyright 2004, Alan Marshall 84
Sensitivity ReportSensitivity Report
Microsoft Excel 8.0e Sensitivity Report
Adjustable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$3 DecVar 40-lb 500 0 2 0.4 0.4$C$3 DecVar 80-lb 300 0 4 1 0.666666667
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$8 MachTime 1500 0.666666667 1500 300 300$D$9 PackMat 6000 0.2 6000 1500 1000$D$7 MinProd'n 44000 0 16000 28000 1E+30
![Page 85: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/85.jpg)
© Copyright 2004, Alan Marshall 85
Dual Prices (RHS Coefficients)Dual Prices (RHS Coefficients)
>Amount objective function will improve per unit increase in constraint RHS value
>Reflects value of an additional unit of resource (if resource cost is sunk); reflects extra value over normal cost of resource (when resource cost is relevant)
>Always 0 for nonbinding constraint (positive slack or surplus at optimal solution)
![Page 86: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/86.jpg)
© Copyright 2004, Alan Marshall 86
Sensitivity ReportSensitivity Report
Microsoft Excel 8.0e Sensitivity Report
Adjustable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$3 DecVar 40-lb 500 0 2 0.4 0.4$C$3 DecVar 80-lb 300 0 4 1 0.666666667
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$8 MachTime 1500 0.666666667 1500 300 300$D$9 PackMat 6000 0.2 6000 1500 1000$D$7 MinProd'n 44000 0 16000 28000 1E+30
![Page 87: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/87.jpg)
© Copyright 2004, Alan Marshall 87
Sensitivity ReportSensitivity Report
Microsoft Excel 8.0e Sensitivity Report
Adjustable CellsFinal Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease$B$3 DecVar 40-lb 500 0 2 0.4 0.4$C$3 DecVar 80-lb 300 0 4 1 0.666666667
ConstraintsFinal Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease$D$8 MachTime 1500 0.666666667 1500 300 300$D$9 PackMat 6000 0.2 6000 1500 1000$D$7 MinProd'n 44000 0 16000 28000 1E+30
![Page 88: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/88.jpg)
© Copyright 2004, Alan Marshall 88
RHS RangesRHS Ranges
>As long as the constraint RHS coefficient stays within this range, the associated dual price is valid
>For changes outside this range, must resolve
![Page 89: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/89.jpg)
© Copyright 2004, Alan Marshall 89
Shadow vs Dual PricesShadow vs Dual Prices
>Shadow Price: Amount objective function will change per unit increase in RHS value of constraint
>For maximization problems, dual prices and shadow prices are the same
>For minimization problems, shadow prices are the negative of dual prices
![Page 90: © Copyright 2004, Alan Marshall 1 Lecture 1 Linear Programming.](https://reader030.fdocuments.in/reader030/viewer/2022032600/56649dbc5503460f94aaf199/html5/thumbnails/90.jpg)
© Copyright 2004, Alan Marshall 90
Next ClassNext Class
>We will look at the two handout exercises• To be posted on the website, with
solution files
>Decision Theory>In Lecture 3, we will do additional
problems in both Linear Programming and Decision Theory