Professional Documents
Culture Documents
Chapter 2.2 Quantitative Analysis New
Chapter 2.2 Quantitative Analysis New
Chapter 2.2 Quantitative Analysis New
Simplex method
1. Initialization:
a. Transform all the constraints to equality by introducing
slack, surplus, and artificial variables as follows:
Constraint type Variable to be added
≤ + slack (s)
= + Artificial (A)
2.2.1.Simplex method… cont’d
1. Initialization:
b. Construct the initial simplex tableau:
Basic X1 … Xn S1 …... Sn A …. A RHS
vari- 1 n
able
S b1
Coefficient of the constraints
A bm
Z Objective function coefficient Z
In different signs value
2.2.1.Simplex method… cont’d
3. Iteration:
Step 1: determine the entering basic variable by selecting
the variable (automatically a non-basic variable) with
the most negative value (in case of maximization) or
with the most positive (in case of minimization) in the
last row (Z-row).
Step 3: Solve for the new BF solution by using elementary row op-
erations (multiply or divide a row by a non-zero constant; sub-
tract a multiple of corresponding coefficients of pivot column
and corresponding values of pivot row from the old row values)
to construct a new simplex tableau, and then return to the opti-
mality test.
The specific elementary row operations are as follows:
1. Divide the pivot row by the “pivot number” (the number in
the intersection of the pivot row and pivot column)
2. Compute each other row new entry by using New tableau
row values = Old value of the row – (the coefficient of this
row in the pivot column) x (new pivot row).
3. Enter the calculated values to the new tableau row.
2.2.1.Simplex method … cont’d
Solution
Initialization
1. Standard form Sometimes it is called the augmented form
Maximize Z, of the problem because the original form
Subject to has been augmented by some supplemen-
method.
X1 + S1 = 4
2 X2 + S2 = 12
3X1 +2X2 + S3 = 18
X1 , X2, S1, S2, S3 0
2.2.1.Simplex method … cont’d
able
Basic X1 X2 S1 S2 S3 RHS
variable
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
variable number
2.2.1.Simplex method … cont’d
Notes:
The basic feasible solution at the initial tableau
is (0, 0, 4, 12, 18) where:
X1 = 0, X2 = 0, S1 = 4, S2 = 12, S3 = 18, and Z = 0
Where S1, S2, and S3 are basic variables.
X1 and X2 are non-basic variables.
The solution at the initial tableau is associated
to the origin point at which all the decision
variables are zero.
2.2.1.Simplex method … cont’d
Optimality test:
By investigating the last row of the initial
tableau, we find that there are some negative
numbers. Therefore, the current solution is not
optimal.
2.2.1.Simplex method … cont’d
Iteration:
Step 1: Determine the entering variable by selecting the
variable with the most negative in the last row.
From the initial tableau, in the last row (Z row), the
coefficient of X1 is -3 and the coefficient of X2 is -5;
therefore, the most negative is -5.
Consequently, X2 is the entering variable.
X2 is surrounded by a box and it is called the pivot
column.
2.2.1.Simplex method … cont’d
S1 0 4 None
S2 2 12 6
Leaving Smallest ratio
S3 2 18 9
2.2.1.Simplex method … cont’d
3 2 0 0 1 18
-
2 (0 1 0 1/2 0 6)
3 0 0 -1 1 6
for Z Substitute this values in the table
-3 -5 0 0 0 0
-
-5(0 1 0 1/2 0 6)
-3 0 0 5/2 0 30
2.2.1.Simplex method … cont’d
Iteration:
This solution is not optimal, since there is a negative numbers in the last row
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
The most negative value; there- The smallest ratio is 6/3 =2;
fore, X1 is the entering variable therefore, S3 is the leaving
2.2.1.Simplex method … cont’d
Iteration:
Apply the same rules we will obtain this solution:
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 last row: basic variables are X1 = 2, X2 = 6 and S1 = 2; the non-basic variables are S2 = S3 = 0,Z = 36.
Homework exercise:
The Plastic manufacturing company produces two products: Bowls/Product I and mugs/Product II. The raw ma-
terial requirements, space needed for storage, production rates, and selling prices for these products are given be-
low:
2
The total amount of raw material available per day for both products is 1575Ib. The total storage space for all products is 1500 m , and a max-
How many units of bowls/product I and mugs/product II product should the company to produce per day to maximize its total income/
Note that one of the simplex rules is violated, which is the basic variables A1, and A2 have a non -zero value in
the z row; therefore, this violation must be corrected before proceeding in the simplex algorithm as follows.
2.2.1.Simplex method … cont’d
Solution:
Step 2: Initial tableau
To correct the violation before starting the simplex algorithm,
the elementary row operations are used as follows:
New (Z row) = old (z row) ± M (A1 row) ± M (A2 row)
In our case, the sign will be positive since M is negative in the Z row, as fol-
lowing:
Old (Z row): -2 -3 0 0 -M -M 0
•Since there is a positive value in the last row, this solution is not optimal.
• The entering variable is X2 (it has the most positive value in the last row)
•
2.2.1.Simplex method … cont’d
First iteration:
Basic X1 X2 S1 S2 A1 A2 RHS
variables 2 3 0 0 M M
S1 5/12 0 1 1/12 -1/12 0 7/3
• Since there is a positive value in the last row, this solution is not optimal.
• The entering variable is X1 (it has the most positive value in the last row).
• The leaving variable is A2 (it has the smallest ratio).
2.2.1.Simplex method … cont’d
Second iteration:
Basic X1 X2 S1 S2 A1 A2 RHS
variables
S1 0 0 1 -1/8 1/8 -5/8 1/4
Z 0 0 0 -1/2 ½ -M 3/2-M 25
This solution is optimal, since there is no positive value in the last row. The optimal solution
is:
X1 = 5, X2 = 5, S1 = ¼
Special Cases in the Simplex Method
x1, x2 0
Where:
x1 = number of bowls
x2 = number of mugs
30
Multiple Solutions from the Simplex Tableau
Not in solution
x1 0 1 0 -0.6 0.4 24
The Infeasible Solution
• Special case where a LP
has not feasible solution
area
Max Z=5x1+3x2
s.t. 4x1+2x2<=8
x1>=4
X>=6
• Because no point satisfies
all three constraints simul-
taneously, there is no so-
lution.
The Infeasible Solution (cont.)
All values are zero or positive indicating that it is optimal
• Solution: x2=4, A1=4, and A2=2
– Existence of artificial variables in final tableau makes the solution
meaningless
• Occur as a result of making errors in defining problem correctly or in
formulating the LP problem
Basic Z x1 x2 s1 s2 s3 A1 A2 Solution
Z 1 M+1 0 M M 0.5M+1.5 0 0 -0.6M+12
x2 0 2 1 0 0 0.5 0 0 4
A1 0 1 0 -1 0 0 1 0 4
A2 0 -2 0 0 -1 -0.5 0 1 2
An Unbounded Problem
nitely:
35
Basic Z x1 x2 s1 s2 A1 Solution
• In second tableau, s1 is chosen
as the entering variable be- Z 1 M-4 -2 M 0 0 -4M
cause it has most negative co-
efficient in row Z A1 0 1 0 -1 0 1 4
• There is no leaving variable be-
s2 0 0 1 0 1 0 2
cause one row value is -4 and
the other is undefined
• Indicates that solution is un- Second tableau
bounded Basic Z x1 x2 s1 s2 A1 Solution
• A solution is unbounded if row Z 1 0 -2 -4 0 M+4 16
value ratios are all negative or
undefined X1 0 1 0 -1 0 1 4
• Occurs as a result of making er-
rors in defining problem or in s2 0 0 1 0 1 0 2
formulating LP problem
Degeneracy
• Possible to have a tie for pivot row
• A tie should be broken arbitrarily
• Other choice for leaving variable will posses a zero value in next
tableau
• Solution is said to be degenerate
– Z value never improves
• An example of a degeneracy condition
Maximize Z = 4x1+ 6x2
subject to
6x1+ 4x2 ≤ 24
x2 ≤ 3
5x1+10x2 ≤ 40
Tie for the Pivot Row
s3 0 5 0 0 -10 1 10
• S3 row is selected arbitrar-
ily, the resulting third
S1 ratio: 12/6 =2
eracy condition x2 0 0 1 0 1 0 3
x1 0 1 0 0 -2 1/5 2
• s2 is entering variable
Basic Z x1 x2 s1 s2 s3 Solution