Document

advertisement
Chapter 4 Simplex Method







Section 4.1 Setting Up the Simplex Method
Section 4.2 The Simplex Method
Section 4.3 The Standard Minimum Problem
Section 4.4 Mixed Constraints
Section 4.5 Multiple Solutions, Unbounded
Solutions, and No Solutions
Section 4.6 What’s Happening in the Simplex
Method? (Optional)
Section 4.7 Sensitivity Analysis
4.1 Setting up the
Simplex Tableau
In chapter 4 we are going to study an _________
technique that applies to all linear programming
problems. The technique is called the _________
Method. Basically it involves _____________ the
constraints so we have a system of linear
____________ and then using augmented
matrices to find specific solutions to the system of
equations.
Standard Maximum Problem
1. The objection function is to be _______________.
2. Each constraint is written using the ___ inequality
(_____________ the nonnegative conditions).
3. The constants in the constraints to the right of < are
___________ negative.
4. The variables are restricted to _____________ values
(nonnegative conditions).
Example
Maximize the objection function z = 4x1 + 12x2
subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40
and the nonnegative conditions x1 > 0 and x2 > 0.
This problem has the properties of a standard maximum problem.
1. The objection function is to be maximized.
2. Each constraint is written using the < inequality (excluding the
nonnegative conditions).
3. The constants in the constraints to the right of < are never
negative (180, 100, and 40 in the example).
4. The variables are restricted to nonnegative values (nonnegative
conditions).
Geometric Form
A graph of the __________________ is useful in seeing the
steps of the simplex method.
In the geometric approach, we examine the ____________ of
the feasible region for _____________ values.
A corner point occurs at the ___________________ of a pair
of boundary lines.
Not all pairs of boundary lines intersect at a corner point. The
point must lie within the feasible region.
Example
Graph the feasible region for the following problem:
Maximize the objection function z = 4x1 + 12x2
subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40
and the nonnegative conditions x1 > 0 and x2 > 0.
80
The boundaries for the feasible
region are formed by the lines
3 x1  x2  180
x1  2 x2  100
2 x1  2 x2  40
x1  0
x2  0
2 x1  2 x2  40
60
3 x1  x2  180
40
20
x1  2 x2  100
0
20
40
60
80
100
120
Slack Variables
The equations for the boundary lines give only point on the
boundaries. In order to represent points in the interior of
the feasible region some new variables are introduced,
called slack variables. Slack variables allow us to view the
problem as a system of equations.
The first step in the simplex method converts the constraints
to a linear equation. This is accomplished by introducing
80
3 x  x  s  180
one slack variable for each
(40,60) s1 = 0, s2 = –6
constraint, usually denoted by si. 60
(10,45)
s1 = 105
40
Consider
s =0
1
3x1  x2  s1  180
x1  2 x2  s2  100
x1  0, x2  0
2
20
s1 = 130
s2 = 50
0
(10,20)
20
40
2
1
(52,24) s1 = 0, s2 = 0
x1  2 x2  s2  100
60
80
100
120
Example
Write a system of equations using slack variables which
includes the objection function z = 20x1 + 35x2 + 40x3
subject to the constraints 5 x1  3x2  17 x3  140
7 x1  2 x2  4 x3  256
3x1  9 x2  11x3  540
2 x1  16 x2  8 x3  99
SOLUTION
Since we want to find the value of z that comes from the solution
to the system we ____________ the objective function. Its form
needs to have all terms on the ____________________.
Simplex Tableau
The simplex method uses matrices and row operations on
matrices to determine an optimal solution. The matrix used
is called the simplex tableau. Setting up a simplex tableau
is illustrated using a previous example.
EXAMPLE
Maximize the objection function z = 4x1 + 12x2
subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40
x1  0, x2  0
First, write the problem as a system of equations using _________
__________ and then form the augmented matrix of the system.
Example continued
The system of equations is
The augmented matrix of this system is
x1
_
_

