02 LP_Graphical Method Simplex Algorithm
Post on 03-Apr-2018
225 Views
Preview:
Transcript
7/28/2019 02 LP_Graphical Method Simplex Algorithm
1/44
1
TTN DoMS, IIT Madras, 17-Apr-13
T.T. NarendranDepartment of Management Studies
Indian Institute of Technology Madras
7/28/2019 02 LP_Graphical Method Simplex Algorithm
2/44
2
TTN DoMS, IIT Madras, 17-Apr-13
Example Problem No. 8 :
A furniture shop manufactures tables and
chairs. The operations take place
sequentially in two work centers.
The associated profits and the man hours
required by each product at each work centerare shown in the table below :
52
53
7/28/2019 02 LP_Graphical Method Simplex Algorithm
3/44
3
TTN DoMS, IIT Madras, 17-Apr-13
Formulate a linear programme to determine theoptimal number of tables and chairs to be
manufactured so as to maximize the profit.
Furniture Shop Tables Chairs
Available
man
hours
Profit / unit 8 6
Work Center-I 4 2 60
Work Center-II 2 4 48
52
53
7/28/2019 02 LP_Graphical Method Simplex Algorithm
4/44
4
TTN DoMS, IIT Madras, 17-Apr-13
Solution to Example Problem No.8
The following linear programme is formulated
This problem can be solved graphically.
The following figure shows the constraints ;
50
51
7/28/2019 02 LP_Graphical Method Simplex Algorithm
5/44
5
TTN DoMS, IIT Madras, 17-Apr-13
The shaded region is the feasible solution set to the problem
50
51
A(0,12)
X1
C(15,0)
B(12,6)
X2
O(0,0)
7/28/2019 02 LP_Graphical Method Simplex Algorithm
6/44
6
TTN DoMS, IIT Madras, 17-Apr-13
Before we indicate the procedure to
solve this problem, a few concepts are
introduced.
7/28/2019 02 LP_Graphical Method Simplex Algorithm
7/44
7
TTN DoMS, IIT Madras, 17-Apr-13
Convex Set:
If there exists a set in which a straight line
joining any two points in the set is also
contained in the set, then such a set is
called a convex set
7/28/2019 02 LP_Graphical Method Simplex Algorithm
8/44
8
TTN DoMS, IIT Madras, 17-Apr-13
The extreme of a convex set will always lie
at a corner point. This property is used for
determining the solution to the given linear
programme.
The expression
7/28/2019 02 LP_Graphical Method Simplex Algorithm
9/44
9
TTN DoMS, IIT Madras, 17-Apr-13
A series of parallel lines for various assumed
values of Z can be drawn. These are called
Isoprofit lines.
The profit Zalong each line is the same.
The value of Z is seen to increase as the
isoprofit lines move farther away from the origin.
The corner point through which the last isoprofit
line passes, gives the optimal solution.
In the figure OABC, the corner points are
evaluated as follows:
7/28/2019 02 LP_Graphical Method Simplex Algorithm
10/44
10
TTN DoMS, IIT Madras, 17-Apr-13
Iso Profit Line
A(0,12)
X1
C(15,0)
B(12,6)
X2
O(0,0)
7/28/2019 02 LP_Graphical Method Simplex Algorithm
11/44
11
TTN DoMS, IIT Madras, 17-Apr-13
Z0 = 0
ZA = 72
ZB = 132
ZC = 120
For the given problem, the optimal solution
occurs at corner point B (12,6)
i.e.,X1= 12,X2 = 6 with the corresponding profit
of 132 which is the maximum.
7/28/2019 02 LP_Graphical Method Simplex Algorithm
12/44
12
TTN DoMS, IIT Madras, 17-Apr-13
Note: The graphical method, obviously, can
solve problems with just two variables.
The need, however, is for a method that can
solve problems of realistic size.
For this purpose, there exists a method called
the Simplex Algorithm developed by George.B.
Dantzig.
7/28/2019 02 LP_Graphical Method Simplex Algorithm
13/44
13
TTN DoMS, IIT Madras, 17-Apr-13
A few basic concepts must be learnt
before the algorithm is introduced.Basic Solution:
Consider the following set of equations :
7/28/2019 02 LP_Graphical Method Simplex Algorithm
14/44
14
TTN DoMS, IIT Madras, 17-Apr-13
There are four variables and two equations. Hencethis cannot be solved as simultaneous equations.
However, it is possible to find a set of solutions
called basic solutions which are obtained as follows
In the given system of equations, if we set the 'extra'
variables = 0, we can solve for the remaining
variables.
15
7/28/2019 02 LP_Graphical Method Simplex Algorithm
15/44
15
TTN DoMS, IIT Madras, 17-Apr-13
For instance, if we set
We get
This is called a basic solution.
We can see that there are as many as
solutions.Of these, the solutions that also satisfy the
non-negativity condition are called basic
feasible solutions
.
16
7/28/2019 02 LP_Graphical Method Simplex Algorithm
16/44
16
TTN DoMS, IIT Madras, 17-Apr-13
In general, if we have a system of m
equations with n variables (where n > m),
we can obtain basic solutions by setting
(n - m) variables = 0 and solving for the
remaining variables.
There will be basic solutions
17
7/28/2019 02 LP_Graphical Method Simplex Algorithm
17/44
17
TTN DoMS, IIT Madras, 17-Apr-13
Canonical form :
If there exists a system of equations such that
each equation has one variable with coefficient
of 1 in that equation and a coefficient of 0 in all
the other equations, such a system is said to be
in Canonical form.
The given system is seen to be in Canonicalform since satisfy this condition.
18
7/28/2019 02 LP_Graphical Method Simplex Algorithm
18/44
18
TTN DoMS, IIT Madras, 17-Apr-13
Other Definitions :
The variables that are set = 0 are callednon basic variables while the remaining
variables are called basic variables.
Now let us consider the same example:
19
7/28/2019 02 LP_Graphical Method Simplex Algorithm
19/44
19
TTN DoMS, IIT Madras, 17-Apr-13
Remove the inequalities and rewrite the constraints
as equations by introducing 'slack variables' are
shown below
This is a system of two equations with four variables.
Choose the variables in canonical form, i.e., asthe basic variables for the initial solution.
Rewrite the equations, expressing the basic variables interms of non-basic variables.
20
7/28/2019 02 LP_Graphical Method Simplex Algorithm
20/44
20
TTN DoMS, IIT Madras, 17-Apr-13
Both the non basic variables have positive
coefficients in the objective function and
hence have the potential to increase the
value of Z .
21
7/28/2019 02 LP_Graphical Method Simplex Algorithm
21/44
21
TTN DoMS, IIT Madras, 17-Apr-13
Let us now consider makingX1 a basic variable.
To do this, one of the existing basic variables must
become non basic since there can be only two basic
variables at any stage.
To find out which variable is to be replaced, we find
the maximum possible value forX1 in equations (1)
and (2).
22
7/28/2019 02 LP_Graphical Method Simplex Algorithm
22/44
22
TTN DoMS, IIT Madras, 17-Apr-13
23
7/28/2019 02 LP_Graphical Method Simplex Algorithm
23/44
23
TTN DoMS, IIT Madras, 17-Apr-13
Of these, only the lower value will satisfy both
the constraints. Hence
24
7/28/2019 02 LP_Graphical Method Simplex Algorithm
24/44
24
TTN DoMS, IIT Madras, 17-Apr-13
25
7/28/2019 02 LP_Graphical Method Simplex Algorithm
25/44
25
TTN DoMS, IIT Madras, 17-Apr-13
When we examine for the maximum possible
value ofX2 in (3) and (4), we see thatX3
displacesX4 as basic variable.
26
7/28/2019 02 LP_Graphical Method Simplex Algorithm
26/44
26
TTN DoMS, IIT Madras, 17-Apr-13
Here, the coefficients of both the non-
basic variables in the objective functionare negative.
Hence, there is no further scope forincreasing the value of Z. So the final
solution is
27
7/28/2019 02 LP_Graphical Method Simplex Algorithm
27/44
27
TTN DoMS, IIT Madras, 17-Apr-13
T.T. Narendran
Department of Management StudiesIndian Institute of Technology Madras
28
7/28/2019 02 LP_Graphical Method Simplex Algorithm
28/44
28
TTN DoMS, IIT Madras, 17-Apr-13
Simplex Algorithm : Tabular form
The algorithm explained above can be
implemented in a tabular form for greater
working convenience.
This form is also easier for coding and
automation purposes. The key features of the
tabular form are as follows:
29
7/28/2019 02 LP_Graphical Method Simplex Algorithm
29/44
29
TTN DoMS, IIT Madras, 17-Apr-13
Each variable is represented as column.
The corresponding coefficients appear in
the boxes of the table.
CB = Coefficient of Basic Variable in the
objective function
It can be seen that the tabular form is just
another way of representing the same set of
equations used above
30
7/28/2019 02 LP_Graphical Method Simplex Algorithm
30/44
30
TTN DoMS, IIT Madras, 17-Apr-13
31
7/28/2019 02 LP_Graphical Method Simplex Algorithm
31/44
31
TTN DoMS, IIT Madras, 17-Apr-13
The solution at this stage reads as
X3 = 60, X4 = 48, Z = 0
32
7/28/2019 02 LP_Graphical Method Simplex Algorithm
32/44
TTN DoMS, IIT Madras, 17-Apr-13
In the row Cj Zj , the positive coefficients for
the non basic variables X1
and X2
indicate that
the value of Z will increase if one of these
variables becomes a basic variable.
We choose X1to become the basic variable.This requires one of the existing basic
variables to become non basic.
In other words, X1is the entering variable. We
have to find the departing variable.
33
7/28/2019 02 LP_Graphical Method Simplex Algorithm
33/44
TTN DoMS, IIT Madras, 17-Apr-13
Now, evaluate the ratio bi / aij for all aij >0 in
this column.
The ratios are
60 / 4 = 15 and 48 / 2 = 24
The minimum ratio determines the departing
variable.
Hence, in this case X3 is the departing variable.
The coefficient 4 corresponding to this
operation is called thepivot.
34
7/28/2019 02 LP_Graphical Method Simplex Algorithm
34/44
TTN
DoMS, IIT Madras, 17-Apr-13
The next table is obtained by performing
the following operations.In the 'basis' column X1 replaces X3.
Divide the pivotal row
(4 2 1 0 | 60) by the pivot (4).
We get (1 0 | 15)
35
7/28/2019 02 LP_Graphical Method Simplex Algorithm
35/44
TTN
DoMS, IIT Madras, 17-Apr-13
To get the X4 row, do the following :
Multiply the new row just obtained by the
coefficient in the pivotal column (2). Weget (2 1 0 | 30)
Subtract corresponding elements from the
old X4 row. That is
36
7/28/2019 02 LP_Graphical Method Simplex Algorithm
36/44
TTN
DoMS, IIT Madras, 17-Apr-13
This constitutes the new X4 row in the
table. The Cj Zj row is evaluated as
follows :
Zj = CB aij
For example,Z2 = 8 () + 0 (3) = 4 and
C2-Z2 = 6-4 = 2
In this manner, all the values ofCj Zj are
computed
37
7/28/2019 02 LP_Graphical Method Simplex Algorithm
37/44
TTN
DoMS, IIT Madras, 17-Apr-13
38
7/28/2019 02 LP_Graphical Method Simplex Algorithm
38/44
TTN
DoMS, IIT Madras, 17-Apr-13
At the end of this iteration, the solution
reads as
X1 = 15, X4 = 18, Z = 120,
Since the X2 column in the Cj Zjrow shows
a positive value, we now bring in X2 as the
entering variable.
Proceeding as before, we find18 / 6 = 3 is less than 15 / () = 30
39
7/28/2019 02 LP_Graphical Method Simplex Algorithm
39/44
TTN
DoMS, IIT Madras, 17-Apr-13
Therefore, 3 is the pivot and X4 is the
departing variable.
The next table is obtained using the same
steps described earlier
40
7/28/2019 02 LP_Graphical Method Simplex Algorithm
40/44
TTN
DoMS, IIT Madras, 17-Apr-13
41
7/28/2019 02 LP_Graphical Method Simplex Algorithm
41/44
TTN
DoMS, IIT Madras, 17-Apr-13
Now the solution reads
X1 = 12, X2 = 6, Z = 132
The coefficients of the non basic variables in
the Cj Z
jrow are all non positive.
Therefore, there is no further scope for
increasing the value of Z.
Hence the algorithm stops at this stage. The
given solution is the optimal solution
42
7/28/2019 02 LP_Graphical Method Simplex Algorithm
42/44
TTN
DoMS, IIT Madras, 17-Apr-13
The steps involved in the simplex algorithm
are given below :
Rewrite inequalities as equations using slack
variables.
Set up L.P in tabular form.
Determine the entering variable as one with a
positive Cj Zjcoefficient ;
Generally, the variable with the maximum Cj
Zj ischosen as the entering variable though this is not a
strict criterion.
43
7/28/2019 02 LP_Graphical Method Simplex Algorithm
43/44
TTN
DoMS, IIT Madras, 17-Apr-13
Determine the departing variable as the row
in which the aij coefficient yields the
minimum positive bi / aij (aij >0).
The aij corresponding to the departing
variable is called the pivot.
In order to obtain the next table, perform the
following steps.
Divide the pivotal row throughout by thepivot.
44
7/28/2019 02 LP_Graphical Method Simplex Algorithm
44/44
Multiply this new row by coefficients in the
pivotal column and subtract the product from
the corresponding old row;
Repeat this process till the table is complete.
Check if there is any Cj
Zj > 0. If so, repeatsteps (3) - (7).
If not, read off the optimal solution from the
last table.
top related