Module 2 LP Simplex Maximization
Module 2 LP Simplex Maximization
(SIMPLEX Solution)
Maximization, Similar constraints
1
©2017 Batangas State University
Linear Programming SIMPLEX
Simplex Method – The geometric method of solving linear
programming problems presented before. The graphical
method is useful only for problems involving two decision
variables and relatively few problem constraints.
This system has two equations, we can select any two of the four
variables as basic variables. The remaining two variables are
then non-basic variables. A solution found by setting the two
non-basic variables equal to 0 and solving for the two basic
variables is a basic solution. If a basic solution has no negative
values, it is a basic feasible solution.
SIMPLEX METHOD
Step-1
Write the Step 4 Step-5
standard Are there
Step 2 Select
maximization any
Are the
problem in Step-3 positive
there pivot
standard any Select elements
in the
elemen
form, negative the
pivot t and
introduce indicator pivot
column perfor
slack s in the colum
above the m the
variables to bottom n dashed pivot
form the row?
line? operati
initial system,
on
and write the
initial tableau.
STOP
STOP The linear programming
The optimal solution has been problem has no optimal
found. solution
Non-negativity conditions x1 , x2 0
The first step of the simplex method requires that
each inequality be converted into an equation. ”less
than or equal to” inequalities are converted to
equations by including slack variables.
Suppose carpentry hours and finishing hours
s
remain unused in a week. The sconstraints
2
become;
1
4 x1 3 x2 s1 240 4 x1 3or
x2 s1 0s2 240
2 x1 x2 s2 100 2 x1 x2 0 s1 s2 100
P 70 x1 50 x2 0 s1 0 s2
P 70 x1 50 x2 0 s1 0 s2 0
The problem can now be considered as solving a
system of 3 linear equations involving the 5
variables in suchx1a
, x2way
, s1 , s2 , P
that P has the
maximum value;
4 x1 3 x2 s1 0 s2 240
2 x1 x2 0s1 s2 100
P 70 x1 50 x2 0 s1 0 s2 0
The slack variables S1 and S2 form the initial solution mix. The initial
solution assumes that all avaliable hours are unused. i.e. The slack variables
take the largest possible values.
Variables in the solution mix are called basic
variables. Each basic variables has a column
consisting of all 0’s except for a single 1. all
variables not in the solution mix take the value 0.
Righ
Basic
t
Variabl x1 x2 S1 S2 P
hand
es
side
S1 4 3 1 0 0 240
S2 2 1 0 1 0 100
P -70 -50 0 0 1 0
Pivot column
x1 should enter into the solution mix because each unit of
x1 (a table) contributes a profit of $70 compared with
only $50 for each unit of x1 (a chair)
Step 4
No, There aren’t any positive elements in the pivot
column above the dashed line.
We can go on step 5
STEP 5
Select the pivot row (determine which variable to replace in
the solution mix). Divide the last element in each row by the
corresponding element in the pivot column. The pivot row is
the row with the smallest non-negative result.
Enter
Righ
Basic
t
Variabl x1 x2 S1 S2 P
hand
es
side 240 / 4 60
Exit
S1 4 3 1 0 0 240 100 / 2 50
S2 2 1 0 1 0 100
P -70 -50 0 0 1 0 Pivot row
Pivot column
Pivot number
Should be replaced by x1 in the solution mix. 60 tables can be
made with 240 unused carpentry hours but only 50 tables
can be made with 100 finishing hours. Therefore we decide
to make 50 tables.
Now calculate new values for the pivot row. Divide every
number in the row by the pivot number.
Righ
Basic
t
Variabl x1 x2 S1 S2 P
hand
es
side
S1 4 3 1 0 0 240 R2
2
x1 1 1/2 0 1/2 0 50
P -70 -50 0 0 1 0
Use row operations to make all numbers in the pivot column equal to 0 except
for the pivot number which remains as 1.
Righ
Basic
t
Variabl x1 x2 S1 S2 P
hand
es
side 4.R R
2 1
S1 0 1 1 -2 0 40
x1 1 1/2 0 1/2 0 50 70.R2 R3
P 0 -15 0 35 1 3500
If 50 tables are made, then the unused carpentry hours are reduced by 200
hours (4 h/table multiplied by 50 tables); the value changes from 240 hours to 40
hours. Making 50 tables results in the profit being increased by $3500; the value
changes from $0 to $3500.
In this case, x1 50, x2 0, s1 40, s 2 0, P 3500
Now repeat the steps until there are no negative numbers in the last row.
Select the new pivot column. x2 should enter into the solution mix.
Select the new pivot row. S1 should be replaced by x2 in the solution mix.
Enter
Righ
Basic
t
Variabl x1 x2 S1 S2 P
hand
es
Exit
side 40 /1 40
S1 0 1 1 -2 0 40 50 / 0,5 100
x1 1 1/2 0 1/2 0 50
P 0 -15 0 35 1 3500New pivot row
New pivot
column
Calculate new values for the pivot row. As the pivot number is already 1,
there is no need to calculate new values for the pivot row.
Use row operations to make all numbers in the pivot column equal to
except for the pivot number.
Righ
Basic
t
Variabl x1 x2 S1 S2 P
hand
es
side
x2 0 1 1 -2 0 40 1
.R1 R2
2
x1 1 0 -1/2 3/2 0 30 15.R1 R3
P 0 0 15 5 1 4100
If 40 chairs are made, then the number of tables are reduced by 20
tables (1/2 table/chair multiplied by 40 chairs); the value
changes from 50 tables to 30 tables. The replacement of 20
tables by 40 chairs results in the profit being increased by $600;
the value changes from $3500 to $4100.
S1 1 0 1 0 0 4
S2 0 2 0 1 0 12
S3 3 2 0 0 1 18
Z -3 -5 0 0 0 0
Iteration 1
Basic
X1 X2 S1 S2 S3 RHS
Variable
S1 1 0 1 0 0 4
X2 0 1 0 1/2 0 6
S3 3 0 0 -1 1 6
Z -3 0 0 5/2 0 30
Iteration 2
Basic
X1 X2 S1 S2 S3 RHS
Variable
S1 0 0 1 1/3 -1/3 2
X2 0 1 0 1/2 0 6
X1 1 0 0 -1/3 1/3 2
Z 0 0 0 3/2 1 36
This solution is optimal; since there is no
negative solution in the z-row: basic
variables are X1 = 2, and X2 = 6 and S1 =
2; the non-basic variables are S2=S3=0. The
maximum profit Z = 36
Example
S1 6 4 1 0 0 0 24
S2 1 2 0 1 0 0 6
S3 -1 1 0 0 1 0 1
S4 0 1 0 0 0 1 2
Z -5 -4 0 0 0 0 0
Iteration 1
Basic
X1 X2 S1 S2 S3 S4 RHS
Variable
X1 1 2/3 1/6 0 0 0 4
S2 0 4/3 -1/6 1 0 0 2
S3 0 5/3 1/6 0 1 0 5
S4 0 1 0 0 0 1 2
Z 0 -2/3 5/6 0 0 0 20
Iteration 2
Basic
X1 X2 S1 S2 S3 S4 RHS
Variable
X1 1 0 1/4 -1/2 0 0 3
Z 0 0 3/4 1/2 0 0 21
This solution is optimal; since there is no
negative solution in the z-row: basic
variables are X1 = 3, and X2 = 3/2. The
maximum profit Z = 21