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

ch3 Linear-Programming

The document describes the steps of the simplex method for solving linear programming problems with more than two decision variables. It involves: 1) Formulating the linear programming problem and writing it in standard form using slack and surplus variables. 2) Setting up the initial simplex tableau with the objective function and constraints. 3) Iteratively improving the solution by selecting an entering variable and departing variable at each step until an optimal solution is reached where all elements in the index row are non-positive.

Uploaded by

Rafatul Islam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

ch3 Linear-Programming

The document describes the steps of the simplex method for solving linear programming problems with more than two decision variables. It involves: 1) Formulating the linear programming problem and writing it in standard form using slack and surplus variables. 2) Setting up the initial simplex tableau with the objective function and constraints. 3) Iteratively improving the solution by selecting an entering variable and departing variable at each step until an optimal solution is reached where all elements in the index row are non-positive.

Uploaded by

Rafatul Islam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Linear Programming-II (Simplex Method)

 When decision variables are more than 2, we always use Simplex


Method.

Slack Variable: Variable added to a ≤ constraint to convert it to an


equation (=).
 A slack variable represents unused resources.
 A slack variable contributes nothing to the objective function value.

Surplus Variable: Variable subtracted from a ≥ constraint to convert it


to an equation (=).
 A surplus variable represents an excess above a constraint
requirement level.
 Surplus variables contribute nothing to the calculated value of the
objective function.

The Simplex Algorithm (Maximization case)

Step 1: Formulate the linear model of the real world problem, i.e., obtain a
mathematical representation of the problem’s objective function and
constraints.

Step 2: Express the mathematical model of L.P problem in the standard


form by adding a slack variables in the left hand side of the constraints and
assign a zero coefficient to these in the objective function. Thus we can
restate the problem in terms of equations:

Maximize Z= C1X1+C2X2+……. +CnXn+0S1+0S2+……+0Sm

Subject to the constraints

a11x1+a12x2+…..+a1nxn+s1=b1

a21x1+a22x2+…..+a2nxn+s2=b2
.
.
am1x1+am2x2+…..+amnxn+sm=bm

Where x1, x2……xn and s1, s2 ……sm are non-negative. Note that the slack
variables have been assigned zero coefficients in the objective function. The
reason is that these variables typically contribute nothing to the value of
the objective function.

Step 3: Design the initial feasible solution. An initial basic feasible solution
is obtained by setting:

X1=X2=………=Xn=0. Thus S1=b1, S2=b2….Sm=bm.

4. Set up the initial simplex tableau. For computational efficiency and


simplicity, the initial basic feasible solution, the constraints of the standard
LPP as well as the objective function can be displayed in a tabular form,
called the simplex tableau as shown below:

Initial Simplex Tableau 1

Cj (Contribution per unit) C1 C2 …..Cn 0 0….0 Min.

CB Basic Value of basic ratio


Variables variables b(=XB) X1 X2….Xn S1 S2….SM
B
CB1 S1 b1=XB1 a11 a12 …. a1n 1 0……0
CB2 S2 b2=XB2 a21 a22 …. a2n 0 1……0
. . . .
. . . .
CBM Sm Bm=XBm am1 am2 ….amn 0 0……1

ZJ=∑ CBi XBm 0 0…..0 0 0 …..0

Cj - Zj C1-Z1 C1-Z1…Cn-Zn 0 0
……….0

The interpretation of data in Tableau 1 is given as under. Other simplex


tableau will have similar interpretations.
(i) In the first row labelled “Cj”, we write the coefficients of the
variable in the objective function. These values will remain the
same in subsequent tableaus.
(ii) The second row shows the major column headings.
(iii) In the first column labelled “CB”, we list the coefficients of current
basic variables in the objective function. Thus the coefficients of
S1 , S2 …Sn which are included in the first programme, are written
in the CB column.
(iv) In the second column labelled “Basic Variables” also called
(Product mix column) are listed in the basic variables.
(v) In the next column (also called Quantity Column), we write the
solution values of the basic variables.
(vi) The body matrix (under non-basic variables) in the initial simplex
tableau consists of the coefficients of the decision variables in the
constraint set. The entries in the body matrix can be interpreted as
physical rates of substitution.
(vii) The identity matrix (or basis matrix) (under S1, S2…….Sn) in the
initial simplex tableau represents the coefficients of the slack
variables in the constraint set. Each simplex tableau contains an
identity matrix under basic variables.
(viii) To find an entry in the Zj row under a column, we multiply the
entries of that column by the corresponding entries of C B column
and add the products, i.e ., Zj = ∑CBixj.

