You've reached the end of your free preview.
Want to read all 53 pages?
Unformatted text preview: Chapter 2
The Simplex Method
Also see Chapter 4 of the text book. 1 Also see Chapter 4 of the text book. 1 Basic Concept Terminology
1 1.1Basic
Concept
illustrate
basic
concept
considering
following
problem:
WeWe
illustrate
thethe
basic
concept
byby
considering
thethe
following
problem: Figure
2.1:1:Feasible
Figure
Feasibleset
setofofananLP
LPproblem.
problem.
Let n be the number of decision variables; in this case, n = 2. To start, we introduce
Let n be the number of decision variables; in this case, n = 2. To start, we introduce
terminology that we shall use often:
terminology that we shall use often:
• Each line in the above figure is a constraint boundary. For examples, 3x1 + 2x2 = 18,
= 4, line
and in
x1the
= 0above
are constraint
•x1 Each
figure is a boundaries.
constraint boundary. For examples, 3x1 +2x2 = 18,
x1 intersection
= 4, and x1 point
= 0 are
boundaries.
• The
of constraint
n constraint
boundaries is a corner-point solution or CP
solution. 1
• If a corner-point solution is feasible, it is called a corner-point feasible (CPF) solution. Otherwise, it is a corner-point infeasible solution.
• Two CPF solutions are adjacent to each other if they share n 1 common constraint
boundaries. In this example with n = 2, each CPF solution shares one constraint
boundary with its adjacent CPF.
• The line joining two CPF solutions is an edge of the feasible region.
• Consider any linear programming problem that possesses at least one optimal solution.
If a CPF solution has no adjacent CPF solutions that are better, then it must be an
optimal solution. We call this an optimality test.
2 2 The Key Solution Concepts
• The simplex method focuses solely on CPF solutions. For any problem with at least
one optimal solution, finding one requires only finding a best CPF solution. The only
restriction is that the problem must possess CPF solution. This is ensured if the
feasible region is bounded. Since the number of feasible solutions generally is infinite,
reducing the number of solutions that need to be examined to a small finite number is
a tremendous simplification.
• The simplex method is an iterative algorithm.
• Whenever possible, the initialization of the simplex method chooses the origin (all
decision variables equal to zero) to be the initial CPF solution. When there are too
many decision variables to find an initial CPF solution graphically, this choice eliminates
the need to use algebraic procedures to find and solve for an initial CPF solution.
• Given a CPF solution, it is much quicker computationally to gather information about
its adjacent CPF solutions than about other CPF solutions. Therefore, each time the
simplex method performs an iteration to move from the current CPF solution to a better
one., it always chooses a CPF solution that is adjacent to the current one. No other
CPF solutions are considered. Consequently, the entire path followed to eventually
reach an optimal solution is along the edges of the feasible region.
• After the current CPF solution is identified, the simplex method examines each of
the edges of the feasible region that emanate from this CPF solution. Each of these
edges leads to an adjacent CPF solution at the other end, but the simplex method
does not even take the time to solve for the adjacent CPF solution. Instead, it simply
identifies the rate of improvement in Z that would be obtained by moving along the
edge. Among the edges with a positive rate of improvement in Z, it then chooses
to move along the one with the largest rate of improvement in Z. The iteration is
completed by first solving for the adjacent CPF solution at the other end of this one
edge and then relabeling this adjacent CPF solution as the current CPF solution for
the optimality test and (if needed) the next iteration.
• Last step describes how the simplex method examines each of the edges of the feasible region that emanate from the current CPF solution. This examination of an edge
leads to quickly identifying the rate of improvement in Z that would be obtained by
moving along the edge toward the adjacent CPF solution at the other end. A positive rate of improvement in Z implies that the adjacent CPF solution is better than
the current CPF solution, whereas a negative rate of improvement in Z implies that
the adjacent CPF solution is worse. Therefore, the optimality test consists simply of
checking whether any of the edges give a positive rate of improvement in Z. If none
do, then the current CPF solution is optimal. 3 • Consider any linear programming problem that possesses at least one optimal solution.
If a CPF solution has no adjacent CPF solutions that are better, then it must be an
optimal solution. We call this an optimality test. 1.2
Illustrative Example
3 Illustrative
Example
We
1.1using
usingthe
thesimplex
simplex method.
method. We shall only
Wesolve
solvethe
theproblem
problemininSection
Fig. 2.1
only highlight
highlight some
some
key points
points here;
here; the
the details
details will
will be
be discussed
discussed later
later in
in this
this chapter.
chapter.
key Figure
Anillustration
illustrationofofthe
thesimplex
simplexmethod.
method.
Figure 2.2:
2: An
a. The procedure starts with the initial CFP (0, 0). For problems where (0, 0) is not
feasible, we need a special procedure to look for an initial CFP; this will be discussed
later in this
chapter.
We shall move to one of the adjacent CPF solutions
0),
Last updated:
October
7, 2014
Pageof2 (0,
of 18
namely, (0, 6) or (4, 0). We prefer (0, 6) since it has a better objective function value.
In fact, the objective function, 3x1 + 5x2 has a greater rate of improvement along x2
since x2 has a greater coefficient.
b. The point (0, 6) has two adjacent CFPs, namely, (0, 0) and (2, 6). We have considered
(0, 0) already in Step 0 and it has a worse objective function value than (0, 6). Hence,
we move to (2, 6).
c. Since (2, 6) has no better adjacent CPF solutions, we know that it is the optimal
solution, according to the optimality test described previously. 4 Example 3.1 (Class work). Solve the problem using the technique introduced above:
max x1 ,x2 2R 3x1 + 2x2 s.t. x1 + 2x2 6
2x1 + x2 8
x1 + x2 1
x2 2
x1 , x2 , · · · , xn 0. As an exercise, you should sketch the constraints, feasible set, and all CFP solutions by
yourself before you proceed.
0. We start with the CPF solution (0, 0). The adjacent CPF solutions are (0, 1) and (4, 0).
Since the objective function has a greater rate of increase for x1 , we increase x1 to 4,
i.e., moving to (4, 0).
1. The point (4, 0) is not optimal since it has a better adjacent CPF solution (10/3, 4/3).
Therefore, we move to that point.
2. The point (10/3, 4/3) has no better CPF solution and therefore it is the optimal solution
for this problem. 5 04_089-160.qxd 4 Setting up the Simplex Method The simplex method normally is run on a computer, which can follow only algebraic instructions. Therefore, it is necessary to translate the conceptually geometric procedure just
described into a usable algebraic procedure. In this section, we introduce the algebraic language of the simplex method and relate it to the concepts of the preceding sections. The
algebraic procedure is based on solving systems of equations. Therefore, the first step in setting up the simplex method is to convert the functional inequality constraints to equivalent
equality constraints. (The nonnegativity constraints are left as inequalities because they are
treated separately.) This conversion is accomplished by introducing the slack variables.
For example, given the inequality constraint
11/19/08 08:28 AM Page 95 x1 4, (1) we introduce the slack variable x3 and convert (1) into the following constraints:
x1 + x3 = 4, x3 0. 4.2 SETTING UP THE SIMPLEX METHOD 95 Equation (1) is equivalent to the above two constraints.
the introduction
of slack
variables
otherfunctional
functional constraints,
the the original
Upon the Upon
introduction
of slack
variables
for for
thethe
other
constraints,
original
linear
programming
model
for
the
example
(shown
below
on
the
left)
can
now
linear programming model for the example (shown below on the left) can now be replaced by
be replaced
by (called
the equivalent
model (calledform
the augmented
form ofshown
the model)
shown
the equivalent
model
the augmented
of the model)
below
on the right:
below on the right: Augmented Form of the Model4 Original Form of the Model
Maximize Z ! 3x1 # 5x2, subject to Maximize Z ! 3x1 # 5x2, subject to x1 # 2x2 $ 4 (1) 3x1 # 2x2 $ 12 (2) 2x2 3x1 # 2x2 $ 18 (3) 3x1 # 2x2 and x1 # x3 !
# x4 4 ! 12
# x5 ! 18 and
x1 % 0, x2 % 0. xj % 0, for j ! 1, 2, 3, 4, 5. Although
formsofofthe
the model
model represent
exactly
the same
the new form
Although
bothboth
forms
represent
exactly
theproblem,
same problem,
theis new form is
much more convenient for algebraic manipulation and for identification of CPF solutions.
much more
convenient for algebraic manipulation and for identification of CPF solutions. We
We call this the augmented form of the problem because the original form has been augcall this the
augmented
form of the
problem
because
form has been augmented
mented
by some supplementary
variables
needed
to applythe
the original
simplex method.
by some supplementary
variables
to apply
thethen
simplex
method
If a slack variable
equals 0needed
in the current
solution,
this solution
lies on the constraint
boundary
for
the
corresponding
functional
constraint.
A
value
greater
If a slack variable equals 0 in the current solution, then this solutionthan
lies0 means
on the constraint
that
the
solution
lies
on
the
feasible
side
of
this
constraint
boundary,
whereas
a
value
boundary for the corresponding functional constraint. A value greater than
0 less
means that the
than 0 means that the solution lies on the infeasible side of this constraint boundary. A
solution lies
on the feasible side of this constraint boundary, or an (interior point), whereas
demonstration of these properties is provided by the demonstration example in your OR
a value less
0 Interpretation
means thatofthe
solution
lies on the infeasible side of this constraint
Tutorthan
entitled
the Slack
Variables.
boundary. The terminology used in Section 4.1 (corner-point solutions, etc.) applies to the original form of the
problem.
We now(corner-point
introduce the corresponding
terminology
forto
thethe
aug-original form
The terminology
used
previously
solutions, etc.)
applies
mented
form.
of the problem. We now introduce the corresponding terminology for the augmented form.
An augmented solution is a solution for the original variables (the decision variables) that has been augmented by the corresponding
values of the slack variables.
6
For example, augmenting the solution (3, 2) in the example yields the augmented solution (3, 2, 1, 8, 5) because the corresponding values of the slack variables are x3 ! 1,
x4 ! 8, and x5 ! 5. • An augmented solution is a solution for the original variables (the decision variables) that has been augmented by the corresponding values of the slack variables. For
example, augmenting the solution (3, 2) in the example yields the augmented solution
(3, 2, 1, 8, 5) because the corresponding values of the slack variables are x3 = 1, x4 = 8
and x5 = 5.
• A basic solution is an augmented corner-point solution. To illustrate, consider the
corner-point infeasible solution (4, 6) in Fig. 2.1. Augmenting it with the resulting
values of the slack variables x3 = 0, x4 = 0 and x5 = 6 yields the corresponding basic
solution (4, 6, 0, 0, 6).
• The fact that corner-point solutions (and so basic solutions) can be either feasible
or infeasible implies the following definition: A basic feasible (BF) solution is an
augmented CPF solution. Thus, the CPF solution (0, 6) in the example is equivalent
to the BF solution (0, 6, 4, 0, 6) for the problem in augmented form.
Overall, the only di↵erence between basic solutions and corner-point solutions (or between
BF solutions and CPF solutions) is whether the values of the slack variables are included.
For any basic solution, the corresponding corner-point solution is obtained simply by deleting
the slack variables. Therefore, the geometric and algebraic relationships between these two
solutions are very close.
Because the terms basic solution and basic feasible solution are very important parts of the
standard vocabulary of linear programming, we now need to clarify their algebraic properties.
For the augmented form of the example, notice that the system of functional constraints has
5 variables and 3 equations, so we have that the number of variables - number of equations
= 5 - 3 = 2.
This fact gives us 2 degrees of freedom in solving the system, since any two variables
can be chosen to be set equal to any arbitrary value in order to solve the three equations
in terms of the remaining three variables. The simplex method uses zero for this arbitrary
value. Thus, two of the variables (called the nonbasic variables) are set equal to zero, and
then the simultaneous solution of the three equations for the other three variables (called the
basic variables) is a basic solution. These properties are described in the following general
definitions.
A basic solution has the following properties:
• Each variable is designated as either a nonbasic variable or a basic variable.
• The number of basic variables equals the number of functional constraints (now equations). Therefore, the number of nonbasic variables equals the total number of variables
minus the number of functional constraints.
• The nonbasic variables are set equal to zero.
• The values of the basic variables are obtained as the simultaneous solution of the system
of equations (functional constraints in augmented form). (The set of basic variables is
often referred to as the basis.)
7 • If the basic variables satisfy the nonnegativity constraints, the basic solution is a BF
solution.
hil76299_ch04_089-160.qxd 11/19/08 08:28 AM Page 97
Just as certain
pairs of CPF solutions are adjacent, the corresponding pairs of BF solutions
also are said to be adjacent. Here is an easy way to tell when two BF solutions are adjacent:
“Two BF solutions are adjacent if all but one of their nonbasic variables are the same.
This implies that all but one of their basic variables also are the same, although perhaps
with di↵erent numerical values”. Consequently, moving from the current BF solution to an
4.3 THE one
ALGEBRA
OF THE
SIMPLEX
METHOD
adjacent one involves switching
variable
from
nonbasic
to basic and vice versa for one 97
other variable (and then adjusting the values of the basic variables to continue satisfying the
Consequently, moving from the current BF solution to an adjacent one involves switchsystem of equations).
variable from
nonbasic
basicofand
vice versa
for one
other variable
To illustrate adjacenting
BFone
solutions,
consider
onetopair
adjacent
CPF
solutions
in Fig.(and
then adjusting the values of the basic variables to continue satisfying the system of
2.1: (0, 0) and (0, 6). Their augmented solutions, (0, 0, 4, 12, 18) and (0, 6, 4, 0, 6), automatiequations).
cally are adjacent BF solutions.
However,
youBFdosolutions,
not need
to look
2.1 toCPF
draw
this in
To illustrate
adjacent
consider
one at
pairFig.
of adjacent
solutions
conclusion. Another signpost
is(0,
that
their
nonbasic
variables,
(x1 , x(0,
(x18)
are6, the
Fig. 4.1:
0) and
(0, 6).
Their augmented
solutions,
4, 12,
4, 0, 6),
2 )0,and
1 , xand
4 ), (0,
automatically
are
adjacent
BF
solutions.
However,
you
do
not
need
to
look
at
Fig.
4.1 to
same with just the one exception — x2 has been replaced by x4 . Consequently, moving from
draw
this
conclusion.
Another
signpost
is
that
their
nonbasic
variables,
(x
,
x
1 for
2) and
(0, 0, 4, 12, 18) to (0, 6, 4, 0, 6) involves switching x2 from nonbasic to basic and vice versa
(x1, x4), are the same with just the one exception—x2 has been replaced by x4. Consex4 .
quently, moving from (0, 0, 4, 12, 18) to (0, 6, 4, 0, 6) involves switching x2 from nonWhen we deal with the
invice
augmented
basicproblem
to basic and
versa for x4.form, it is convenient to consider and
manipulate the objective function
equation
sameintime
as theform,
newitconstraint
When we
deal withatthethe
problem
augmented
is convenientequations.
to consider and
manipulate
the
objective
function
equation
at
the
same
time
as
the
new
constraint
Therefore, before we start the simplex method, the problem needs to be rewritten once againequations. Therefore, before we start the simplex method, the problem needs to be rewritten
in an equivalent way: once again in an equivalent way:
Maximize Z, subject to
(0)
(1)
(2)
(3) Z ! 3x1 ! 5x2
" 0
x1
# x3
" 4
2x2
# x4
" 12
3x1 # 2x2
# x5 " 18 and
xj $ 0, for j " 1, 2, . . . , 5. It is just as if Eq. (0) actually were one of the original constraints; but because it already
in equality
form,one
no slack
variable
is needed.
While adding
more equation,
we also
It is just as if Eq. (0) isactually
were
of the
original
constraints;
but one
because
it already
have
added
one
more
unknown
(Z
)
to
the
system
of
equations.
Therefore,
when
is in equality form, no slack variable is needed. While adding one more equation, we alsousing
Eqs. (1) to (3) to obtain a basic solution as described above, we use Eq. (0) to solve for
have added one more unknown
(Z) to the system of equations. Therefore, when using Eqs.
Z at the same time.
(1) to (3) to obtain a basic solution
describedtheabove,
wethe
useWyndor
Eq. (0)
to Co.
solve
for Zfits
atour
thestanSomewhatas
fortuitously,
model for
Glass
problem
same time.
dard form, and all its functional constraints have nonnegative right-hand sides bi. If this
had not been the case, then additional adjustments would have been needed at this point
before the simplex method was applied. These details are deferred to Sec. 4.6, and we
now focus on the simplex method itself. ■ 4.3 THE ALGEBRA OF THE SIMPLEX METHOD
8
We continue to use the prototype
example of Sec. 3.1, as rewritten at the end of Sec. 4.2,
for illustrative purposes. To start connecting the geometric and algebraic concepts of the
simplex method, we begin by outlining side by side in Table 4.2 how the simplex method
solves this example from both a geometric and an algebraic viewpoint. The geometric viewpoint (first presented in Sec. 4.1) is based on the original form of the model (no slack vari- 5 _ch04_089-160.qxd 8 The Algebra of the Simplex Method
11/19/08 08:28 AM Page 98 To start connecting the geometric and algebraic concepts of the simplex method, we begin
by outlining side by side in the following table how the simplex method solves this example
from both a geometric and an algebraic viewpoint. The geometric viewpoint is based on the
original form of the model (no slack variables), so again refer to Fig. 2.1 for a visualization
when you examine
the second column of the table. Refer to the augmented form of the model
CHAPTER 4 SOLVING LINEAR PROGRAMMING PROBLEMS: THE SIMPLEX METHOD
presented at the end of last section when you examine the third column of the table. We
now fill in ■
theTABLE
details
for each step of the third column of the following table.
4.2 Geometric and algebraic interpretations of how the simplex method
solves the Wyndor Glass Co. problem
Method
Sequence Geometric Interpretation Initialization Choose (0, 0) to be the initial CPF
solution.
Optimality
test
Iteration 1
Step 1 Step 2
Step 3 Optimality
test
Iteration 2
Step 1 Step 2
Step 3 Optimality
test Not optimal, because moving along
either edge from (0, 0) increases Z.
Move up the edge lying on the
x2 axis.
Stop when the first new constraint
boundary (2x2 ! 12) is reached.
Find the intersection of the new pair
of constraint boundaries: (0, 6) is the
new CPF solution.
Not optimal, because moving along the
edge from (0, 6) to the right increases Z. Algebraic Interpretation
Choose x1 and x2 to be the nonbasic
variables (! 0) for the initial BF
solution: (0, 0, 4, 12, 18).
Not optimal, be...
View
Full Document
- Spring '17
- Linear Programming, Optimization, CPF, BF solutions