_

 _
x2
_
_
_
_
s1
_
_
_
_
s2
_
_
_
_
s3
_
_
_
_
z
_
_
_
_
_
_ 
_

_ 
This is the simplex tableau.
Simplex Tableau
Find the maximum value of the objective function
z = 10x + 15y
subject to the constraints x  4 y  360
2 x  y  300
x  0, y  0
This problem has the properties of a standard maximum problem.
1. The objection function is to be ________________.
2. Each constraint is written using the _____ inequality (excluding
the nonnegative conditions).
3. The constants in the constraints to the right of < are ________
negative (180, 100, and 40 in the example).
4. The variables are restricted to _______________ values
(nonnegative conditions).
Simplex Tableau
Find the maximum value of the objective function
z = 10x + 15y
subject to the constraints x  4 y  360
2 x  y  300
x  0, y  0
Your Turn
Set up the simplex tableau for the following standard maximum
problem
Operations that can be performed without
altering the solution set of a linear system
1. Interchange any two rows
2. Multiply every element in a row by a nonzero constant
3. Add elements of one row to corresponding
elements of another row
• Rowswap(Matrix, Row A, Row B)
• Switches Row A and Row B
• Row+(Matrix, Row A, Row B)
• Adds Row A to Row B and replaces Row B
• *Row(Value, Matrix, Row)
• Multiplies Row by value and replaces the row
• *Row+(Value, Matrix, Row A, Row B)
• Multiplies Row a by the value, adds the result
to Row B, and replaces Row B
HW 4.1
Pg 257-260 1-25
Section 4.2
Basic Method
If a linear programming problem has k x’s in the constraints,
then a basic solution is obtained by setting k variables
(except z) to zero and solving for the others.
Consider the simplex tableau
x1
x2 s1 s2 s3 z
1 1 0 0 0 180 
3
1

2
0
1
0
0
100


 2 2 0 0 1 0 40 



4

12
0
0
0
1
0


A basic solution can be found
by setting any two variables to
zero and solving for the
others.
Basic Feasible Solution
Call the number of x variables in a linear programming
problem k. A ______________ of the system of equations
is a solution with k variables (except z) set to zero and with
none of the slack variables or x’s negative.
The variables set to zero are called ___________
variables. The others are called __________ variables.
Correctly carried out, the simplex method finds only basic
____________ solutions that are corner points of the
feasible region.
Summary
Basic and Nonbasic Variables
A linear programming problem with n constraints using k variables
is converted into a system of equations by including a slack
variable for each constraint.
• A system of n constraints in k variables converts to a system of
n equations in _________ variables.
• The ____________ variables are classified as either basic or
nonbasic variables.
• There is a basic variable for each equation, __ basic variables.
The other __ variables are nonbasic.
• The value of the basic variables are found by setting all
nonbasic variables to ______ in each of the equations and then
solving for basic variables.
Example
Use the simplex method to maximize z = 2x1 + 3x2 + 2x3,
subject to 2 x1  x2  2 x3  13
x1  x2  3x3  8
x1  0, x2  0, x3  0
For reference:
Example continued
x1 x2 x3
 2
1 2

 1 1 3
 2 3 2

s1
1
0
0
s2
0
1
0
z
0 13

0
8
1 0 
Since there are three x’s, all basic solutions have three variables
set to zero. Using the initial tableau, the initial basic feasible
solution would be ______________________________________
However, since there are negative entries in the last row,
this solution is not optimal.
Now, find the pivot element
x1 x2 x3
 2
1 2

 1 1 3
 2 3 2

s1
1
0
0
s2
0
1
0
z
0 13

0
8
1 0 
For reference:
Example continued
x1 x2 x3
 2
1 2

 1 1 3
 2 3 2

Using the pivot element, perform the following row
operations to obtain the next tableau.
x1
_

_
_

x2
_
_
_
x3
_
_
_
s1 s2 z
_ _ _
_ _ _
_ _ _
_

