5.2 Iteration - University of Melbourne

Download Report

Transcript 5.2 Iteration - University of Melbourne

5.2 Iteration
 We
are at an extreme point of the feasible
region
 We want to move to an adjacent extreme
point.
 We want to move to a better extreme point.
 Observation:
 A pair of basic feasible solutions which
differ only in that a basic and non-basic
variable are interchanged corresponds to
adjacent feasible extreme points.
Geometry
Two hyperplane
(constraints)
in common
(adjacent)
Only one hyperplane in common
(not adjacent)
Moving to an adjacent
extreme point
 Step
1:
– Select which nonbasic variable becomes basic
 Step 2:
– Determine which basic variable becomes
nonbasic
 Step 3:
– Reconstruct a new canonical form reflecting
this change
Simplex Tableau
 It
is convenient to describe how the Simplex
Method works using a table (=tableau).
 There are a number of different layouts for
these tables.
 All of us shall use the layout specified in
the lecture notes.
Observation
 It
is convenient to incorporate the objective
function into the formulation as a functional
constraint.
 We can do this by viewing z, the value of the
objective function, as a decision variable, and
introduce the additional constraint
 z = Sj=1,...,n cjxj
or equivalently
 z - c1x1 - c2x2 - ... - cnxn = 0
s.t. max Z  4 x  3 x
1
2
x2x1 + x2
x1 + x2
x1
(5.9)
+
=
=
=
=
x3
+
x4
+
x1 , x2 , x3 , x4 , x5  0
x5
0
40
30
15
max Z
s.t.
Z, x
Z -
(5.9)
4 x1 - 3x2
2 x1 + x2 +
x1 + x2
x1
x3
+
x4
x1, x2 , x3 , x4 , x5  0
+
x5
=
=
=
=
0
40
30
15
Tableau (5.10)
BV
x3
x4
x5
Z
Eq. #
1
2
3
Z
Z
0
0
0
1
x1
2
1
1
-4
x2
1
1
0
-3
x3
1
0
0
0
x4
0
1
0
0
x5
0
0
1
0
RHS
40
30
15
0
 Terminology:
We refer to the last row as the Z-row, and to the
coefficient of x their as reduced costs. For
example, the reduced cost of x1 is -4.
Step 1: Selecting
a new basic
variable
 Issue:
which one of the current non-basic variables
should add to the basis?
 Observation:
The Z-row tells us how the value of the
objective function (Z) changes as we change
the decision variables:
z - c1x1 - c2x2 - ... - cnxn = 0
–
Because all the nonbasic variables are equal
to zero, if we decide to add xj to the basis
we must have
z - cjxj = 0
namely
z = cjxj
 Since
we try to maximize the objective
function, it would be better to select a nonbasic variable with a large (positive) cost
coefficient (large cj).
 Thus, if we do the selection via the reduced
costs, we will prefer a variable with a
negative reduced cost.
Conclusion
 If
we maximize the objective function, to
improve (increase) the value of the
objective function we have to select a nonbasic variable whose reduced cost is
negative.
Greedy Rule
Select the non-basic variable
with the most negative
reduced cost
Example
(Continued)
BV
x3
x4
x5
Z
Eq. #
1
2
3
Z
Z
0
0
0
1
x1
2
1
1
-4
x2
1
1
0
-3
x3
1
0
0
0
x4
0
1
0
0
x5
0
0
1
0
RHS
40
30
15
0
The most negative reduced cost in the Z-row
is -4, corresponding to j=1. Thus, we select
x1 as the new basic variable.
Step 2:
Determining the new
nonbasic variable
 Suppose
we decided to select xj as a new
basic variable.
 Since the number of basic variables is
fixed (m), we have to take one variable out
of the basis.
 Which one?
Observation
 As
we increase xj from zero, sooner or later
one or more of the basic variables will
become negative.
 We can thus take the first such variable out
of the basis and set it to zero.
Example (continued)
s.t.
2x1
x1
x1
+
+
 Suppose
x2
x2
+
x3
+
x4
+
x5
=
=
=
=
we select x1 as the new basic
(5.9)
0
40
30
15
variable.
 Since x2 is a nonbasic variable, its value is
zero. Thus the above system can be
simplified!
 Each
equation involves only two variables:
– The new basic variable (x1)
– The old basic variable associated with
the respective constraint.
 We can thus express the old basic variables
in terms of the new one!
x3 = 40 - 2x1
x4 = 30 - x1
x5 = 15 - x1
 We
can now compute the critical values
of the new basic variable (x1), namely the
values for which the old basic variables
will reach zero:
 We had:
x3 = 40 - 2x1
x4 = 30 - x1
x5 = 15 - x1
We take x5 out of the basis.
thus the critical values are obtained from:
0 = 40 - 2x1 (x1*=20)
0 = 30 - x1 (x1*=30)
0 = 15 - x1 (x1*=15)
Conclusions:
The critical value of x1 is 15.
We take x5 out of the basis.
More generally ....
 If
we select xj as the new basic variable,
then for each of the functional constraints
we have

aijxj + xi = bi (i=1,2,...,m)
 where xi is the old basic variable
associated with constraint i.
Thus,
xi = bi - aijxj
so that the critical values of xj are
determined by setting the xi’s to zero:
0 = bi - aijxj (i=1,2,...,m)
Bottom Line
bi
xj 
aij
,
aij > 0
 Question:
 Why
aren’t we interested in rows for which
aij  0 ???
Ratio Test
Given the new basic variable xj, take out of the
basis the old basic variable corresponding to
row i where the following ratio attains its
smallest value:
bi
Ratioi :
aij
(
aij
> 0)
Example (Continued)
BV
x3
x4
x5
Z
Eq. #
1
2
3
Z
 Take x5
basis.
Z
0
0
0
1
x1
2
1
1
-4
out of the
x2
1
1
0
-3
x3
1
0
0
0
x4
0
1
0
0
40
Ratio1 
 20
2
30
Ratio2 
 30
1
15
Ratio3 
 15
1
x5
0
0
1
0
RHS
40
30
15
0
Step 3:
Restore The Canonical Form
 We
interchanged a basic variable with a
nonbasic variable
 We have a new basis
 We have to construct the simplex tableau
for the new set-up
 This is done by one pivot operation
Example (Continued)
Old
BV
x3
x4
x5
Z
Eq. #
1
2
3
Z
Z
0
0
0
1
x1
2
1
1
1
-4
x2
1
1
0
-3
x3
1
0
0
0
x4
0
1
0
0
x5
0
0
1
0
RHS
40
30
15
0
x3
x4
0
1
0
0
x5
RHS
10
15
15
60
New
BV
x3
x4
x1
Z
Eq. #
Z
1
2
3
Z
0
0
0
1
x1
0
0
1
0
x2
1
1
0
-3
1
0
0
0
-2
-1
1
4
How do we “read” a
Simplex Tableau ?
BV
x3
x4
x1
Z
Eq. #
Z
1
2
3
Z
0
0
0
1
 New
x1
0
0
1
0
x2
1
1
0
-3
x3
1
0
0
0
basis:
(x3,x4,x1)
 New basic feasible solution:
x = (15,0,10,15,0)
x4
0
1
0
0
x5
-2
-1
1
4
RHS
10
15
15
60
New
value of objective function:
z = 60