0% found this document useful (0 votes)
67 views

Lecture 3-M1 - Simplex Method

- The document discusses the simplex method for solving linear programming problems. - The simplex method involves iteratively solving linear programming problems to find better solutions by moving from one corner point of the feasible region to another until an optimal solution is found. - The method involves forming an initial basic feasible solution and then performing iterations where a non-basic variable enters the basis and a basic variable leaves, until an optimal solution is reached.

Uploaded by

Bhawesh Prasad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Lecture 3-M1 - Simplex Method

- The document discusses the simplex method for solving linear programming problems. - The simplex method involves iteratively solving linear programming problems to find better solutions by moving from one corner point of the feasible region to another until an optimal solution is found. - The method involves forming an initial basic feasible solution and then performing iterations where a non-basic variable enters the basis and a basic variable leaves, until an optimal solution is reached.

Uploaded by

Bhawesh Prasad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

MINE SYSTEMS ENGINEERING

(MN 6035)

DR. AMIT KUMAR GORAI


ASSOCIATE PROFESSOR
DEPARTMENT OF MINING ENGINEERING,
NIT, ROURKELA

AKGORAI NIT Rourkela 1


Lecture 3

Simplex Method for Solving Linear


Programming Problem

AKGORAI NIT Rourkela 2


• Simplex method is a linear-programming algorithm that
can be used to solve problems having two or more
decision variables.
• In this algorithm, the first tableau corresponds to the
origin and each iteration offers a better solution
corresponds to a corner point of the feasible solution
space.

AKGORAI NIT Rourkela 3


Terms related to Solution of an LPP: Before learning the solution algorithms of a
LPP, one has to understand the following terminologies:

• Solution: Any set of values assigned to the decision variables in a given LPP is termed as a
solution. It may or may not satisfy any or all of the constraints.
• Basis and Basic variables: The set of basic variables is termed as basis. In a LPP, the number
of basic variables is equal to the number of equality constraints. All the variables under basis
are non-negative in nature.
• Non-basic variables: All variables outside the basis are designated as non-basic variables. All
the non-basic variables are zeros.
• Feasible Solution: Any solution that satisfies all the constraints of the LPP is referred to as
feasible solution.
• Infeasible solution: Any solution that violates at least one of the constraints is referred to as
infeasible solution.
• Basic solution: If an LPP has n decision variables and m slack variables then the basic solution
has m number of basic variables and n number of non-basic variables. The basic solution
should have at most m non-zero variables, which is equal to number of equality constraint or
slack variable and at least n zero valued variables, number of decision variables.
• Basic feasible solution: A basic solution, which is feasible, is a basic feasible solution.
• Initial basic feasible solution: The starting solution of a LPP, which is basic and feasible, is
termed as initial basic feasible solution. It is derived by setting all the decision variables equal
to zero.
AKGORAI NIT ROURKELA 4
Simplex Algorithm
Step 1: Formulation of Standard Form of the Problem
Transform all the constraints to equality by introducing
slack, surplus, and artificial variables as follows:
Constraint type Variable to be added

≥ + slack (s)

≤ - Surplus (s) + artificial (A)

= + Artificial (A)
Step 2: Construct the initial simplex tableau

Basic X1 … Xn S1 … Sn A1 … An RHS
variable
S b1
: Coefficient of the constraints :
A bm
Z Objective function coefficient Z value
Step 3: Test for optimality
Case 1: Maximization problem
If every coefficient in the objective function row is
non-negative then the current BF solution is
optimal.
Case 2: Minimization problem
If every coefficient in the objective function row is
non-positive then the current BF solution is
optimal.

AKGORAI NIT Rourkela 7


Step 4: Iteration algorithm
Step 4.1: Selection of entering variable
A non-basic variable with the most negative value
(in case of maximization) or with the most
positive (in case of minimization) in the Z-row
should be selected as the entering variable. The
entering variable column is called as the “pivot
column”

AKGORAI NIT Rourkela 8


Step 4.2: Selection of departing variable

1. Identify strictly positive (>0) coefficient in the pivot


column.
2. Divide each of these coefficients into the right hand side
entry for the same row.
3. Identify the row that has the smallest of these ratios
4. The basic variable for that row is the departing variable.
The departing variable row is called as the “pivot row”.
5. Replace the departing variable by the entering variable in
the basic variable column of the next simplex tableau.