The Zj row entries will all be equal to zero in the initial simplex tableau.
The Zj entry under the “solution or quantity column” give the current
value of the objective function. The other Z j entries represent the
decrease in the value of objective function that would result if one of the
variables not included in the solution were bought into the solution.

Remark: The entries in Cj-Zj now represent the net contribution to the
objective function that results by introducing one unit of each of the
respective column variables. A plus value indicate that a greater
contribution can be made by bringing the variable for that column into the
solution. A negative value indicates the amount by which contribution
would decrease if one unit of the variable for that column were bought into
the solution. Index row elements are also known as the shadow price (or
accounting price).

Step-5: We test if the current solution is optimum or not. If all the elements
or entries in the Cj-Zj row (i.e the index row) are negative or zero , then the
current solution is optimum. If there exists some positive number, the
current solution can be further improved by removing one basic variable
from the basis and replacing it by some non-basic one.

Step-6: Further, iterate towards an optimum solution. To improve the


current feasible solution, we replace one current basic variables (called the
departing variable) by a new non basic variable (called the entering
variable).

(i) We now determine the variable to enter into the solution mix
next. One way of doing this is by identifying the column with
largest positive value in the Cj-Zj row of the simplex table. The
column with largest positive entry in the Cj –Zj is called the key
or pivot column. The non-basic at the top of the key column is
the entering variable that will replace a basic variable.
(ii) Next we determine the departing variable to be replaced
in the basis solution. This is accomplished by dividing each
number in the quantity (XB ) by the corresponding number in
the key column selected in step 6(i). We compute the ratio by
b1/aij, b2/m2j……bm/amj. The row corresponding to the
minimum of these ratios is the key row or pivot row. The
corresponding variable in the key row known as the departing
variable will leave the basis.
(iii) We identify the key or pivot element. This is the number
that lies at the intersection of the key column and key row of
the given simplex table.

Step-7: Evaluate the new solution by constructing second simplex tableau.


After identifying the entering and departing variable, all that remains is to
find the new basic feasible solution by constructing a new simplex from the
current one.
Now evaluate and update the new solution in the following way:

a) New values of the key row are computed by simply dividing every
element of the key row by key element.
b) The new values of the elements of the remaining rows for the new
simplex table can be obtained by performing elementary row
operations on all rows so that all elements except the key element in
the key column are zero.
In other words, for each row other than the kew row, we use the
formula:
New row numbers= (Number in old rows)-{[Corresponding number
above or below key element]*[Corresponding number in the row
replaced in (a)]}.
c) New entries in the CB column and XB column are entered in the new
table of the current solution.
d) Compute Zj and Cj-Zj rows. If all the elements in Cj-Zj row are either
negative or zero, an optimum solution has been obtained.

Step-1:

Maximize (Total Contribution) Z=10X1+5X2


Subject to the constraints:
4X1+5X2≤100
5X1+2X2≤80
X1≥0, X2≥0
Where X1=The number of units of product P1
X2=The number of units of product P2

Step-2: Maximize (Total Contribution) Z=10X1+5X2 +0S1+0S2

Subject to the constraints:

4X1+5X2+ S1=100

5X1+2X2+ S2= 80
X1≥0, X2≥0, S1≥0,S2≥0

Step-3:

Step-4: Intial Simplex Tableau

Cj 10 5 0 0

CB Basic X1 X2 S1 S2 Solution Ratio


Variables

0 S1 4 5 1 0 100 25

0 S2 5 2 0 1 80 16←

Zj 0 0 0 0 0

Cj-Zj 10↑ 5 0 0

Pivot / Key Column Key/Pivot Row