_
_ 
s1
1
0
0
s2
0
1
0
z
0 13

0
8
1 0 
Example continued





x1
1
1
1
x2
x3
0
5
1 3
0 11
s1
1
0
0
s2
1
1
3
z
0
0
1
5

8
24 
Example continued
The new tableau is
x1
_

_
_

x2
_
_
_
x3 s1 s2 z
_ _ _ _
_ _ _ _
_ _ _ _
_

_
_ 
The basic feasible solution from the tableau is
x1  __, x2  __, x3  __, s1  __, s2  __, z  __
Since there are ______________ entries in the last
row, ___________ is a ____________.
Summary – Simplex Method
Standard Maximization Problem
1. Convert the problem to a system of equations:
a) Convert each inequality to an equation by adding a slack variable.
b) Write the objective function z = ax1 + bx2 + … + kxn as
–ax1 – bx2 – … – kxn + z = 0.
2. Form the initial simplex tableau from the equations.
3. Locate the pivot element of the tableau:
a) Locate the most negative entry in the bottom row. It is in the
pivot column. If there is a tie for most negative, choose either.
b) Divide each entry in the last column (above the line) by the
corresponding entry in the pivot column. Choose the smallest
positive ratio. It is in the pivot row. In case of a tie for pivot row,
choose either.
c) The element where the pivot column and pivot row intersect is the
pivot element.
Summary continued
4. Modify the simplex tableau by using row operations to obtain a new
basic feasible solution.
a) Divide each entry in the pivot row by the pivot element to
obtain a 1 in the pivot position.
b) Use the pivot row and row operations to obtain zeros in the
other entries of the pivot column.
5. Determine whether z has reached its maximum.
a) If there is a negative entry in the last row of the tableau, z is not
maximum. Repeat the process in steps 3 and 4.
b) If the bottom row contains no negative entries, z is maximum
and the solution is available from the final tableau.
Summary continued
6. Determine the solution from the final tableau.
a) Set k variables to zero, where k is the number of x’s used in
the constraints. These are the nonbasic variables. They
correspond to the columns that contain more than one
nonzero entry.
b) Determine the values of the basic variables. These basic
variables correspond to unit columns.
Example
Maximze z  2 x  y
Subject to
3 x  y  22
3 x  4 y  34
x  0, y  0
A large agricultural program has 250 acres and $8000
available for cultivation of three crops: barley, oats, and
wheat. Barley requires $10 per acre of cultivation and
oats requires $15 per acre of cultivation and wheat
requires $12 per acre of cultivation. Barley requires 7
hours of labor per acre, oats require 9 hours of labor per
acre, and wheat requires 8 hours of labor per acre. The
firm has 2100 hours of labor available. The profits per
acre of each crop are: barley $60, oats $75, wheat $70.
How many acres of each crop should be planted to
maximize profit?
A stereo store sells three brands of stereo systems,
brands A, B, and C. It can sell a total of 100 stereo
systems per month. Brands A, B, and C take up,
respectively, 5, 4, and 4 cubic feet of warehouse space,
and a maximum of 480 cubic feet of warehouse space is
available. Brands A, B and C generate sales commissions
of $40, $20, and $30, respectively, and $3200 is available
to pay sales commissions. The profit generated from the
sale of each brand is $70, $210, and $140, respectively.
How many of each brand of stereo system should be sold
to maximize the profit?
The XYZ Corporation plans to open three different types
of fast food restaurants. Type A restaurants require an
initial cash outlay of $600,000, need 15 employees, and
are expected to make an annual profit of $30,000. Type B
restaurants require an initial cash outlay of $400,000,
need 9 employees, and are expected to make an annual
profit of $30,000. Type C restaurants require an initial
cash outlay of $300,000, need 5 employees, and are
expected to make an annual profit of $25,000. The XYZ
Corporation has $48,000,000 available for initial outlays,
does not want to hire more than 1000 new employees,
and would like to open at most 70 restaurants. How
many restaurants of each type should be opened to
maximize the expected profit?
HW 4.2
Pg 275-278 1-20,
21-35 odd, 37,
43, 45
4.3 The Standard
Minimum
Duality
Dietary Requirements A certain diet requires at least
60 units of carbohydrates, 45 units of protein, and 30
units of fat each day. Each ounce of Supplement A
provides 5 units of carbohydrates, 3 units of protein, and
4 units of fat. Each ounce of Supplement B provides 2
units of carbohydrates, 2 units of protein, and 1 unit of
fat. If Supplement A costs $1.50 per ounce and
Supplement B costs $1.00 per ounce, how many ounces
of each supplement should be taken daily to minimize the
cost of the diet?
HW 4.3
Pg 289-291 13-23
4.4
Mixed Constraints
Standard Max?
Minimize
x
,subject
to
:
Minimize
x