AKGORAI NIT Rourkela 9


Step 4.3: Solve for the new solution by using elementary
row operations using Gauss-Jordan transformation as:

1. New pivot row can be determined by dividing the old pivot row by the
“pivot number” (the number in the intersection of the pivot row and pivot
column). Thus, the new pivot row is
Old pivot row
New pivot row =
Pivot coefficients

2. All other row can be determined as:


(New row)𝑖 = (Old row)𝑖 – (pivot column coefficients) ∗ New pivot row

AKGORAI NIT Rourkela 10


Refer to Example Explained in Graphical Method

Maximise 𝑍 = 1800 𝑥1 + 1500 𝑥2


Subject to, 2𝑥1 + 3𝑥2 ≤ 8 Stage 1
3𝑥1 + 2𝑥2 ≤ 8 Stage 2
𝑥1 , 𝑥2 ≥ 0

The standardised form of the problem

𝑍 − 1800 𝑥1 + 1500 𝑥2 + 0𝑦1 + 0𝑦2 = 0


Subject to, 2𝑥1 + 3𝑥2 + 𝑦1 + 0𝑦2 = 8
3𝑥1 + 2𝑥2 + 0𝑦1 + 𝑦2 = 8
𝑥1 , 𝑥2, 𝑦1 , 𝑦2 ≥ 0

AKGORAI NIT Rourkela 11


In the next step of the simplex method, an initial basic feasible solution needs to be
identified. In general, the initial basic feasible solution is identified by setting all
the decision variables (in this case, x1, and x2) equal to zero. That is, all the decision
variables are non-basic variables and all the slack variables are basic variables in
the initial basic feasible solution.

The values of slack variables at the initial basic feasible solution can be determined
from the constraint functions.
From first constraint, 2 ∗ 0 + 3 ∗ 0 + 𝑦1 + 0 ∗ 𝑦2 = 8
𝑦1 = 8
Similarly from second constraint, 3𝑥1 + 2𝑥2 + 0𝑦1 + 𝑦2 = 8
𝑦2 = 8

Initial basic feasible solution of the given problem is


(𝑥1 = 0, 𝑥2 = 0, 𝑦1 = 8, 𝑦1 = 8 )
At the starting solution, the value of objective function is given by
Z = 1800 ∗ 0 + 1500 ∗ 0 + 0 ∗ 8 + 0 ∗ 8 = 0

AKGORAI NIT Rourkela 12


Thus, the initial basic solution can be represented in simplex table as given below.

Starting Solution

Basis Coefficient of
x1 x2 y1 y2 RHS
Row 1 y1 2 3 1 0 8
Row 2 y2 3 2 0 1 8
Row Z Z -1800 -1500 0 0 0
Optimality Check….

The next step is to find a better solution through iterative process.

AKGORAI NIT Rourkela 13


Basis Coefficient of Ratio
x1 x2 y1 y2 RHS
Row 1 y1 2 3 1 0 8 8/2 = 4
Row 2 y2 3 2 0 1 8 8/3 Departing variable
(Minimum ratio)
Row z Z -1800 -1500 0 0 0

Entering Variable (most negative)

Thus, 𝑥1 replaces 𝑦2 in the new solution which has (𝑦1 , 𝑥1 ) as the basis by
Gauss-Jordan transformation.

AKGORAI NIT Rourkela 14


𝐎𝐥𝐝 𝐩𝐢𝐯𝐨𝐭 𝒓𝒐𝒘
𝐍𝐞𝐰 𝐩𝐢𝐯𝐨𝐭 𝒓𝒐𝒘 = 𝐏𝐢𝐯𝐨𝐭 𝒄𝒐𝒆𝒇𝒇𝒊𝒄𝒊𝒆𝒏𝒕𝒔

3 2 0 1 8 2 1 8
Thus, the new pivot row is , , , ,
3 3 3 3 3
= 1, 3 , 0, 3 , 3 .

The rows other than the pivot row are transformed as explained in eqn. 3.3.

