Anda di halaman 1dari 4

Phase I: Artificial variable method

Starting the Simplex method


1. Turn any constraints into constraints by multiplying both sides
by 1. Also multiply by 1 any equality constraints where the right
side is negative.
2. Subtract the artificial variable a0 from the left side of any constraint
where the right side is negative.
3. a0 and the slack variables for equality constraints are artificial variables.
To remind us that its artificial, Ill write the slack variable for an
equality constraint as ai instead of si . An artificial variable is one that
is required to be 0.
4. If the initial basic solution is not feasible, you need a Phase I. Otherwise
begin Phase II.
In Phase I, we deal with a relaxed problem where the artificial variables are allowed to be 0 instead of requiring them to be 0. We will find
it easy to get a feasible basic solution of the relaxed problem. But what we
want is to get a feasible basic solution of the original problem. Let w =
the sum of all the artificial variables. In any feasible solution of the relaxed
problem, w 0. If we can make w = 0, the artificial variables will be 0
and the solution will be feasible for the original problem. So in Phase I
we disregard z, and have our objective to maximize w. A row for original
objective z is also kept in the tableau, to be ready for when Phase II begins,
but is not used in pivot selection.
If there are artificial slack variables, their columns are not what basic
columns are supposed to look like because they have 1 in the w row. We
have to subtract the rows for those slack variables from the w row to rectify
this, thus expressing w in terms of the nonbasic variables.
If there is an a0 , there will be an initial pivot where a0 enters the
basis, and the variable with the most negative value leaves the basis. The
resulting tableau will be feasible for the relaxed problem. We then continue
as in Phase II, with one exception: Since we know artificial variables must
be 0 in the original problem, we wont let them enter the basis once they
leave. Phase I ends when we have an optimal solution to the relaxed problem
(since we know w 0, the relaxed problem cant be unbounded). Phase I
has two possible outcomes:

w < 0 in the optimal solution to the Phase I problem. Then we conclude


it is impossible to have w = 0, i.e. the original problem is infeasible.
w = 0 in the optimal solution to the Phase I problem. We thus have a
feasible basic solution to the original problem. We can then discard w and
proceed with Phase II using the original objective z.
Example:
maximize 5x1 x2 x3
subject to 3x1 x2 x3
x1 +2x2 x3
2x1 +x2
x1 +x2
x1 , x2 , x3 0

1
2
2
= 1

Introducing slack and artificial variables


w
1

z
0

x1
0

x2
0

x3
0

s1
0

s2
0

s3
0

a4
1

a0
1

rhs
0

0
0
0
0
0

1
0
0
0
0

5
3
1
2
1

1
1
2
1
1

1
1
1
0
0

0
1
0
0
0

0
0
1
0
0

0
0
0
1
0

0
0
0
0
1

0
1
1
0
0

0
1
2
2
1

=
=
=
=
=

z
s1
s2
s3
a4

Adjust the temporary objective row so a4 is basic


w
1

z
0

x1
1

x2
1

x3
0

s1
0

s2
0

s3
0

a4
0

a0
1

rhs
1

0
0
0
0
0

1
0
0
0
0

5
3
1
2
1

1
1
2
1
1

1
1
1
0
0

0
1
0
0
0

0
0
1
0
0

0
0
0
1
0

0
0
0
0
1

0
1
1
0
0

0
1
2
2
1

=
=
=
=
=

z
s1
s2
s3
a4

Initial pivot: a0 enters the basis and the most negative slack variable,
s2 , leaves: the result is a feasible basic solution for the relaxed problem.

w
1

z
0

x1
0

x2
1

x3
1

s1
0

s2
1

s3
0

a4
0

a0
0

rhs
3

0
0
0
0
0

1
0
0
0
0

5
2
1
2
1

1
3
2
1
1

1
0
1
0
0

0
1
0
0
0

0
1
1
0
0

0
0
0
1
0

0
0
0
0
1

0
0
1
0
0

0
1
2
2
1

=
=
=
=
=

z
s1
a0
s3
a4

x3 enters and a0 leaves the basis. Note that z doesnt participate in


pivot selection so we dont calculate a ratio for it (there is no requirement
that z 0).
w
1

z
0

x1
1

x2
1

x3
0

s1
0

s2
0

s3
0

a4
0

a0
1

rhs
1

0
0
0
0
0

1
0
0
0
0

4
2
1
2
1

3
3
2
1
1

0
0
1
0
0

0
1
0
0
0

1
1
1
0
0

0
0
0
1
0

0
0
0
0
1

1
0
1
0
0

2
1
2
2
1

=
=
=
=
=

z
s1
x3
s3
a4

x1 enters and s1 leaves the basis.


w
1

z
0

x1
0

x2
5/2

x3
0

s1
1/2

s2
1/2

s3
0

a4
0

a0
1

rhs
1/2

0
0
0
0
0

1
0
0
0
0

0
1
0
0
0

3
3/2
7/2
4
5/2

0
0
1
0
0

2
1/2
1/2
1
1/2

1
1/2
3/2
1
1/2

0
0
0
1
0

0
0
0
0
1

1
0
1
0
0

0
1/2
5/2
1
1/2

=
=
=
=
=

z
x1
x3
s3
a4

x2 enters and a4 leaves the basis.

w
1

z
0

x1
0

x2
0

x3
0

s1
0

s2
0

s3
0

a4
1

a0
1

0
0
0
0
0

1
0
0
0
0

0
1
0
0
0

0
0
0
0
1

0
0
1
0
0

7/5
1/5
1/5
1/5
1/5

2/5
1/5
4/5
1/5
1/5

0
0
0
1
0

6/5
3/5
7/5
8/5
2/5

1
0
1
0
0

rhs
0

3/5
4/5
16/5
1/5
1/5

=
=
=
=
=

z
x1
x3
s3
x2

We have now completed Phase I successfully: w = 0 and the basic


solution is feasible for the original problem. We can now throw away the w
row and column, and start Phase II, using the original objective z. We could
also throw away the columns for nonbasic artificial variables: in any case
they wont ever be allowed to enter the basis. Often we keep the artificial
slack variables around, because they will be useful in sensitivity analysis.
In our case, since a0 is an artificial variable, we dont let it enter the
basis even though it has a negative entry in the z row. s2 enters the basis
and s3 leaves.
z
1

x1
0

x2
0

x3
0

s1
1

s2
0

s3
2

a4
2

a0
1

0
0
0
0

1
0
0
0

0
0
0
1

0
1
0
0

0
1
1
0

0
0
1
0

1
4
5
1

1
5
8
2

0
1
0
0

rhs
1 =
1
4
1
0

=
=
=
=

z
x1
x3
s2
x2

This is optimal, because the only negative entries in the z row are for
the artificial variables (which dont count).
It occasionally happens that some artificial variable remains basic at
the end of Phase I (but with the value 0). In Phase II thats OK as long
as it doesnt ever become nonzero. So we have to take this into account:
when calculating ratios for selecting the leaving variable, we would include
the ratio (0) for any artificial variable whenever its entry in the entering
variables column is nonzero (either positive or negative).

Anda mungkin juga menyukai