Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Solving Linear Programming Problem - Simplex Method

Uploaded by

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

Solving Linear Programming Problem - Simplex Method

Uploaded by

Duke Amenya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Linear Programming Problem Solution by Simplex Method

This is the most powerful method in solving l.p.p.

It deals with iterative process, which consists of first designing a Basic Feasible Solution or a
Programme and proceed towards the OPTIMAL SOLUTION and testing each feasible solution
for Optimality to know whether the solution at hand is optimal or not. If not an optimal solution,
redesign the programme, and test for optimality until the test confirms OPTIMALITY.

Hence we can say that the Simplex Method depends on two concepts known as Feasibility and
optimality.

The simplex method is based on the property that the optimal solution to a linear programming
problem, if it exists, can always be found in one of the basic feasible solution.

Comparison between graphical and simplex methods

1. The graphical method is used when we have two decision variables in the problem. Whereas
in Simplex method, the problem may have any number of decision variables.

2. In graphical method, the inequalities are assumed to be equations, so as to enable to draw


straight lines. But in Simplex method, the inequalities are converted into equations by: Adding a
SLACK VARIABLE in maximisation problem and subtracting a SURPLUS VARIABLE in case
of minimisation problem.

3. In graphical solution the Isoprofit line moves away from the origin to towards the far off point
in maximisation problem and in minimisation problem, the Isocost line moves from far off
distance towards origin to reach the nearest point to origin.

4. In graphical method, the areas outside the feasible area (area covered by all the lines of
constraints in the problem) indicates idle capacity of resource where as in Simplex method, the
presence of slack variable indicates the idle capacity of the resources.
Maximisation case

Problem:

A factory manufactures two products A and B on three machines X, Y, and Z. Product A


requires 10 hours of machine X and 5 hours of machine Y a one hour of machine Z. The
requirement of product B is 6 hours, 10 hours and 2 hours of machine X, Y and Z respectively.
The profit contribution of products A and B are Ksh. 23/– per unit and Ksh. 32 /– per unit
respectively. In the coming planning period the available capacity of machines X, Y and Z are
2500 hours, 2000 hours and 500 hours respectively. Find the optimal product mix for
maximizing the profit.

Solution:

Machines Products Available capacity in hours


A Hrs B Hrs
X 10 6 2500
Y 5 10 2000
Z 1 2 500
Profit per Unit in Ksh. 23 32
Let the company manufacture a units of A and b units of B. Then the inequalities of the
constraints (machine capacities) are:

Maximise Z = 23 a + 32 b s.t. OBJECTIVE FUNCTION


10 a + 6 b ≤ 2500
5 a + 10 b ≤ 2000 STRUCTURAL CONSTRAINTS.
1 a + 2 b ≤ 500
And both a and b are ≥ 0. NON-NEGATIVITY CONSTRAINT.
Now the above inequalities are to be converted into equations.

Take machine X: One unit of product A requires 10 hours of machine X and one unit of product
B requires 6 units. Company is manufacturing a units of A and b units of B, hence both put
together must be less than or equal to 2,500 hours.

Suppose a = 10 and b = 10 then the total consumption is 10 × 10 + 6 × 10 = 160 hours. That is


out of 2,500 hours, 160 hours are consumed, and 2,340 hours are still remaining idle. So if we
want to convert it into an equation then 100 + 60 + 2,340 = 2,500. As we do not know the exact
values of decision variables a and b how much to add to convert the inequality into an equation.
For this we represent the idle capacity by means of a SLACK VARIABLE represented by S.
Slack variable for first inequality is S1, that of second one is S2 and that of ‘n’th inequality is Sn.
Regarding the objective function, if we sell one unit of A it will fetch the company Ksh. 23/– per
unit and that of B is Ksh. 32/– per unit. If the company does not manufacture A or B, all
resources will remain idle. Hence the profit will be Ksh. 0/-. This clearly shows that the profit
contribution of each hour of idle resource is zero.

In Linear Programming language, we can say that the company has capacity of manufacturing
2,500 units of S1, i.e., S1 is an imaginary product, which require one hour of machine X alone.
Similarly, S2 is an imaginary product requires one hour of machine Y alone and S 3 is an
imaginary product, which requires one hour of machine Z alone.

In simplex language S1, S2 and S3 are idle resources.

The profit earned by keeping all the machines idle is Ksh.0/–. Hence the profit contributions of
S1, S2 and S3 are Ksh.0/– per unit. By using this concept, the inequalities are converted into
equations as shown below:

Maximise Z = 23 a + 32 b + 0S1 + 0S2 + 0S3 s.t.