Step-6: Developing second simplex Tableau:

Cj 10 5 0 0
CB Basic X1 X2 S1 S2 Solution Ratio
Variables

0 S1 0 17/5 1 -4/5 36 36
17/5

10 X1 1 2/5 0 1/5 16 16
2/ 5

Zj 10 4 0 2

Cj-Zj 0 ↑1 0 -2

# Compute new values for key row: For this we have to divide each
number in the key row by key number.

# Compute new values (derived numbers) for each remaining row.

New row number= Old row number –{[Corresponding number in key


row]* [Old row number in key column / Key number]}

Cj 10 5 0 0

CB Basic X1 X2 S1 S2 Solution Ratio


Variables
5 X2 0 1 5/17 -4/17 180/17

10 X1 1 0 -2/17 5/17 200/17

Zj 10 5 5/17 30/17 2900/17

Cj-Zj 0 0 -5/17 -30/17

Hence the optimum solution is: X1=200/17, X2=180/17,

S1=0, slack hours in the machine M1

S2= 0, slack hours in the machine M2

Profit = Tk. 2900/17 for the optimum solution.

The Simplex Algorithm (Minimization case):

The various steps involved in using simplex method for minimization


problems:
Step 1: Formulate the linear model of the real world problem, i.e., obtain a
mathematical representation of the problem’s objective function and
constraints.

Step 2: Express the mathematical model of L.P problem in the standard


form by introducing a surplus and artificial variables in the left hand side
of the constraints and assign a 0 (zero) and M as coefficient for surplus and
artificial variables respectively in the objective function.

Step 3: Next, an initial solution is set up. Just to initiate the solution
procedure, the initial basic feasible solution is obtained by assigning zero
value to decision variables. This solution is now summarized in the initial
simplex table. Complete the initial simplex table by adding two final rows
Zj and Cj – Zj . These two rows help us to know whether the current
solution is optimum or not.

Step-4: We test if the current solution is optimum or not. If all the elements
or entries in the Cj-Zj row (i.e the index row) are positive , then the current
solution is optimum. If there exists some negative number, the current
solution can be further improved by removing one basic variable from the
basis and replacing it by some non-basic one.

Step-5: Further, iterate towards an optimum solution. To improve the


current feasible solution, we replace one current basic variables (called the
departing variable) by a new non basic variable (called the entering
variable).

(iv) We now determine the variable to enter into the solution


mix next. One way of doing this is by identifying the column
with largest negative value in the Cj-Zj row of the simplex
table. The column with largest negative entry in the Cj –Zj is
called the key or pivot column (indicated by ↑). The non-basic
at the top of the key column is the entering variable that will
replace a basic variable.
(v) Next we determine the departing variable to be replaced in the
basis solution. If an artificial variable goes out of solution, then
we discard it totally and even this variable may not form part
of farther iterations. Same procedure is, as in maximization
case, is employed to determine the departing variable.

Step-6: We update the new solution now. We evaluate the entries for the
next simplex table in exactly the same manner as was discussed earlier in
the maximization case.

Step-7: Step (4-6) are repeated until an optimum solution is obtained.

The Big M Method –Introducing slack, surplus and artificial variables

1. If any problem constraint have negative constant on the right side,


multiply both sides by -1 to obtain a constraint with a non-negative
constant. (If the constraint is an inequality, this will reverse the
direction of the inequality.)
2. Introduce a slack variable in each ≤ constraints.
3. Introduce a surplus variable and an artificial variable in each ≥
constraint.
4. Introduce an artificial variable in each ‘=’ constraint.
5. For an artificial variable Ai add –MAi to the objective function in case
of maximization and +MAi in case of minimization problem. Use the
same constant M for all artificial variables.
6. Solve the modified problem by the simplex method.

