Simplex Method
Simplex Method
Linear Programming
Simplex Method
Introduction
• Simplex method is an algebraic procedure.
However, its underlying principles are
geometric. To understand the basic principles
of the procedure we will be using the problem
we solved for Maharage and Co. , in the
previous section.
2
Basic features of the Simplex Method
The model and the graph we developed earlier are repeated
here (see figure 1) to demonstrate the basic features of the
Simplex Method.
As such in this example (2,6) must be an optimal solution because Z=36 is larger
than Z=30 for (0,6) and Z=27 for (4,3).
Now let us go through the step by step procedure of arriving at the optimal
solution.
4
Geometric Solution Procedure
Initialisation : Choose (0,0) as the initial CPF solution.
Optimality test : Conclude that (0,0) is not an optimal solution. The adjacent CPF are better.
Iteration 1 : Move to a better adjacent CPF solution (0,6), by performing the following 3
steps.
1. Consider the two edges that starts at (0,0). With objective function Z=3x1+5x2 , moving
up the x2 axis increase Z at a faster rate than moving along the x1 axis.
2. Stop at the first constraint boundary 2x2=12.
3. Solve for the intersection of new constraint boundaries (0,6).
Optimality test: Conclude that (0,6) is not an optimal solution. An adjacent CPF solution is
better.
Iteration 2 : Move to a better adjacent CPF solution (2,6), by performing the following 3
steps.
1. Consider the two edges that starts at (0,6). With objective function Z=3x1+5x2 , moving
to the right increases Z, where as moving down will reduce Z.
2. Stop at the first constraint boundary 3x1+2x2=18.
3. Solve for the intersection of new constraint boundaries (2,6).
x1 <= 4
x3= 4-x1
Subject to,
(1) x1 + x3 = 4
(2) 2x2 + x4 = 12
(3) 3x1 + 2x2 + x5 = 18
and x1 >=0 , x2 >=0 , x3 >=0 , x4 >=0 , x5 >=0
7
A Basic Feasible (BF) Solution is an augmented corner point
solution. Thus the CPF solution (0,6) in this example is
equivalent to the BF Solution (0,6,4,0,6). The difference
between the CPF and BF solution is that in the latter slack
variables are included.
Basic Solution and Basic Feasible (BF) Solution are two terms
that are very important in solving linear programming
problems. As such it is necessary to have a clear
understanding of their algebraic properties.
8
A basic solution has the following properties:
• Each variable is designated as a basic or nonbasic variable.
• The number of basic variables equals the number of functional
constraints. Hence the number of nonbasic variables equals the
total number of variables minus the number of functional
constraints.
• The nonbasic variables are set to zero.
• The values of the basic variables are obtained as the simultaneous
solution of the system of equations.
9
To illustrate the above properties, let us consider the BF solution
(0,6,4,0,6) obtained earlier. Another way to arrive at this solution is
to choose x1 and x4 as nonbasic variables. The three equations then
yield x3=4 , x2=6 and x5=6 as shown below.
(1) x1 + x 3 = 4 x3=4
(2) 2x2 + x4 = 12 x2=6
(3) 3x1+ 2x2 + x5 = 18 x5=6
10
Note: Two BF solutions are adjacent if atleast one of their non basic
variables are the same. This implies that atleast one of their basic
variables are the same, perhaps with different numerical values.
11
When we deal with the problem in augmented form it is
convenient to consider the objective function too in the form of an
equation. So our linear programming problem can be re written as
follows,
Maximise Z,
Subject to,
12
Algebra of the Simplex Method
Optimality test : The objective function is Z = 3x1 + 5x2 . So Z=0 for the BF solution. The
rates of increase for unit increase of x1 and x2 are positive. Hence this is not the optimal
solution.
Increasing one nonbasic variable from zero corresponds to moving along one edge
emanating from the current CPF solution. The decision as to which nonbasic variable to
increase is made as follows.
Z = 3x1 + 5x2
At any iteration, purpose of step 1 is to choose one nonbasic variable to increase from
zero. Increasing this nonbasic variable from zero will convert it to a basic variable for the
next BF solution. Therefore this is called the entering variable for the current iteration.
13
Determining where to stop (step 2 of an iteration)
The basic variables are nonnegative. We need to find out how far x2 can be
increased without violating the nonnegative constraint of the basic variables.
Decreasing this basic variable x4 to zero will convert it to a nonbasic variable for the
next BF solution. Therefore this variable is called leaving basic variable for the
current iteration. 14
Solving for the new BF solution (step 3 of an iteration)
Increasing x2 from 0 to 6 moves us from the initial BF to the new BF solution as shown
below.
Purpose of this step is to convert the system of equations to a more convenient form for
conducting optimality test and next iteration. This form also will identify the values of x3
and x5 for the new solution. Here is the complete set of original equations.
15
x2 has replaced x4 as the basic variable in eq (2). To solve this system of equations for Z, x2,
x3, and x5 we need to perform some basic algebraic operations to reproduce the current
patterns of coefficients of x4 (0,0,1,0 ) as the new coefficients of x2.
Note that the coefficients of x2 in the above set of equations are (-5,0,2,2), where as we
want them to be (0,0,1,0). To turn the coefficient of x2 in eq (2) to 1, divide this equation by
2.
(2) x2 + ½ x4 = 6
To turn the coefficients -5 and 2 to zero, we add 5 times this new equation (2) to equation
(0), and subtract 2 times the new eq(2) from eq(3). This results in,
Since x1 = 0 and x4 = 0, this yields the new BF solution (x1, x2, x3, x4, x5) = (0, 6, 4, 0, 6) which
gives Z=30.
16
Optimality test
The current eq(0) gives the objective function in terms of the new
nonbasic variables as,
Z = 30 + 3x1 - 5/2x4
17
Iteration 2 and the resulting optimal solution
For the next step the current set of equations yield about how far x1 can be
increased.
X3 = 4 – x1 >=0 x1 <= 4
X2 – no upper bound on x1
X5 = 6 – 3x1 >=0 x1 <= 2 (minimum)
For the final step with x1 replacing x5 as the basic variable, perform the
elementary algebraic operations as we did earlier, to reproduce the current
pattern coefficients of x5 (0,0,0,1) as the new coefficients of x1. This results in
the following set of equations.
18
(0) Z 23 x4 x5 36
(1) x3 13 x4 13 x5 2
(2) x2 12 x4 6
(3) x1 13 x4 13 x5 2
So the next BF solution is (x1, x2, x3, x4, x5) = (2, 6, 2, 0, 0) which gives Z=36.
Z 36 23 x4 x5
Increasing either x4 or x5 will reduce Z.
20
21
22
23
Step 3: Solve for the new BF by using elementary row operations to construct a
new simplex tableau below the current and return to the optimality test.
Divide the pivot row by pivot number. Use this new pivot row in steps 2 and 3
For each other row that has a negative coefficient in the pivot column, add to this
row the product of the absolute value of this coefficient and the new pivot row
For each other row that has a positive coefficient in the pivot column, subtract
from this row the product of this coefficient and the new pivot row.
24
25
26
27