5
x
,subject
to
:
Minimizezzz
15
215
xx1 1x1340
x20
,subject
to
:
2
2
3
2
5x1xx11
x2 2x210
210
72

94 x3  2360
23x48
250
522xxx111
2 x3  30
4xxx222 11
0,
xx211 x
1 
0,8xxx222
00x3  40
x1  0, x2  0, x3  0
Minimizing a Function
Minimize z  2 x1  3x2 ,subject to :
x1  2 x2  10
2 x1  x2  11
x1  0, x2  0
Minimizing a Function
Minimize z  15 x1  40 x2 ,subject to :
5 x1  3x2  210
2 x1  x2  250
x1  0, x2  0
Your Turn
Minimize z  15 x1  20 x2  5 x3 ,subject to :
72 x1  48 x2  94 x3  2360
5 x1  4 x2  2 x3  30
2 x1  8 x2  x3  40
x1  0, x2  0, x3  0
Standard Max?
Mixed Constraints
The simplex method assumes all constraints are of the form
a1x1 + a2x2 + … + anxn ______ b
Realistically this is _____________ true. The simplex method
can still be used if we modify these mixed constraints.
We modify a _____ constraint by multiplying through by –1,
which reverses the sign, giving a _______ constraint.
We modify an = constraint by replacing it with two constraints,
a _____ and a ______ constraint. This can be done because the
statement c = d is equivalent to c > d and c < d.
Guidelines
Modification of > and = Constraints
For the simplex method:
Replace
a1x1 + a2x2 + … + anxn > b
with
–a1x1 – a2x2 – … – anxn < –b
Replace
with
and
a1x1 + a2x2 + … + anxn = b
a1x1 + a2x2 + … + anxn < b
a1x1 + a2x2 + … + anxn > b
which in turn should be written
and
a1x1 + a2x2 + … + anxn < b
–a1x1 – a2x2 – … – anxn < –b
Example
Modify the following problem and set up the initial simplex
tableau. Maximize z = 8x1 + 2x2 + 6x3, subject to
6 x1  4 x2  5 x3  68
4 x1  3x2  x3  32
2 x1  4 x2  3x3  36
x1  0, x2  0, x3  0
Summary
Simplex Method for Problems with Mixed Constraints
1. For minimization problems, maximize w = –z.
2. (> constraint) For each constraint of the form
a1x1 + a2x2 + … + anxn > b
multiply the inequality by –1 to obtain
–a1x1 – a2x2 – … – anxn < –b
3. (= constraint) Replace each constraint of the form
a1x1 + a2x2 + … + anxn = b
with a1x1 + a2x2 + … + anxn < b
and
a1x1 + a2x2 + … + anxn > b
The latter is written –a1x1 – a2x2 – … – anxn < –b
4. Form the initial simplex tableau.
Summary continued
5. If no negative entry appears in the last column of the initial
tableau, proceed to Phase II, otherwise, proceed to Phase I.
6. (Phase I) If there is a negative entry in the last column,
change it to a positive entry by pivoting in the following
manner. (Ignore a negative entry in the objective function
[last row] for this step.)
a) The pivot row is the row containing the negative entry
in the last column.
b) Select a negative entry in the pivot row that is to the left
of the last column. The most negative entry is often a
good choice. This entry is the pivot element.
c) Reduce the pivot element to 1 and the other entries of
the pivot column to 0 using row operations.
Summary continued
7. Repeat the parts of step 6 as long as a negative entry
occurs in the last column. When no negative entries
remain in the last column (except possibly in the last
row), proceed to Phase II.
8. (Phase II) The basic solution to the tableau is now
feasible. Use the standard simplex procedure to obtain
the optimal solution.
Maximize z  5 x  10 y,subject to :
x  y  20
2 x  y  100
x  0, y  0
Minimize z  3 x  2 y,subject to :
x  y  10
x  y  15
x  0, y  0
Maximize z  40 x  30 y,subject to :
x y 5
2 x  3 y  12
x  0, y  0
Maximize z  3 x  y,subject to :
2 x  5 y  100
x  10, y  0
Minimize p  3 x  5 y  z,subject to :
x  y  z  20
y  2 z  10
x  0, y  0, z  0
Your Turn
Maximize : z  6 x  4 y
Subject to :
3 x  2 y  60
2 x  3 y  24
x  y  25
HW 4.4
Pg 305-308 1-49 odd
4.5
Multiple Solutions
No Solution
Your Turn
Maximize z = 18x + 24y, subject to 3 x  4 y  48
x  2 y  22
3 x  2 y  42
x  0, y  0
Section 4.5
Multiple Solutions
To determine whether a problem has more than one optimal
solution:
1. Find an optimal solution by the usual simplex method.
2. Look at zeros in the bottom row of the final tableau. If a zero
appears in the bottom row of a column for a nonbasic variable,
there might be other optimal solutions.
3. To find another optimal solution, if any, use the column of a
nonbasic variable with a zero at the bottom as the pivot column.
Find the pivot row in the usual manner, and then pivot on the
pivot element.
4. If this new tableau gives the same optimal value of z at another
point, then multiple solutions exist.
5. Given the two optimal solutions, all points on the line segment
joining them are also optimal solutions.
Your Turn
Maximize z = x1 + 4x2, subject to
Unbounded = No Max
x1  x2  3
4 x1  x2  4
x1  0, x2  0
Unbounded Solutions
When you arrive at a simplex tableau that has no positive
entries in the pivot column, the feasible region is unbounded
and the objective function is unbounded. There is no
maximum value and thus no solution.
Example continued
Checking the pivot row we find that all ratios are ___________.
When this occurs, there is no _________. Since the feasible
region is unbounded, a maximum value does not exist.
Your Turn
Maximize z = 8x1 + 24x2, subject to
x1  x2  10
2 x1  3x2  60
x1  0, x2  0
No Feasible Solution
When a simplex tableau has a negative entry in the last
column and no other entries in that row are negative, then
there is no feasible solution to the problem.
Example continued
Since x1, s1, and s2 cannot be negative, there are no values that
can be used on the left-hand side that will give a negative
number. Therefore, __________________________________.
Summary 3 New Situations
Multiple Solutions
 No Solution – Unbounded
 No Solution – No feasible region

