BU275 W23 - Lecture 15 - Intro To LP
BU275 W23 - Lecture 15 - Intro To LP
Presented by
First Name Last Name Models
Instructor – Dr Jason Hurley
WINTER 2023
Introduction to Linear Programming
D AT E | M O N T H | Y E A R
Presented by
First Name Last Name
Deterministic Models and Algorithms
• The course this far: probabilities played a big role in our model building
• With the computational power now available in the modern world, there are
D AT E | M O N T H | Y E A R
Mathematical Modeling
Solution Algorithm
Presented by
First Name Last Name
Linear Programming
Presented by
• Categories of LP
First Name Last problems
Name include:
• Resource-allocation
• Cost-benefit tradeoff
• Product mixing
• Transportation
• Assignment
Linear Programming Formulation
Presented by
Step 2: Determine Objective Function
First Name Last Name
Lego Company
• Build and sell Chairs (Profit: $7) and Tables (Profit $8)
• Chair: requires 3 large blocks, 2 medium blocks, 2 small blocks
• Table:
D AT Erequires
| M O N T H | Y2
E Alarge
R blocks, 2 medium blocks, 4 small blocks
Presented by
First Name Last Name
Determine the product mix (i.e., how many chairs and tables) to
maximize profit if there are only 12 large blocks, 8 medium blocks, and
10 small blocks available.
Step 1: Decision Variables
Presented by
• Define Decision
First Name Last Name Variables:
Let C = # of chairs
T = # of tables
Step 2: Objective Function
• Define
Presented by
First NameObjective
Last Name Function:
Presented
• There areby
only 8 medium blocks
First Name Last Name
2C + 2T ≤ 8
• There are only 10 small blocks
2C + 4T ≤ 10
• Implicit Constraints (e.g., nonnegativity – cannot produce negative chairs, tables)
C, T ≥ 0
LP Formulation
• Maximize
Presented by
or Minimize a single objective
First Name Last Name
• Decision Variables:
• Make sure you have specified units of the decision variables
• Objective Function:
• Make sure that the only variables in the objective function are the decision variables
• If you have variables in the objective that are not defined as decision variables, they should be defined
D AT E | M O N T H | Y E A R
as decision variables
• MakePresented
sure youby have stated whether it is a maximization or minimization problem
First Name Last Name
• Constraints:
• Make sure that the only variables in the constraints are the decision variables
• If you have variables in the constraints that are not defined as decision variables, they should be
defined as decision variables
• Make sure that the units on the LHS and RHS of constraints match
• Make sure that both explicit and implicit constraints are written
Solution Methods
Presented by
First Name Last Name
We will use Excel Solver (add-in) to solve problems that have
more than two decision variables
Step 2:
• Determine
D AT E | the
M O Ncorner
T H | Y Epoints
AR of the feasible region
• Evaluate the objective function at each corner point and choose the corner point that maximizes
Presented by
(minimizes)
First Name theLast
objective
Name function
T
D AT E | M O N T H | Y E A R
3C + 2T < 12
Presented by
First Name Last Name
C
Graphical Method - Step 1: Plot Constraint 2
T 3C + 2T < 12
2C + 2T < 8
3C + 2T = 12
D AT E | M O N T H | Y E A R
Presented by
First Name Last Name
2C + 2T =8
C
Graphical Method - Step 1: Plot Constraint 3
T 3C + 2T < 12
2C + 2T < 8
3C + 2T = 12 2C + 4T < 10
D AT E | M O N T H | Y E A R
2C + 2T = 8
Presented by
First Name Last Name
2C + 4T = 10
C
Graphical Method - Step 1: Determine Feasible
Region
Feasible (shaded) region satisfies all the constraints
T simultaneously (i.e., collection of all feasible solutions)
Constraints
D AT E | M O N T H | Y E A R 3C + 2T < 12
2C + 2T < 8
Presented by 2C + 4T < 10
First Name Last Name
C
Graphical Method - Step 2: Corner Points
Presented by
corner point
First Name Lastof the feasible region
Name
The optimal solution(s) is the corner point(s) with the best value of objective
function
Graphical Method - Step 2: Corner Points
T Max Z = 7C + 8T
Subject to:
3C + 2T < 12
2C + 2T < 8
OFV at (0,2.5) = 7(0) + 8(2.5) = 20 2C + 4T < 10
.
D AT E | M O N T H | Y E A R
C, T > 0
Presented by
..
First Name Last Name OFV at (3,1)= 7(3) + 8(1) = 29
.
(3,1) Optimal solution
C
(0,0) (4,0)
OFV at (0,0) = 7(0) + 8(0) = 0 OFV at (4,0) = 7(4) + 8(0) = 28
Graphical Method - Step 2: Arbitrary Objective
Function
T Max Z = 7C + 8T
Subject to:
3C + 2T < 12
7C + 8T = ? (an arbitrary value) 2C + 2T < 8
D AT E | M O N T H | Y E A R 2C + 4T < 10
Presented by C, T > 0
First Name Last Name
C
Graphical Method - Step 2: Arbitrary Objective
Function
Optimal solution is at (3,1)
Max Z = 7C + 8T
Hence make 3 chairs and 1 table
Subject to:
3C + 2T < 12
2C + 2T < 8
D AT E | M O N T H | Y E A R Objective function value =
2C + 4T < 10
Presented by 7(3) + 8(1) = 29 C, T > 0
First Name Last Name
.
(3,1)
Profit & Gambit Co. Example: Minimization
Problem
Management at The Profit & Gambit Co. has decided to
undertake a major advertising campaign that will focus on the
following three key products:
• A spray prewash stain remover
• A liquid laundry detergent
D AT E | M O N T H | Y E A R
Presented by
• A powder
First Name Last laundry
Name detergent
How much should they advertise in each medium to meet the sales goals at a
minimum total cost?
Profit & Gambit Co. Example: Minimization
Problem
Decision Variables:
Let TV = the number of units of advertising on Television
PM = the number of units of advertising in Print Media
Presented by
First Name Last Name
Subject to:
Stain remover increased sales: PM ≥ 3
Liquid detergent increased sales: 3TV + 2PM ≥ 18
Powder detergent increased sales: –TV + 4PM ≥ 4
Non-negativity constraints: TV ≥ 0, PM ≥ 0
Profit & Gambit Co. Example: Minimization
Problem
Amount of print media advertising
PM
Feasible
10
region
8
D AT E | M O N T H | Y E A R
Presented by 6
First Name Last Name
PM = 3
2
-TV + 4 PM = 4
3 TV + 2 PM = 18
-4 -2 0 2 4 6 8 10 TV
Amount of TV advertising
Profit & Gambit Co. Example: Minimization
Problem
D AT E | M O N T H | Y E A R
Presented by
First Name Last Name
Thanks for your attention!
D AT E | M O N T H | Y E A R
Presented by
Next class:
First Name Last Name
• Linear Programming (part 2)