(𝐍𝐞𝐰 𝐫𝐨𝐰)𝒊 = (𝐎𝐥𝐝 𝐫𝐨𝐰)𝒊 – (𝐩𝐢𝐯𝐨𝐭 𝐜𝐨𝐥𝐮𝐦𝐧 𝐜𝐨𝐞𝐟𝐟𝐢𝐜𝐢𝐞𝐧𝐭𝐬) ∗ 𝐍𝐞𝐰 𝐩𝐢𝐯𝐨𝐭 𝐫𝐨𝐰

Thus, the new Row 1 is given by


2 1 8 4 2 16
New Row 1 = 2, 3, 1, 0, 8 – 2 ∗ 1, , 0, , = 2, 3, 1, 0, 8 – 2, , 0, ,
3 3 3 3 3 3
5 2 8
= 0, 3 , 1, − 3 , 3
In the same way, the new Z row can be determined as
2 1 8
New Z Row = [−1800, −1500, 0, 0, 0] – (−1800) ∗ 1, , 0, ,
3 3 3
= −1800, −1500, 0, 0, 0 + 1800, 1200, 0, 600, 4800 = [0, −300, 0, 600, 4800]

AKGORAI NIT Rourkela 15


Iteration 1

Basis Coefficient of Ratio


x1 x2 y1 y2 RHS
Departing variable
Row 1 y1 0 5/3 1 -2/3 8/3 8/5
(Minimum ratio)
Row 2 x1 1 2/3 0 1/3 8/3 4
Row z Z 0 -300 0 600 4800 Optimality Check….

Entering Variable (most negative)


Iteration 2

Basis Coefficient of It is clear from the simplex


table that there is no negative
x1 x2 y1 y2 RHS coefficient exists in the Z-row
Row 1 x2 0 1 3/5 -2/5 8/5 under basic variable. Thus,
the solution reached to the
Row 2 x1 1 0 -2/5 3/5 8/5 optimal stage and no further
iteration is required.
Row Z Z 0 0 180AKGORAI
480NIT Rourkela
5280 16
Thus, the optimal solution is

x1 = 8/5, x2 = 8/5, Z = 1800*8/5 +1500*8/5 = 5280

AKGORAI NIT Rourkela 17


Notes on the Simplex tableau
1. In any Simplex tableau, the intersection of any basic variable with itself is always
one and the rest of the column is zeroes.
2. In any simplex tableau, the objective function row (Z-row) is always in terms of
the non-basic variables. This means that under any basic variable (in any
tableau) there is a zero in the Z-row. For the non basic there is no condition.
3. If there is a zero under one or more non-basic variables in the optimal solution
tableau, then the problem has a multiple optimal solution.
4. When determining the leaving variable of any tableau, if there is no positive
ratio (all the entries in the pivot column are negative and zeroes), then the
solution is unbounded.
5. If there is a tie (more than one variables have the same most negative or
positive) in determining the entering variable, choose any variable to be the
entering one.
6. If there is a tie in determining the leaving variable, choose any one to be the
leaving variable. In this case a zero will appear in RHS column; therefore, a
“cycle” will occur, this means that the value of the objective function will be the
same for several iterations.
7. A Solution that has a basic variable with zero value is called a “degenerate
solution”.
8. If there is no Artificial variables in the problem, there is no room for “infeasible
solution” AKGORAI NIT Rourkela 18
If the LPP has any artificial or surplus variable, the above simplex algorithm cannot
be directly applied. These problems can be solved using “Big M method” or “two
phase simplex method”.
Big M method: This algorithm is also explained with an example
Example 3.2: A mineral processing plant produces two mineral as main product
and waste as by-product. Based on the marketing condition, only main products
(mineral) can be sold and the by-product (waste need to be disposed). The
mineral is produced via two production processes: 1 and 2. It is observed that
operation of process 1 for an hour costs Rs.40000, which yields 300 units of
mineral and 100 unit of waste. Also, the operation of process 2 for an hour costs
Rs.10000 and produces 100 units of mineral and 100 units of waste. To meet
customer demands, at least 1200 units of mineral must be produced daily. Also, in
order to comply with government regulations, at most 500 units of waste can be
produced daily. AKGORAI NIT Rourkela 19
Solution: By assigning variables such that 𝑥1 is the number of hours per day running process
1 and 𝑥2 is the number of hours per day running process 2, the linear program becomes
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = 40000𝑥1 + 10000𝑥2
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 300𝑥1 + 100𝑥2 ≥ 1200 (1)
100𝑥1 + 100𝑥2 ≤ 500 (2)
𝑥1 ; 𝑥2 ≥ 0
The objective of the problem is to minimize the operational cost subject to satisfying the
constraints of productions of mineral and waste.