Summary

Multiple Solutions








x
1
y
0
s1
1
s2
2
s3
0
0
1

1
2
3
2
0
0
0
0
0
2
6
3
0
1
0
z
0
4

0
9

0 12 
1 288
Summary

No Solution – Unbounded

 3

 4
 17

0
1
0
1
0
0
1
1
4
0
0
1
7

4
16 
Summary

No Solution – No feasible region







x1
x2
0
s1
1
2
3
1
0
8
0
0
1
3
s2
1
3
1

3
8
z
0 10 

0 20 
1 480 

HW 4.5
Pg 316-318 1-33
What’s happening
Maximize z  5 x  4 y, subject to :
2 x  4 y  80
2 x  3 y  120
4 x  y  160
x  0, y  0
Convert to Equations
2x
2x
4x
5 x
 4 y  s1
 3y
 y
 4y
 s2
 s3

 80
 120
 160
z  0
Setting slack variables to 0 gives the boundary lines of the feasible
region
2x  4 y  0
 80
2x  3y
4x  y
 0
 0
 120
 160
Initial Tableau
x
y s1
2 1
2 3

4 1

 5 4
1
0
0
0
s2
s3
z C
0
1
0
0
0
0
1
0
0 80 
0 120 

0 160 

1 0 
Basic Solution
Need to pick pivot
x
y s1
2 1
2 3

