|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Simplex Method |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Simplex Method - ExamplesDo you know how to divide, multiply, add, and subtract? Yes. Then there is a good news for you. About 50% of this technique you already know.
Now, open the door and windows of your
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
cj | 3 | 2 | 0 | 0 | 0 |
|
|---|---|---|---|---|---|---|---|
| cB | Basic variables B |
x1 | x2 | x3 | x4 | x5 | Solution values b (=XB) |
| 0 | x3 | -1 | 2 | 1 | 0 | 0 | 4 |
| 0 | x4 | 3 | 2 | 0 | 1 | 0 | 14 |
| 0 | x5 | 1 | -1 | 0 | 0 | 1 | 3 |
| zj-cj |
|
-3 | -2 | 0 | 0 | 0 |
|
a11 = -1, a12 = 2, a13 = 1, a14
= 0, a15 = 0, b1 = 4
a21 = 3, a22 = 2, a23 = 0, a24
= 1, a25 = 0, b2 = 14
a31= 1, a32 = -1, a33 = 0, a34
= 0, a35 = 1, b3 = 3
![]()
z1 c1 = (0 X (-1) + 0 X 3 + 0 X 1) - 3
= -3
z2 c2 = (0 X 2 + 0 X 2 + 0 X (-1)) - 2
= -2
z3 c3 = (0 X 1 + 0 X 0 + 0 X 0) - 0 = 0
z4 c4 = (0 X 0 + 0 X 1 + 0 X 0) - 0 = 0
z5 c5 = (0 X 0 + 0 X 0 + 0 X 1)
0 = 0
Choose the smallest negative value from zj cj
(i.e., 3). So column under x1 is the key column.
Now find out the minimum positive value
Minimum (14/3, 3/1) = 3
So row x5 is the key row.
Here, the pivot (key) element = 1 (the value at the point of intersection).
Therefore, x5 departs and x1 enters.
We obtain the elements of the next table using the following rules:
| New number= | old number- | (corresponding no. of key row)
x (corresponding no. of key column) ------------------------------------------------------------------------------ pivot element |
a11 = -1 1 X ((-1)/1) = 0
a12 = 2 (-1) X ((-1)/1) = 1
a13 = 1 0 X ((-1)/1) = 1
a14 = 0 0 X ((-1)/1) = 0
a15 = 0 1 X ((-1)/1) = 1
b1 = 4 3 X ((-1)/1) = 7
a21 = 3 1 X (3/1) = 0
a22 = 2 (-1) X (3/1) = 5
a23 = 0 0 X (3/1) = 0
a24 = 1 0 X (3/1) = 1
a25 = 0 1 X (3/1) = -3
b2 = 14 3 X (3/1) = 5
a31 = 1/1 = 1
a32 = -1/1 = -1
a33 = 0/1 = 0
a34 = 0/1 = 0
a35 = 1/1 = 1
b3 = 3/1 = 3
|
|
cj | 3 | 2 | 0 | 0 | 0 |
|
|---|---|---|---|---|---|---|---|
| cB | Basic variables B |
x1 | x2 | x3 | x4 | x5 | Solution values b (= XB) |
| 0 | x3 | 0 | 1 | 1 | 0 | 1 | 7 |
| 0 | x4 | 0 | 5 | 0 | 1 | -3 | 5 |
| 3 | x1 | 1 | -1 | 0 | 0 | 1 | 3 |
| zj-cj |
|
0 | -5 | 0 | 0 | 3 |
|
z1 c1 = (0 X 0 + 0 X 0 + 3 X 1) - 3 =
0
z2 c2 = (0 X 1 + 0 X 5 + 3 X (-1))
2 = -5
z3 c3 = (0 X 1 + 0 X 0 + 3 X 0) - 0
= 0
z4 c4 = (0 X 0 + 0 X 1 + 3 X 0) - 0 = 0
z5 c5 = (0 X 1 + 0 X (-3) + 3 X 1)
0 = 3
Key column = x2 column
Minimum (7/1, 5/5) = 1
Key row = x4 row
Pivot element = 5
x4 departs and x2 enters.
a11 = 0 0 X (1/5) = 0
a12 = 1 5 X (1/5) = 0
a13 = 1 0 X (1/5) = 1
a14 = 0 1 X (1/5) = -1/5
a15 = 1 (-3) X (1/5) = 8/5
b1 = 7 5 X (1/5) = 6
a21 = 0/5 = 0
a22 = 5/5 = 1
a23 = 0/5 = 0
a24 = 1/5
a25 = -3/5
b2 = 5/5 = 1
a31 = 1 0 X (-1/5) = 1
a32 = -1 5 X (-1/5) = 0
a33 = 0 0 X (-1/5) = 0
a34 = 0 1 X (-1/5) = 1/5
a35 = 1 (-3) X (-1/5) = 2/5
b3 = 3 5 X (-1/5) = 4
![]() |
Don't convert the fractions into decimals, because many fractions cancel out during the process while the conversion into decimals will cause unnecessary complications. |
|
|
cj | 3 | 2 | 0 | 0 | 0 |
|
|---|---|---|---|---|---|---|---|
| cB | Basic variables B |
x1 | x2 | x3 | x4 | x5 | Solution values b (= XB) |
| 0 | x3 | 0 | 0 | 1 | -1/5 | 8/5 | 6 |
| 2 | x2 | 0 | 1 | 0 | 1/5 | -3/5 | 1 |
| 3 | x1 | 1 | 0 | 0 | 1/5 | 2/5 | 4 |
| zj-cj |
|
0 | 0 | 0 | 1 | 0 |
|
Since all the values of zj cj
are positive, this is the optimal solution.
x1 = 4, x2 = 1
z = 3 X 4 + 2 X 1 = 14.
The largest profit of Rs.14 is obtained, when 1 unit of x2
and 4 units of x1 are produced. The above solution also indicates
that 6 units are still unutilized, as shown by the slack variable x3
in the XB column.
| Real life complex applications usually
involve hundreds of constraints and thousands of variables. So virtually
these problems can not be solved manually. For solving such problems,
you will have to rely on employing an electronic computer |