10 a + 6 b + 1S1= 2500
5 a + 10 b + 1S2= 2000
1 a + 2 b + 1S3= 500 and a, b, S1, S2 and S3 all ≥ 0.
In Simplex version, all variables must be available in all equations. Hence the Simplex format of
the model is:
Maximise Z = 23 a + 32 b + 0S1 + 0S2 + 0S3 s.t.
10 a + 6 b + 1S1 + 0S2 + 0S3= 2500
5 a + 10 b + 0S1 + 1S2 + 0S3= 2000
1 a + 2 b + 0S1 + 0S2 + 1S3= 500 and a, b, S1, S2 and S3 all ≥ 0.
The above data is entered in a table known as simplex table.
CBi Cjine 23 32 0 0 0 Solution Ratio
Basic var. a b S1 S2 S3
0 S1 10 6 1 0 0 2500 2500/6 = 416.7
0 S2 5 10 0 1 0 2000 2000/10 = 200
0 S3 1 2 0 0 1 500 500/2 = 250
Zj 0 0 0 0 0
Net evaluation Cj - Zj 23 32 0 0 0

Cj Coefficient of objective function


CBi Objective coefficients corresponding to basic variables in the program

Zj total gross amount of outgoing profit when we consider the exchange between one
unit of column, variable and the basic variables.
= (0 * 10) + (0 * 5) + (0 * 1) = 0
(0 * 6) + (0 * 10) + (0 * 2) = 0
(0 * 1) + (0 * 0) + (0 * 0) = 0…

Optimality Condition
For Maximization: all Cj - Zj ≤ 0
Minimization: all Cj - Zj ≥ 0

The values greater than ‘0’ should be reduced to ≤ 0

For maximization optimality, the greatest value of (Cj - Zj) i.e 32 will give the key column

b column forms the key column

Using key column values find Ratio (Ratio = Solution / Key column)

To find key row, get the least value in the ratio i.e 200

The intersection element forms the key element

b will be our entering variable while S2 will be the leaving variable in the next table

The interpretation of the elements in the first table


