Академический Документы
Профессиональный Документы
Культура Документы
Find an initial
CPF solution
Yes Is Current
Stop CPF solution
optimal?
No
Perform an
iteration to find a
better CPF
9 Concept 3: Whenever possible, chooses the origin to be the initial CPF solution.
If a slack variable equals 0 in the current solution, then this solution lies on
the constraint boundary for the corresponding functional constraint.
A value greater than 0 means that the solution lies on the feasible side of this
constraint boundary.
9 More terminologies
An augmented solution is a solution for the original variables and the slack
variables (feasible or infeasible).
9 Two BF solutions are adjacent if all but one of their basic (nonbasic) variables
are the same. (Note: not the values.)
That is, moving from the current BF solution to an adjacent one involves
switching one variable from nonbasic to basic and vice versa.
(0, 6, 4, 0, 6) (2, 6, 2, 0, 0)
(4, 3, 0, 6, 0)
(4, 0, 0, 12, 6)
(0, 0, 4, 12, 18)
9 We could deal with the objective function equation at the same time as the new
constraint equation. Note that Z is not really a decision variable.
Max Z
S.T. Z - 3x1 - 5x2 = 0
x1 =4
2x2 = 12
3x1 + 2x2 = 18
x1, x2 0
The Algebra of the Simplex Method
9 Recall the Wyndor Problem again.
9 Initialization
Add the slack variables
Max Z
S.T. Z - 3x1 - 5x2 =0 (0)
x1 + x3 =4 (1)
2x2 + x4 = 12 (2)
3x1 + 2x2 + x5 = 18 (3)
x1, x2, x3, x4, x5 0
Pick x1 and x2 be the nonbasic variables (starting from the origin). x1 = x2 = 0.
Easily obtain x3 = 4, x4 = 12, and x5 = 18 (x3, x4, and x5 are basic variables).
Why it is easy?
z Each equation has just one basic variable, which has a coefficient 1,
and this basic variable does not appear in any other equation (and the
objective function).
9 Optimality test
Z - 3x1 - 5x2 = 0 Z (to be maximized) = 3x1 + 5x2
Can we improve the objective value any more (Z = 0 currently)?
9 Determining the direction of movement
If we change the value of x1, or x2, can we increase the value of objective
function? Which one looks more promising?
9 Optimality Test
Do we need to continue?
9 Optimal solution is
9 Iteration
Determining the entering basic variable by selecting the variable with the
negative coefficient having the largest absolute value in row 0. Put a box
around the column below this coefficient, and call this the pivot column.
Basic Coefficient of: Right Side
Variable Z x1 x2 x3 x4 x5
Z 1 -3 -5 0 0 0 0
x3 0 1 0 1 0 0 4
x4 0 0 2 0 1 0 12
x5 0 3 2 0 0 1 18
Determining the leaving basic variable by applying the minimum ratio test.
z Pick out each coefficient in the pivot column that is strictly positive
(>0).
z Divide each of these coefficients into the right side entry for the same
row.
z Identify the row that has the smallest of these ratios.
z Put a box around this row and call it the pivot row. Also, call the
number that is in both boxes the pivot number.
Basic Coefficient of: Right Ratio
Variable Z x1 x2 x3 x4 x5 Side
Z 1 -3 -5 0 0 0 0 0
x3 0 1 0 1 0 0 4 4
x4 0 0 2 0 1 0 12 12/2=6 min
x5 0 3 2 0 0 1 18 18/2=9
The basic variable for the pivot row is the leaving basic variable, so replace
that variable by the entering basic variable in the basic variable column of
the next simplex tableau.
9 Use elementary row operations to construct a new simplex tableau in proper
form by using Gaussian elimination.
Divide the pivot row by the pivot number.
Z 3x1 + 5/2x4 = 30
x1 + x3 =4
x2 + 1/2x4 =6
3x1 x4 + x5 = 0
So, the value of basic variable x5 is zero (called a degenerate basic variable).
9 If the degenerate basic variable retains its value of zero until it is chosen to be a
leaving basic variable, the corresponding entering basic variable also must
remain zero, so the value of Z must remain unchanged.
9 If x1 is the entering basic variable and x5 is the leaving basic variable, x1 will
remain zero because any increment of x1 will result in a negative value of x5.
9 If Z may remain the same rather than increase at each iteration, the simplex
method may then go around a loop.
Rarely happen and ease to avoid.
9 All optimal solution can be written as linear combination of these two CPF.
(x1, x2, x3, x4, x5 ) = w1(2, 6, 2, 0, 0) + w2(4, 3, 0, 6, 0) or
(x1, x2) = w1(2, 6) + w2(4, 3)
w1 + w2 = 1, w1, w2 0
x5 needs to be zero to assure the feasibility. So, impose a huge penalty when
it becomes non-zero.
Max Z = 3x1 + 5x2 Mx5
S.T. x1 + x3 =4
2x2 + x4 = 12
3x1 + 2x2 + x5 = 18
x1, x2, x3, x4, x5 0
9 Simplex method will try very hard not to have x5 > 0 in the optimal solution.
9 The initial basic variables are x3, x4, and x5. So, we have to rewrite the objective
function in term of nonbasic variables.
9 xj U
Let xj = U xj so xj 0 and can be treated as usual
9 As for ci:
9 As for aij: