Download presentation
Presentation is loading. Please wait.
Published byLogan Rodgers Modified over 6 years ago
1
Introduction to linear programming (LP): Minimization
BSAD 30 Dave Novak Fall 2018 Source: Anderson et al., 2015 Quantitative Methods for Business 13th edition – some slides are directly from J. Loucks © 2013 Cengage Learning
2
Overview Focus on section 7.5 Graphing a minimization problem
The process is IDENTICAL to the maximization problem, so this material provides a review of Lecture #7 New material related to slack and surplus variables
3
Review: The LP Model 1) Decision variables (x1, x2,… xn)
Typically represent quantities of something We are trying to mathematically determine the “optimal” quantities of x1, x2,… xn 2) Objective Function (OF): the linear equation describing the mathematical relationship between the decision variables There is ONLY ONE OF! The expression we are maximizing or minimizing
4
The LP Model 3) Constraints: linear equations expressing values the decision variables (x1, x2) can or cannot take on Restrictions or conditions that apply For example, resource limitations like labor, materials, production capacity, etc. Nonnegativity constraints
5
Discussion Consider the question of how many pickup trucks should be made by Ford to maximize quarterly profits What are possible decision variables? What is a problem definition or objective? What are some constraints? If profit increases based on the number of trucks sold, Ford would want to make an unlimited number of trucks… We have to impose realistic constraints based on actual limitations
6
When to use LP The decision involves minimizing or maximizing something The decision involves questions about how much? or how many? You have constraints on the decision variables Labor Input materials Production limitations
7
Example 2: minimization
LP formulation Objective Function Min x1 + 2x2 s.t. #1) 2x1 + 5x2 > 10 #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 x1, x2 > 0 “Regular” Constraints Non-negativity Constraints
8
Graph the 3 constraints Constraint 1: Figure out the end points of the equation 2x1 + 5x2 = 10 using x (x1) and y (x2) coordinates If we set x1 = 0, and solve for x2 , then x2 = 2 the point (0, 2) If we set x2 = 0, and solve for x1 , then x1 = 5 the point (5, 0) Connect (5,0) and (0,2) The ">" side is above this line
9
Graph the 3 constraints Constraint 1:
10
Graph constraint #1 x2 x1 6 5 4 3 2 1 #1) 2x1 + 5x2 > 10
11
Graph the 3 constraints Constraint 2: If we set x2 = 0, then x1 = 3; but setting x1 = 0 will yield x2 = -12, which is not on the graph Thus, to get a second point on this line with a positive value, set x1 to any number larger than 3 and solve for x2 If we set x1 = 4, then x2 = 4 Connect (3,0) and (4,4) The ">“ side is to the right, away from the origin
12
Graph the 3 constraints Constraint 2:
13
Graph the 3 constraints Constraint 2:
14
Graph constraint #2 x2 6 5 4 3 2 1 #2) 4x1 - x2 > 12 x1
15
Graph the 3 constraints Constraint 3: If we set x1 = 0, then x2 = 4;
Connect (4,0) and (0,4) The ">" side is above this line
16
Graph the 3 constraints Constraint 3:
17
Graph constraint #3 x2 6 5 4 3 2 1 #3) x1 + x2 > 4 x1
18
Combine 3 constraints on the graph
x2 6 5 4 3 2 1 Feasible Region extends infinitely outward #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1
19
Graph the OF The OF is NOT a constraint on the problem
It is a mathematical representation of the profit or cost function We are solving the problem with respect to minimizing the value of the OF All feasible combinations of decision variables (x1 and x2) will yield a profit or a cost that falls on the OF line Our optimal solution is determined based on the specific OF
20
Graph the OF Set the RHS of the objective function equation equal to an arbitrary constant OF is Min: 5x1 + 2x2 = RHS Set RHS = 20 (for example) Calculate endpoints of the line 5x1 + 2x2 = 20 If we set x1 = 0, then x2 = 10 If we set x2= 0, then x1 = 4 Connect (4,0) and (0,10)
21
Graph the OF
22
Graph the OF x2 x1 6 5 4 3 2 1 Objective Function: 5x1 + 2x2 = 20
23
Graph the OF We want to “move” the OF line in towards the origin (bc minimization problem) If you change the RHS value from 20 to something smaller, we can shift the OF line toward the origin The SLOPE does NOT change Move the OF in the direction which lowers its value (down), since we are minimizing, until it touches the last point of the feasible region, determined by the last two constraints
24
Graph the OF x2 x1 Objective function 6 5 4 3 2 1 #2) 4x1 - x2 > 12
Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1
25
Graph the OF x2 x1 Objective function 6 5 4 3 2 1 #2) 4x1 - x2 > 12
Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1
26
Magnified view of extreme points
#3) x1 + x2 > 4 #2) 4x1 - x2 > 12 A (?, ?) #1) 2x1 + 5x2 > 10 B (?, ?) Objective Function (OF)
27
Identify and graph extreme points
Solve for the two extreme points at the intersection of constraints #2 and #3, and the intersection of constraints #1 and #3 Why these? By looking at the OF and understanding that this is a MINIMIZATION problem, we know that the cost minimizing solution involves “sliding” the OF towards the origin (0,0) We need to solve the coordinates or the (x1, x2) values for those points
28
Evaluate extreme point A
Intersection of constraints #2 and #3
29
Evaluate extreme point A
Intersection of constraints #2 and #3
30
Evaluate extreme point A
Intersection of constraints #2 and #3
31
Evaluate extreme point B
Intersection of constraints #1 and #3
32
Evaluate extreme point B
Intersection of constraints #1 and #3
33
Evaluate extreme point B
Intersection of constraints #1 and #3
34
Magnified view of extreme points
#3) x1 + x2 > 4 #2) 4x1 - x2 > 12 A (3.2, 0.8) #1) 2x1 + 5x2 > 10 B (3.33, 0.67)
35
Calculate optimal solution
Plug each set of extreme point values (x1, x2) into OF and select the SMALLEST
36
Optimal solution x2 x1 6 5 4 3 2 1 #2) 4x1 - x2 > 12
Objective Function: 5x1 + 2x2 x2 6 5 4 3 2 1 Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 Optimal Solution is Point A: x1 = 16/5, x2 = 4/5, 5x1 + 2x2 = 17.6 x1 #1) 2x1 + 5x2 > 10
37
Graphing procedure (Min)
Graph each of the constraints Determine the feasible region that satisfies all constraints simultaneously Draw an objective function line Move parallel OF lines toward smaller extreme point values without entirely leaving the feasible region The feasible solution on the objective function line with the smallest value is an optimal solution
38
Minimization example We just solved this graphically Min 5x1 + 2x2
Objective Function Min x1 + 2x2 s.t. #1) 2x1 + 5x2 > 10 #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 x1, x2 > 0 “Regular” Constraints Non-negativity Constraints
39
Minimization problem x2 x1 Objective function 6 5 4 3 2 1
Feasible Region #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 #1) 2x1 + 5x2 > 10 x1
40
Setting up the problem Download, save, and then open the Excel template file from the URL on the course schedule
41
Setting up the problem in Solver
Go to Excel choose the “Data” tab and then click on Solver The Solver Screen pops up and we will need to reference the cells for our problem: Set Objective refers to the OF in B4 Click the Min Radio button as this is a minimization problem
42
Setting up the problem By Changing Variable Cells refers to our two variables (cells B1 and B2) Subject to the Constraints: refers to our constraints for the problem. We will add each one separately. Select “Add” in the Add Constraint Menu choose cell B8 for the left-hand-side “Cell Reference” for constraint #1 and choose cell C8 for the right-hand-side “Cell Reference” for constraint #1
43
Setting up the problem Make sure the Make Unconstrained Variables non-negative check box is checked (this ensures that X1 and X2 are non-negative). We cannot produce a negative number of either decision variable And using the Pull-down menu make sure that Select Solving Method is Simplex LP Select SOLVE
44
Setting up the problem The cells in your spreadsheet model should change and cell B1 should now = 3.2, cell B2 should now = 0.8, and cell B4 should = 17.6 Using the Solver Results Menu that pops up on your screen highlight both “Answer” and “Sensitivity” on the right-hand-side under Reports and click OK
45
Answer report (16/5) (4/5)
46
Answer Report Excel Solver uses the term “slack” when referring to any non-binding ≥ or ≤ constraints Non-binding constraints do not restrict the feasible region at the optimal solution point The optimal solution does not directly involve or lie on a non-binding constraint
47
Answer Report Binding constraints let us know that all the resources associated with those specific constraints are used (there is no excess and there is no shortage) The constraint “binds” the problem, and all resources are used – there is no slack or surplus
48
Answer Report Constraint #1 is a non-binding constraint and has “surplus” = 0.4 (although Excel uses the term slack for both ≥ and ≤) Constraint #1 does not directly affect the optimal solution – it is a non-binding constraint Because this is a minimization problem, and the constraints are ≥, this lets us know that at the optimal point (3.2, 0.8) we exceed the RHS of constraint #1 by 0.4 units
49
Magnified view of extreme points
#3) x1 + x2 > 4 #2) 4x1 - x2 > 12 Surplus in non-binding constraint #1 at optimal point Optimal A (3.2, 0.8) This point is bound by constraints #2 and #3, but NOT by constraint #1 #1) 2x1 + 5x2 > 10 B (3.33, 0.67)
50
Standard form of the LP Standard form of the LP involves adding slack or surplus variables to the mathematical model so the problem can be solved using strict equalities
51
Slack and surplus variables
Surplus variables describe EXCESS quantity or the amount over the RHS of the constraint that is being used (associated with ≥) It is feasible to use less Slack variables describe IDLE resources or the amount of the RHS of the constraint that is not being used (associated with ≤) It is feasible to use more
52
Slack and surplus variables
Slack and surplus variables become a variable in the standard form LP whenever there is an inequality constraint Less-than or equal to constraints ≤ require a SLACK variable that is added to the LHS of the constraint so that we can set the LHS = the RHS
53
Slack and surplus variables
Greater-than or equal to constraints ≥ require a SURPLUS variable that is subtracted from the LHS of the constraint so that we can set the LHS = the RHS Equality constraints do not require either a slack or surplus variable in standard form
54
Standard form of the LP Standard form of the LP involves changing mathematical model so the problem can be solved using strict equalities For each ≤ (less than or equal to) constraint, there should be a “slack” variable (denoted by Si) added to the LHS For each ≥ (greater than or equal to) constraint, there should be a “surplus” variable (denoted by Si) subtracted from the LHS
55
Standard form of the LP Standard form
Slack / Surplus variables have a coefficient of 0 in the OF Slack / Surplus variables have a coefficient of 1 in the constraints
56
Standard form of the LP Reformulate the minimization problem
Min x1 + 2x2 s.t. #1) 2x1 + 5x2 > 10 #2) 4x1 - x2 > 12 #3) x1 + x2 > 4 x1, x2 > 0
57
Standard form of the LP Reformulate the minimization problem
58
Standard form of the LP Solve for s1, s2, s3
59
Standard form of the LP Reformulate the maximization problem (Lecture #7) Max x1 + 7x2 s.t x < 6 2x1 + 3x2 < 19 x1 + x2 < 8 x1 > 0 and x2 > 0
60
Standard form of the LP Reformulate the maximization problem (Lecture #7)
61
Slack or surplus? (I just randomly created this to illustrate slack and surplus)
Objective Function Min x1 + 25x2 s.t. #1) 2x1 + 5x2 > 15 #2) 4x1 - x2 > 20 #3) x1 + x2 ≤ 7 #4) 2x1 = 15 x1, x2 > 0 “Regular” Constraints Non-negativity Constraints
62
Standard Form?
63
Standard form of the LP You could think of slack/surplus variables as “placeholder” variables that hold the numeric difference between the LHS and RHS of any inequality In an equality constraint, the RHS MUST EQUAL the LHS, so there are no slack/surplus variables
64
Summary Minimization problem
Graph constraints solving for end point coordinates Graph OF solving for end point coordinates Identify extreme points and solve for interior extreme points Evaluate potential optimal solution values by plugging extreme point values into OF and solving Solving the minimization LP using MS Solver
65
Summary Answer report summary Formulate Standard Form LP
Define surplus variable in context of any minimization problem Formulate Standard Form LP
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.