1. The first column, co-efficient of the basic variables i.e., CBj we enter the co-efficient of the
variables in the program. We have S1, S2 and S3 as the basic variables having coefficients 0.
2. In the second column, basis variables that are included in the solution are S1, S2 and S3.
3. In the solution column, the values of the basic variables in the programme i.e., quantities of the
units currently being produced are entered. In this table, S 1, S2 and S3 are being produced and
the units being produced (available idle time) is entered i.e.,2500, 2000 and 500 respectively
for S1, S2 and S3.
4. Cj at the top of the columns of all the variables represent the coefficients of the respective
variables I the objective function.
5. The number in the Zj row under each variable gives the total gross amount of outgoing profit
when we consider the exchange between one unit of column, variable and the basic variables.
6. The number in the net evaluation row, Cj – Zj row gives the net effect of exchange
between one unit of each variable and basic variables.
7. Generally the entry in net evaluation row is known as OPPORTUNITY COST.
Opportunity cost means for not including a particular profitable variable in the
programme, the manufacturer has to lose the amount equivalent to the profit
contribution of the variable. In the present problem the net evaluation under the variable ‘a’
is Ksh. 23 per unit and that of ‘b’ is Ksh. 32 per unit. Hence the if the company does not
manufacture ‘a’ at this stage it has to face a penalty of Ksh. 23/– for every unit of ‘a’ for not
manufacturing and the same of product variable ‘b’ is Ksh. 32/–. Hence the opportunity cost of
product ‘b’ is higher than that of ‘a’, hence ‘b’ will be the incoming variable. In general, select
the variable, which is having higher opportunity cost as the incoming variable (or select
the variable, which is having highest positive number in the net evaluation row. In this
problem, variable ‘b’ is having higher opportunity cost; hence it is the incoming variable. This
should be marked by an arrow ( ↑ ) at the bottom of the column and enclose the elements of
the column in a rectangle this column is known as KEY COLUMN. The elements of the key
column show the substitution ratios, i.e., how many units of slack variable goes out when the
variable enters the programme.
8. The element at the intersection of key column and key row is known as KEY NUMBER.
This is known as key number because with this number we have to get the next table. For
getting the revised programme, we have to transfer the rows of table 1 to table 2. To do this the
following procedure is used.
Step 1: To Write the incoming variable ‘b’ in place of outgoing variable S 2. Enter the
profit of ‘b’ in profit column. Do not alter S1 and S3. While doing so DO NOT
ALTER THE POSITION OF THE ROWS.
Step 2: DIVIDING THE ELEMENTS OF OLD COLUMN BY KEY COLUMN
ELEMENTS obtains capacity column elements.
Step 3: Transfer of key row: DIVIDE ALL ELEMENTS OF KEY ROW BY RESPECTIVE
KEY COLUMN NUMBER.
Step 4: Transfer of Non-Key rows: NEW ROW NUMBER = (old row number –
(corresponding key row number) × fixed ratio.
Fixed ratio = Key column number of the row/key number.
Step 5: Elements of Net evaluation row are obtained by:
Objective row element at the top of the row – Σ key column element × profit
column element.
Step 6: Select the highest positive element in net evaluation row or highest opportunity cost
and mark the column by an arrow to indicate key column (incoming variable).
Step 7: Find the replacement ratios by dividing the capacity column element in the row by
key column element of the same row and write the ratios in replacement ratio
column. Select the limiting (lowest) ratio and mark with a tick mark to indicate key
row (out going variable).
The element at the intersection of key column and key row is known as key
number.
Continue these steps until we get:
(i) For maximisation problem all elements of net evaluation row must be either
zeros or negative elements.
(ii) For Minimisation problem, the elements of net evaluation row must be either
zeros or positive elements.

CBi Cj 23 32 0 0 0 Solution Ratio


Basic var. a b S1 S2 S3
0 S1 7 0 1 -0.6 0 1300 1300/7 = 185.7
32 B 0.5 1 0 0.1 0 200 200/0.5 = 400
0 S3 0 0 0 -0.5 1 100 ---
Zj 16 32 0 3.2 0
Net evaluation Cj - Zj 7 0 0 -3.2 0

1. Step 1: To Write the incoming variable ‘b’ in place of outgoing variable S 2. Enter the
profit of ‘b’ in profit column. Do not alter S1 and S3. While doing so DO NOT ALTER
THE POSITION OF THE ROWS.
Step 2: DIVIDING THE ELEMENTS OF OLD COLUMN BY KEY COLUMN
ELEMENTS obtains capacity column elements.
Step 3: Transfer of key row: DIVIDE ALL ELEMENTS OF KEY ROW BY
RESPECTIVE KEY COLUMN NUMBER
Transfer of Key row: 5 /10, 10 /10, 0 /10, 1 / 10, 0 / 10, 2000/10
2. Step 4: Transfer of Non-Key rows: NEW ROW NUMBER = (old row number -
(corresponding key row number) × fixed ratio.
Fixed ratio = Key column number of the row/key number.

Transfer of Key row values: Elements of Key row / Respective Key column number
5 /10, 10 /10, 0 /10, 1 / 10, 0 / 10, 2000/10

Transfer of Non key rows:


Rule: Old row Number – (corresponding key row number × key column number) / key
number = new row no.

1st row 10 – 5 × 6/10 = 7


6 – 10 × 6/10 = 0 2 nd row: 1 – 5 × 2/10 = 0
1 – 0 × 6/10 = 1 2 – 10 × 2/10 = 0
0 – 1 × 6/10 = – 0.6 0 – 0 × 2/10 = 0
0 – 0 × 6/10 = 0 0 – 1 × 2/10 = – 0.2
2500 – 2000 × 6/10 = 1300 1 – 0 × 2 / 10 = 1
500 – 2000 × 2/10 = 100

Replacement ratios: 1300/7 = 185.7, 200/0.5 = 400, 100/0 = Infinity.

Step 5: Elements of Net evaluation row are obtained by:


Objective row element at the top of the row – Σ key column element × profit column
element.

Net evaluation row elements =


Column under 'a' = 23 – (7 × 0 + 0.5 × 32 + 0 × 0) = 23 – 16 = 7
'b' = 32 – (0 × 0 + 1 × 32 + 0 × 0) = 32 – 32 = 0
S1 = 0 – (1 × 0 + 0 × 32 + 0 × 0) = 0
S2 = 0 – (– 0.6 × 0 + 0.1 × 32 + –0.2 × 0) = – 3.2
S3 = 0 – (0 × 0 + 0 × 32 + 1 × 0) = 0

In the above table, the net evaluation under S2 is – 3.2. This resource is completely utilized to
manufacture product B. The profit earned by manufacturing B is Ksh. 6400/–.

As per the law of economics, the worth of resources used must be equal to the profit earned.
Hence the element 3.2 (ignore negative sign) is known as economic worth or artificial
accounting price (technically it can be taken as MACHINE HOUR RATE) of the resources
or shadow price of the resource. (In fact all the elements of reevaluation row under
slack variables are shadow prices of respective resources). This concept is used to check
whether the problem is done correctly or not. To do this multiply the elements in net
evaluation row under slack variables with the original capacity constraints given in the
problem and find the sum of the same. This sum must be equal to the profit earned by
manufactruing the product.

Σ Shadow prices of resources used must be equal to the profit earned.

CBi Cj 23 32 0 0 0 Solution Ratio


Basic var. a b S1 S2 S3
23 a 1 0 0.143 -0.086 0 185.7
32 b 0 1 -0.07 0.143 0 107.14
0 S3 0 0 0 -0.02 1 100
Zj 23 32 1 2.6 0
Net evaluation Cj - Zj 0 0 -1.0 -2.6 0
Transfer of key row: 1300/7 = 185.7, 7/7 = 1, 0/7 = 0, 1/7 = 0.143, –3 /5 = – 0.086 0/7 = 0
Row No. 2 Row No.3
200 – 1300 × 1/14 = 107.14 As the fixed ratio will be zero for this row
0.5 – 7 × 1/14 = 0 the row elements will not change.
1 – 0 × 1/14 = 1
0 – 1 × 1/14 = – 0.07
0.1 – (– 0.6) × 1/14 = 0.143
0 – 0 × 1/14 = 0
Net evaluation row elements:
For ‘a’ = 23 – 1 × 23 + 0 × 32 + 0 × 0 = 0
For ‘b’ = 32 – 0 × 23 + 1 × 32 +0 × 0 = 0
For S1 = 0 – 0.143 × 23 + ( – 0.07 × 32) + 0 × 0 = –1
For S2 = 0 – (–0.086 × 23) + 0.143 × 32 + (– 0.02 × 0) = – 2.6
For S3 = 0 – 0 × 23 + 0 × 32 + 1 × 0 = 0
Profit Z = 185.7 × 23 + 107.14 × 32 = Ksh. 7,700
Shadow price = 1 × 2500 + 2.6 × 2000 = Ksh. 2500 + 5200 = Ksh. 7700/–
As all the elements of net evaluation row are either negative elements or zeros, the solution is
optimal.
Also the profit earned is equal to the shadow price.
The answer is the company has to manufacture:
185.7 units of A and 107.14 units of B and the optimal return is Z = Ksh. 7,700/–

Exercise:
1. Maximize Z = 2a + 2b + 5c + 4d s.t
1a + 3b + 4c + 3d ≤ 10
4a + 2b +6c + 8d ≤ 25
and a, b, c, and d all are ≥ 0.

2. Maximize Z = 12x1 + 16x2 s.t.


10x1 + 20x2 ≤ 120
8x1 + 8x2 ≤ 80
x1 and x2 ≥ 0
Minimization Case
Solve the following LPP using simplex method for optimal solution
Objective Function:
Minimize Z = x1 – 3x2 + 2x3 s.t.
3x1 – x2 + 2x3 ≤ 7
-2x1 + 4x2 ≤ 12
-4x1 + 3x2 + 8x3 ≤ 10
Solution
Convert the inequalities to standard form equations by adding Slack variables:
Inequality Standard form equation
3x1 – x2 + 2x3 ≤ 7 3x1 – x2 – 2x3 + S1 = 7
-2x1 + 4x2 ≤ 12 -2x1 + 4x2 + 0x3 + S2 = 12
-4x1 + 3x2 + 8x3 ≤ 10 -4x1 + 3x2 + 8x3 + S3 = 10
The objective function is multiplied by -1 on both sides to convert it to maximization
Minimize Z = x1 – 3x2 + 2x3 = Maximize – (Z) = -x1 + 3x2 - 2x3
The objective function becomes – (Z) = -x1 + 3x2 - 2x3 – 0S1 + 0S2 + 0S3
The minimization problem is now solved the same way maximization problem is solved
For optimal solution, Cj – Zj ≤ 0

1st iteration table:


Old row Number – (corresponding key row number × key column number) / key number
= new row no.
x1 = 4; x2 = 5 and x3 = 0
Maximize – (Z) = -x1 + 3x2 - 2x3
– (Z) = -1*4 + 3*5 – 2* 0
-Z = 11
Z = -11

Linear Programming Problem (Big M method) Minimization case


Solve the following L.P.P using Big M method
Minimize Z = 600 X1 + 500 X2 s.t.
2X1 + X2 ≥ 80
X1 + 2X2 ≥ 60
X1, X2 ≥ 0

Solution:
Convert the inequalities into equations:
Done by subtracting a Surplus variable and add an Artificial variable
Minimize Z = 600X1 + 500 X2 + 0S1 + 0S2 + MA1 + MA2
2X1 + X2 – S1 + A1 = 80
X1 + 2X2 – S2 + A2 = 60
X1, X2, S1, S2, A1, A2 ≥ 0

S is the surplus variable and A is the artificial variable


M represents a number higher than any finite number called Big M
For Minimization problem we assign the objective function coefficient of +M for
Artificial variable
For Minimization problem the objective function will take coefficient of +M;
For Maximization problem, the objective function coefficient will be –M
The coefficients of surplus variables will be 0

For optimal solution, Cj – Zj ≥ 0


Select the most negative value the entering value
Select the most negative value as the entering variable = 350 -3M/2

All the values of Cj – Zj ≥ 0 thus the solution is optimal


Solutions:
X1 = 100/3
X2 = 40/3
Minimize Z = 600 X1 + 500 X2
Z = 600 * 100/3 + 500 * 40/3 = 26666

You might also like