4 1

 5 4
1
0
0
0
s2
s3
z C
0
1
0
0
0
0
1
0
0 80 
0 120 

0 160 

1 0 
Need to pick pivot
x
y s2
2 1
2 3

4 1

 5 4
1
0
0
0
s2
s3
z C
0
1
0
0
0
0
1
0
0 80 
0 120 

0 160 

1 0 
2 x  0  s1
2 x  0  s2
 80
 120
4x  0 
 160
s3
x
y s2
s2
1 1/ 2 1/ 2
0 2
1

0 1
2

0 3 5 / 2
s3
0
1
0
0
z C
0
0
1
0
0 40 
0 40 

0 0 

1 200 
x
1
0

0

0
y s2
s2
s3
0 3/ 4 1/ 4
1 1/ 2 1/ 2
0 5/ 2 1/ 2
0 7 / 4 3/ 4
z C
0
0
1
0
0 30 
0 20 

0 20 

1 230 
HW 4.6
Pg 324-325 1-10
Sensitivity Analysis
Changes in the Objective Function
How does a change in the data affect the optimal solution?
EXAMPLE
The problem to maximize z = 16x + 24y, subject to 5 x  4 y  88
x  2 y  32
has the solution
x  0, y  0
Maximum is z = 416 at (8,12)
How much change can occur in a device profit, and the point
(8,12) still yields the maximum profit?
Example continued
SOLUTION
Use the slopes of the boundary lines 5x + 4y = 88 and x + 2y = 32
and the slope of an arbitrary objective function, z = Ax + By, to
find the answer.
The objective function with slope –A/B through (8,12) must lie
between the lines 5x + 4y = 88 (slope = –5/4) and x + 2y = 32
(slope = –1/2). Thus, the slope of the objective function must lie
between the slopes of the boundary lines,
5
A
1
1 A 5
     which can be written as  
4
B
2
2 B 4
Thus, device profits with a ratio between 0.5 and 1.25 will
yield a maximum total profit at (8,12).
Ex. Device profits of A = 18 and B = 24 gives A/B = 18/24 = 0.75 which
has a total maximum profit at (8,12).
A feasible region is defined by
3x + 4y ≤ 39
7x + 2y ≤ 47
x≥0, y≥0
Determine which of the following objective functions have
their maximum value at the intersection of
3x + 4y = 39 and 7x + 2y = 47
A) z = 9x + 3y
B) z = 2x + 8y
C) z = 10x + 9y
The figure shows the feasible region determined by
4x + 5y ≤ 182
7x + 2y ≤ 170
x≥0, y≥0
Find the value of A and B so that the objective function
z = Ax + BY has it maximum at (18, 22)
A linear programming problem seeks to maximize
z = Ax + By, subject to
9x + 5y ≤ 85
25x + 6y ≤ 150
x≥0, y≥0
Find the range of slopes of the objective function so that
the maximum z occurs at (0, 17)
A linear programming problem seeks to maximize
z = Ax + By, subject to
5x + 2y ≤ 240
2x + 3y ≤ 140
x≥0, y≥0
Find the range of slopes of the objective function so that
the maximum z occurs at (48, 0)
HW 4.7
Pg 334-335 1-13
Download