### The artificial variables are introduced for the limited purpose of
obtaining an initial solution and are required for the constraints of ≥
type or the constraints with ‘=’ sign. It is not relevant whether the
objective function is of the maximization or minimization type.
Obviously, since artificial variables do not represent any quantity
relating to the decision problem, they must be driven out of the system
and must not remain in the final solution (and if at all they do, it
represent a situation of infeasibility). This can be ensured by assigning
an extremely high cost to them. Generally, a value M is assigned to each
artificial variable, where M represent a number higher than any finite
number. For this reason, the method of solving the problems where
artificial variables are involved is termed as the ‘Big M Method’. When
the problem is of the minimization nature, we assign in the objective
function a coefficient of +M to each of the artificial variables. On the
other hand, for the problems with the objective function of
maximization type, each of the artificial variables introduced has a
coefficient –M.

Example:

Minimize Z = 4X1 + X2

Subject to constrains

3x1 +4x2≥20

-x1-5x2≤-15

x1,x2 ≥0

The problem may be rewritten as follows :

Minimize Z=4X1+X2
Subject to the constraints:
3X1+4X2≥20
X1+5X2≥15
X1,X2≥0
Introducing artificial and surplus variables in the objective function
we get,
Minimize Z = 4X1+X2 +0S1+0S2+MA1+MA2

Subject to the constraints:

3X1+4X2-S1+A1=20
X1+5X2-S2 +A2=15

X1, X2, S1, S2, A1, A2 ≥0

We obtain the initial basic feasible solution by setting:

X1=X2 = S1 = S2 =0 so that A1=20 , A2 = 15.

Initial Simplex Tableau

Cj 4 1 0 0 M M

CB Basic X1 X2 S1 S2 A1 A2 Solution Ratio


Variables

M A1 3 4 -1 0 1 0 20 5

M A2 1 5 0 -1 0 1 15 3←

Zj 4M 9M -M -M M M 0

Cj-Zj 4-4M 1-9M↑ M M 0 0

Pivot / Key Column Key/Pivot Row

# Compute new values for key row: For this we have to divide each
number in the key row by key number.

# Compute new values (derived numbers) for each remaining row.

New row number= Old row number – {[Corresponding number in key


row]* [Old row number in key column / Key number]}

Second simplex Tableau


Cj 4 1 0 0 M M

CB Basic X1 X2 S1 S2 A1 A2 Solution Ratio


Variable
s

M A1 11/5 0 -1 4/5 1 8 8
5/11

1 X2 1/5 1 0 -1/5 0 3 3
1/5

Zj 11M/5 1 - (4M/5) - M
+1/5 M (1/5)

Cj-Zj (19- 0 M (1-4M)/5 0


11M)/5 ↑

Third simplex Tableau

Cj 4 1 0 0 M M

CB Basic X1 X2 S1 S2 A1 A2 Solution Ratio


Variables
4 X1 1 0 -5/11 4/11 40/11 10 ←

1 X2 0 1 1/11 -3/11 25/11 -

Zj 4 1 -
19/11 13/11

Cj-Zj 0 0 19/11 -13/11

Final simplex Tableau

Cj 4 1 0 0 M M

CB Basic X1 X2 S1 S2 A1 A2 Solution Ratio


Variables

0 S1 11/4 0 -5/4 1 10

1 X2 3/4 1 -1/4 0 5

Zj 3/4 1 -1/4 0

Cj-Zj 13/4 0 1/4 0

Hence the optimum solution is: X1=0, X2=5, with minimum Z=5.

##1: Solve the following LP problem using Big M method:

Minimize Z=600X1+500X2
Subject to the constraints:
2X1+X2≥80
X1+2X2≥60
X1,X2≥0

##2: Solve the following LP problem using Big M method:

Maximize Z=7X1+15X2+20X3
Subject to the constraints:
2X1+4X2+6X3≥24
3X1+9X2+6X3≥30
X1,X2,X3≥0

##3: Solve the following LP problem using Big M method:

Maximize Z=2X1+3X2+4X3
Subject to the constraints:
3X1+X2+4X3≤600
2X1+4X2+2X3≥480
2X1+3X2+3X3 =540
X1,X2,X3≥0

##4: Solve the following LP problem using Big M method:

Maximize Z=X1+4X2+5X3
Subject to the constraints:
3X1+3X3≤22
X1+2X2+3X3≤14
3X1+2X2 ≤14
X1, X2, X3≥0

You might also like