Standard form of the problem

𝑍 − 40000𝑥1 + 10000𝑥2 − 𝑀𝐴1 = 0


𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜 300𝑥1 + 100𝑥2 − 𝑆1 + 𝐴1 = 1200 (1)
100𝑥1 + 100𝑥2 + 𝑦1 = 500 (2)
𝑥1 , 𝑥2, 𝑆1 , 𝐴1, 𝑦1 ≥ 0
[Note: M, a very large number, is used to ensure that the values of artificial variables (A1 and
A2… and An) will be zero in the final (optimal) tableau as follows:
If the objective function is Minimization, then A1, A2… and An must be added to the RHS of
the objective function multiplied by a very large number (M).
If the objective function is Maximization, then A1, A2… and An must be subtracted from the
RHS of the objective function multiplied by a very large number (M).
AKGORAI NIT Rourkela 20
Initial simplex tableau:

Basis Coefficient of RHS


x1 x2 S1 y1 A1
Row 1 A1 300 100 -1 0 1 1200
Row 2 y1 100 100 0 1 0 500
Row Z Z -40000 -10000 0 0 -M 0
It can be observed that one of the simplex rules is violated as the basic variable A1 have a
non-zero value in the Z-row; therefore, this violation must be corrected before applying the
simplex algorithm. This violation can be rectified through elementary row operations as
follows:
New (Z row) = Old (Z row) ± M (A1 row) ± M (A2 row)… M (An row)
In this case, it will be positive since M is negative in the Z-row as follows:

Old (Z row): -40000 -10000 0 0 -M 0


M (A1 row) 300M 100M -M 0 M 1200M
New (Z row): 300M-40000 100M-1000 -M 0 0 1200M
AKGORAI NIT Rourkela Becomes zero 21
Revised Initial simplex tableau:

Basis Coefficient of RHS


x1 x2 S1 y1 A1 Ratio
Departing
Row 1 A1 300 100 -1 0 1 1200 4 Variable
Row 2 y1 100 100 0 1 0 500 5
Row Z Z 300M-40000 100M-10000 -M 0 0 1200M

Entering
Variable
Now the same simplex algorithm can be applied to solve the problem. Since there is a
positive value in the Z- row under non-basic variable, this solution is not optimal. The
entering variable is the most positive coefficient (x1) in the Z-row. The leaving
variable is A1 as it has the smallest ratio.

AKGORAI NIT Rourkela 22


First iteration

Basis Coefficient of RHS Ratio


x1 x2 S1 y1 A1
Row 1 x1 1 1/3 -1/300 0 1/300 4 12
Departing
Row 2 y1 0 200/3 1/3 1 -1/3 100 3/2 Variable
Row Z Z 0 10000/3 -400/3 0 -M + 400/3 160000

Entering
Variable

Still there is a positive value in the Z- row under non-basic variable, this solution
is not optimal. The entering variable is the most positive value in the Z-row. It is
clear that x2 has the maximum positive coefficient (=40000/3) in the Z-row and
thus selected as entering variable. The leaving variable is y1 as it has the smallest
ratio.
AKGORAI NIT Rourkela 23
Second iteration
Basis Coefficient of RHS
x1 x2 S1 y1 A1
Row 1 x1 1 0 1/200 -1/200 1/200 7/2
Row 2 x2 0 1 1/200 3/200 -1/200 3/2
Row Z Z 0 0 -150 -50 -M + 350/3 155000

The current solution is optimal as there is no positive coefficient exists in the Z-row
under basic variable.

Thus, the optimal solution is


x1 = 7/2, x2 = 3/2, Z = 1,55,000
Special cases of linear programming
If one or more artificial variables (A1, A2, …) still basic and has a nonzero value in the
optimal tableau, then the problem has an infeasible solution
If there is a zero under one or more non-basic variables in the optimal tableau, then
there is a multiple optimal solution.
If all the entries in the pivot column are negative and zeroes then the solution is
unbounded as there is no positive ratio.
AKGORAI NIT Rourkela 24

You might also like