Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CHAPTER-1 INTRODUCTION
1.1 Operation research
1.2 Assignment model
1.3 Transportation model
1.4 Assignment and transportation model
ASSIGNMENT MODEL
2.1 Objectives:
i.e. Balanced assignment problem: no. of. Rows = no. of. Columns.
Jobs
Persons 1 2 …… j …..n
. . . …… . ……
. . . …… . ……
. . . …… . ..…..
i Ci1 Ci2 …… Cij ....Cin
. . . …… . ……
. . . …… . ……
. . . …… . ……
n Cn1 Cn2 …… Cnj ....Cnn
n n
2) ∑Xij ; i = 1, 2,…..n. i.e. jth work will be done only one person.
j =1
2.5 DIFFERENT METHODS OF ASSIGNMENT
ASSIGNMENT PROBLEM
2.5.3TRANSPORTATION METHOD:
Theorem 1:
Theorem 2:
Subtract the minimum entry of each row from all the entries of the
respective row in the cost matrix.
A) Starting with first row of the matrix received in first step, examine
the row one by one until a row containing exactly one zero is found.
Then an experimental assignment indicated by – is marked to that
zero.
Now cross all the zeros in the column in which the assignment is
made. This procedure should be adopted for each row
assignment.
B) When the set of rows has been completely examined, an identical
procedure is applied successively to columns. Starting with column
1, examine all columns until a column containing exactly one zero is
found. Then make an experimental assignment in that position and
cross other zeros in the row which the assignment was made.
Continue these successive operations on rows and columns until
all zeros have either been assigned or crossed-out.
STEP 3:
DRAW OF MINIMUM LINES TO COVER ZEROS.
In order to cover all the zeros at least once you adopt the following
procedure.
i) Marks ( √ ) to all rows in which the assignment has not been done.
ii) See the position of zeros in marked ( √ ) row and mark ( √ ) to the
corresponding column.
iii) See the marked ( √ ) column and find the position of assigned zeros
and then mark ( √ ) to the corresponding rows which are not marked
till now.
iv) Repeat the procedure (ii) and (iii) till the completion of marking.
v) Draw the lines through unmarked rows and marked columns.
NOTE:
If the above method does not work then make arbitrary assignment and
then follow step iv.
STEP IV:
SELECT THE SMALLEST ELEMENT FROM THE UNCOVERED
ELEMENTS.
i) Subtract this smallest element from all those elements which are not
covered.
ii) Add this smallest to all those elements which are at the intersection
of two lines.
STEP V:
Thus we have increased the number of zeros. Now modify the matrix with
the help of step (ii) and find required assignment.
This procedure will be more clear by the following examples.
Four persons A, B,C and D are to be assigned four jobs 1, 2, 3 and 4.The cost
matrix is given as under, find the proper assignment.
Man
Jobs A B C D
1 8 10 17 9
2 3 8 5 6
3 10 12 11 9
4 6 13 9 7
Solution:
1. A) Row reduction:
Man
A B C D
Jobs
1 0 2 9 1
2 0 5 2 3
3 1 3 2 0
4 0 7 3 1
1 B) Column reduction
Man
Jobs A B C D
1 0 0 7 1
2 0 3 0 3
3 1 1 0 0
4 0 5 1 1
2 (A) and (B) Zero assignment:
Man
Jobs A B C D
1 ⊗ 0 7 1
2 ⊗ 3 0 3
3 1 1 ⊗ 0
4 0 5 1 0
In this way all the zeros are either crossed out or assigned. Also total assigned
zeros = 4 (i.e. Number of rows or columns) Thus, the assignment is optimal.
Example B:
There are five machines and five jobs are to be assigned and the
associated cost matrix is as follows. Find the proper assignment.
Machines
1 2 3 4 5
A 6 12 3 11 15
B 4 2 7 1 10
C 8 11 10 7 11
D 16 19 12 23 21
E 9 5 7 6 10
Jobs
Solution:
1 2 3 4 5
A 3 9 0 8 12
B 3 1 6 0 9
Jobs
C 1 4 3 0 4
D 4 7 0 11 9
E 4 0 2 1 5
1 2 3 4 5
A 2 9 0 8 8
B 2 1 6 0 5
Jobs
C 0 4 3 0 0
D 3 7 0 11 5
E 3 0 2 1 1
Step 2) Zero Assignment:
Machines
1 2 3 4 5
A 2 9 0 8 8
Jobs
B 2 1 6 0 5
From the last
table we see
C 0 4 3 ⊗ ⊗
that all the
zeros are either D 3 7 ⊗ 11 5
assigned or
crossed out, E 3 0 2 1 1
but the total number of assignment, i.e. 4 < 5 ( number of jobs to be assigned to
machines )
Therefore we have to follow step 3 and onwards as follows.
Step 3:
Machines
1 2 3 4 5
A 2 9 0 8 8
B 2 1 6 0 5
Jobs
C 0 4 3 ⊗ ⊗
D 3 7 ⊗ 11 5
E 3 0 2 1 1
Step 4:
Here, the smallest element among uncovered elements is 2.
i) Subtract 2 from all those elements which are not covered.
ii) Add 2 to those entries which are at the junction of two lines.
Machines
1 2 3 4 5
A 0 7 0 6 6
B 2 1 8 0 5
C 0 4 5 0 0
D 1 5 0 9 3
E 3 0 4 1 1
Jobs
Step 5:
Using step 2 again.
Machines
1 2 3 4 5
A 0 7 ⊗ 6 6
B 2 1 8 0 5
Jobs
C ⊗ 4 5 ⊗ 0
D 1 5 0 9 3
Thus, we
have got five E 3 0 4 1 1
assignments
as required
by the problem. The assignment is as follows.
A → 1, B → 4, C → 5, D → 3, E → 2.
This assignment holds for table given in step 4 but from theorem 1 it holds for
the original cost matrix.
The cost matrix the minimum cost = 6 + 1 + 11 + 12 + 5
= Rs 35.
As we are using the concept “opportunity” this means that the cost of
any opportunity that is lost while taking a particular decision or action is taken
into account while making assignment. Given below are the steps involved to
solve assignment problem by using Hungarian method
Step1
Determine the opportunity cost table
↓
Step 2
Determine the possibility of an optimal
assignment
↓
Step 3
Modify the second reduced cost table
↓
Step 4
Make the optimum assignment
Step 1:
Determine the opportunity cost table 1
• Locate the smallest cost in each row and subtract it from each cost
figure in that row. This would result in at least in each row. The new
table is called “reduced cost table”.
• Locate the lowest cost in each column of the reduced cost table subtract
this figure from each cost figure in that column. This would result in at
least one zero in each row and each column, in the second reduced cost
table.
Step 2:
Determine the possibility of an optimal assignment
• To make an optimal in a say 3×3 table. We should be in a position to
locate 3 zero’s in the table. Such that 3 jobs are assigned to 3 persons
and the total opportunity cost is zero. A very convenient way to
determine such an optimal assignment is as follows.
• Draw minimum number of straight lines vertical and horizontal, to cover
all the zero elements in the second reduced cost table. One cannot draw
a diagonal straight line. The aim is that number of lines (N) to cover all
the zero elements should be minimum. If the number of lines is equal to
the number of rows (or columns) (n) i.e. N =n it is possible to find
optimal assignment.
• Example: for a 3×3 assignment table we need 3 straight lines which
cover all the zero elements in the second reduced cost table. If the
number of lines is less than the number of rows (columns) N<n optimum
assignment cannot be made. We then move to the next step.
Step 3:
Modify the second reduced cost table:
• Select the smallest number in table which is not covered by the lines.
Subtract this number from all uncovered as well as from itself.
• Add this to the element which is at the intersection of any vertical and
horizontal lines.
• Draw minimum number of lines to cover all the zeros in the opportunity
cost table.
• If the number of straight lines at least equals number of rows (columns)
an optimum assignment is possible.
Step 4:
Make the optimum assignment:
If the assignment table is small in size it is easy to make assignment
after step 3. However, in case of large tables it is necessary to make
assignments systematically. So that the total cost is minimum. To decide
optimum allocation.
• Select a row or column in which there is only one zero element and
encircle it Assign the job corresponding to the zero element. Mark a X
in the cells of all other zeros lying in the column (row) of the encircled
zero. So that these zeros cannot for next assignment.
• Again select a row with one zero element from the remaining rows or
columns. Make the next assignment continue in this manner for all the
rows.
• Repeat the process till all the assignments are made i.e. no unmarked
zero is left.
• Now we will have one encircled zero in each row and each column of
the cost matrix. The assignment made in this manner is optimal.
• Calculate the total cost of assignment from the original given cost table.
This type of problem is quote simple but there is no general algorithm available
for its solution. The problem is usually solved by enumeration method, where
the number of enumeration is very large.
For example:
For a salesman who is instructed to visit five cities we shall have to
consider more than 100 possible routes. The method is therefore impractical for
large size problems and it also implies approximations in finding route with
minimum distance.
The peculiar nature of the problem and the various restrictions imposed
on resulting solution indicate that the method of solution to a traveling
salesman problem should include.
1) Assigning an infinitely large element M in the diagonal of the
distance matrix.
2) Solve the problem using Hungarian method as it gives shortcut route
but,
3) Test the solution for feasibility whether it satisfies the condition of a
continues route which visiting a city more than once.
If the route is not feasible, make adjustments with minimum increase in total
distance traveled by the salesman. This is how one can solve traveling
salesman problem.
Row reduction
Column reduction
Is Zero
assignmen
t possible?
Is zero
assignme
nt
possible?
SOLUTION
Add the elements of the
given matrix correspond to
each square
STOP
CHAPTER-3
CHAPTER-3
TRANSPORTATION MODEL
Transportation model is a special type of networks problems that for
shipping a commodity from source. (e.g. Factories) to destination (e.g.
Warehouse)
Transportation model deals with get the minimum cost plan to
transport a commodity from a number of sources (m) to number of
destination (n).
Let Si is the number of supply units required at source
i (I = 1, 2, ….n) dj is number of demand units required at destination
j(j = 1, 2, …..n) and Cij represent the unit transportation cost for
transporting the units from sources i to destination j.
Using linear programming method to solve transportation
problem, we determine the value of objective function which minimize
the cost for transporting and also determine the number of unit can be
transported from source i to destination j.
Let Xij is number of units shipped from source i to destination j
the equivalent linear programming model.
Minimize z = ∑∑CijXij
i =1 j =1
Subject to
n
∑Xij
j =1
= Si for i = 1, 2,…..m.
∑ Xij
i =1
= dj for j = 1, 2,……n.
And
Table-1
Warehouse Factory
→ WI W2 …… Wj …. Wn Capacities
Factory ↓
Warehouse
requirement b1 b2 …… bj …. bn ∑ ai = ∑ bj
Table-2
Warehouse Factory
→ W1 W2 …… WJ …. Wn Capacities
Factory ↓
Warehouse
requirements b1 b2 …… bj …. bn ∑ ∑
ai = bj
In general, Table 1 and Table 2 are combined by inserting each unit cost
Cij together with the corresponding amount Xij into the cell ( i, j ) . The
product Xij ( Cij ) gives the net cost of shipping Xij units from factory Fi
to warehouse Wj.
3.3 Definitions:
STEP 1:
STEP 2:
Start with the North West corner of the transportation tableau considers the
cell in the first column and first row. We have values a1 and b1 at the end on
the first row and column. i.e.) the availability at row one is a1 and requirement
of column 1 is b1.
ii) If a1 < b1 then put x1a1 and then b1 is satisfied. i.e.) assign b1 - a1
in the next row.
iii) If a1= b1 then put x1 = a1 and proceed diagonally to the next cell or
square determined by next row and next column.
The North West corner rule for initial allocation considers only the
requirements and availability of the goods. It does not take into account
shipping costs given in the tableau. It is therefore, not a very sound method
as it ignores the important factor, namely cost which we seek to minimize.
The VAM, on the other hand consider the cost in each cell while making
the allocations we explain below this method.
i) Consider each row of the cost matrix individually and find the
difference between two least cost cells in it. Then repeat this exercise
for each column. Identify the row or column with the largest
difference (select any one in case of a tie)
ii) Now consider the cell with minimum cost in that column (or row)
and assign the maximum units possible to that cell.
iv) Again find out the differences and proceeds in the same manner as
stated in earlier paragraph and continue until all units have been
assigned.
b) MINIMUM-COST METHOD(MCM):
ii) Next, the satisfied row or column is crossed out and the amounts of
supply and demand are adjusted accordingly.
iii) If both a row and column are satisfied simultaneously, only one is
crossed out, the same as in the North West corner method.
iv) The uncrossed-out cell with smallest unit cost and repeat the process
until exactly one row or column is left uncrossed out.
Row minimum method start with first row and choose the lowest cost
cell of first so that either the capacity of the first supply is exhausted or the
demand at jth distribution center is satisfied or both three cases arise.
ii) If the demand at jth distribution center is satisfied cross off the
jthcolumn and reconsider the first row with the remaining capacity.
iii) If the capacities of the first supply as well as the demand at jth
distribution center are completely satisfied, make a zero allocation in
the second lowest cost of the first row cross off the as well as jth
column and move down to the second row.
Continue the process for the reduced transportation table until all rim
conditions (supply and demand condition) are satisfied.
ii) If the capacity of ith supply is satisfied, cross off ith row and
reconsider the first column with the remaining demand.
Continue the process for the resulting reduced transportation table until all
the rim conditions are satisfied.
STEP 3:
Check for degeneracy.
STEP 4:
Test for optimality:
1. MODI METHOD.
1. MODI METHOD:
Various steps involved in solving any transportation problem
may be summarized in the following iterative procedure.
Step 1:
Find the initial basic feasible solution by using any of the five
methods discussed above.
Step 2:
Check the number of occupied cells. If there are less than m+n-1,
there exists degeneracy and we introduce a very small positive
assignment of ε (≈ 0) in suitable independent position, so that the
number of occupied cells is exactly equal to m+n-1.
Step 3:
For each occupied cell in the current solution, solve the system of
equations ui+vj= cij starting initially with some ui=0 or vj=0 and the
entering successively the values of ui and vj in the transportation table
margins.
Step 4:
Compute the net evaluations zij-cij = ui+vj- cij for all unoccupied
basic cells and enter them in the lower left corners of the corresponding
cells.
Step 5:
Examine the sign of each zij- cij. If all zij - cij≤ 0,then the current
basic feasible solution is an optimum one. If at least one zij- cij> 0, select
the unoccupied cell, having the largest positive net evaluation to enter
the basis.
Step 6:
Let the unoccupied cell ( r,s) enter the basis. Allocate an
unknown quantity, say θ , to the cell ( r,s). Identify a loop that starts and
ends at the cell ( r,s) and connects some of the basic cells. Add and
subtract interchangeably, θ to and from the transition cells of the loop
in such a way that the rim requirements remain satisfied.
Step 7:
Assign a maximum value to θ in such a way that the value or
one basic variable becomes zero and the other basic variables remain
non-negative. The basic cell whose allocation has been reduced to zero,
leaves the basis.
Step 8:
Return to step 3 and repeat the process until optimum basic
feasible solution has been obtained.
Step 1:
Find the initial basic feasible solution of the transportation
problem.
Step 2:
Check the number of occupied cells. If there are less than m+n-1,
there exists degeneracy and we introduce a very small quantity
∈ (→0) in suitable independent positions, so that the number of
occupied cells is exactly equal to m+n-1.
Step 3:
Compute improvement index for each of the unoccupied cells.
This is computed by calculating the opportunity cost of an unoccupied
cell. This means that if we shift one unit from a cell containing positive
shipment to the unoccupied cell. That will be the net cost. If all the
unoccupied cells have positive improvement index, than the given
solution is an optimum solution.
Step 4:
If there are several unoccupied cells with negative improvement
indices, then we select the cell having the largest negative improvement index
and shift the maximum possible units to that cell without violating the supply
and demand constraints. After it, again go to step 3.
Example 3.8.1:
Obtain IBFS to the following transportation problem using North West
corner rule.
D E F G Available
A 11 13 17 14 250
B 16 18 14 10 300
C 21 24 13 10 400
Solution:
D E F G
200 50 A
11 13 17 14 250\50
175 125
16 18 14 10
B
150 250
300\50
21 24 13 10
C 400/125
175 150
= Rs. 12,200.
Example 3.8.2:
Using minimum cost method
1 2 3 4 Supply
10 2 20 11 1
15
12 7 9 20
2
25
4 14 16 18
3
10
Demand 5 15 15 15 =50
Solution:
1 2 3 4 Supply
10 2 20 11 1
15 0 15/10/0
12 7 9 20
15 10 2
4 14 16 18 25/20/0
5 5
3 10/5/0
1 2 3 4 Supply
10 2 20 11
1 15
12 7 9 20
2
25
4 14 16 18
3
10
Demand 5 15 15 15 =50
Solution:
Step 1:
1 2 3 4 Supply Row
Penalty
10 2 20 11
1 15
10-2=8
12 7 9 20
2 25
9-7=2
4 14 16 18
5 3 10
14-4=10←
1 2 3 Supply Row
Penalty
2 20 11
1 15\0
15 11-2=9←
7 9 20
2 25 9-7=2
14 16 18
3 10\5
16-4=2
Demand 15 15 15 =50
Column
Penalty 7-2=5 16-9=7 18-11=7
Step 3:
1 2 Supply Row
Penalty
9 20
1 25\10 20-9=11←
15
16 18
Demand 15/0
15
Column
Penalty 16-9=7 20-18=2
1 2 3 4 Supply
10 2 20 11
1
15
12 7 9 20
2
4 14 16 18 25
3
10
Demand 5 15 15 15 =50
Solution:
1 2 3 4 Supply
10 2 20 11
1
15\0 15
12 7 9 20
2 5 15 5
25\20\5\0 4 14 16 18
5 10
3
10\0
1 2 3 4 Supply
10 2 20 11
1
15
12 7 9 20
2
25 4 14 16 18
3
10
Demand 5 15 15 15 =50
Solution:
1 2 3 4 Supply
10 2 20 11
1 15\0
15
12 7 9 20
2
15 10 25\10\0
4 14 16 18
5 5 3 10\5\0
Example 3.8.6:
Find the starting solution in the following transportation problem by Vogel’s
Approximation Method. Also obtain the optimum solution.
D1 D2 D3 D4 Supply
3 7 6 4 S1 5
2 4 3 2 S2 2
4 3 8 5 S3 3
Demand 3 3 2 2
Solution:
differences
3 2
(1) (1)
3 7 6 4 (1) 1
2 ∈1
(1) (2)
2 4 3 2 (2) _
3 ∈2
4 3 8 5 (1) (1)
(1) 1
Column
Differences (1) (1) 3 (2)
(1) (1) _ 2
(1) 4 _ (1)
1 _ _ (1)
Step 2:
From the initial basic feasible solution obtained in step 1. We observe that
unknown quantities ∈1, ∈2 (>0) have been allocated in the unoccupied cells
(2,4) and (3,4) respectively to overcome the danger of degeneracy.
Step 3:
u1 + v4 = c14 ⇒ u1 + 0 = 4 ⇒ u1 = 4
u2 + v4 = c24 ⇒ u2 + 0 = 2 ⇒ u2 =2
u3 + v4 = c34 ⇒ u3 + 0 = 5 ⇒ u3 =5
Given u1, u2 and u3 values of v1, v2, and v3 can be calculated as shown below
u1 + v1 =c11 ⇒ 4 + v1 = 3 ⇒ v1 = -1
u2 + v3 = c23⇒ 2 + v3 = 3 ⇒ v3 = 1
u3 + v2 = c32 ⇒ 5 + v2 = 3 ⇒ v2 = -2
Step 4:
The net evaluations for each of the unoccupied cells are now determined:
Step 5:
Since all zij –cij ≤ 0, the current basic feasible solution is an optimum one.
It is possible to present a more compact from for computing the unknown ui’s
and vj’s and then evaluate the net evaluation for each of the unoccupied cells in
a more convenient way by working in the transportation table margins:
D1 D2 D3 D4 ui
3 2
S1 4
3 -5 7 -1 6 4
2 ∈1
S2 2
-1 2 -4 4 3 2
3 ∈2
S3 5
0 4 3 -2 8 5
Vj -1 -2 1 0
x11 = 3, x14 =2, x23 =2, x24 =∈1, x32 = 3 and x34 =∈2.
3 × 3 + 2 × 4 + 2 × 3 + 2 × ∈1 + 3 × 3 + 5 × ∈2
Example 3.8.7:
A company has factories at F1, F2, and F3 which supply warehouse at W1, W2
and W3. Weekly factory capacities are 200, 160 and 90 units respectively.
Weekly warehouse requirements are 180, 120 and 150 units respectively. Unit
shipping costs ( in rupees ) are as follows.
Factory Warehouse Supply
W1 W2 W3
F1 16 20 12 200
F2 14 8 18 160
F3 26 24 16 90
Solution:
140 60
F1 200
16 20 12
40 120
F2 160
14 8 18
90
F3 90
26 24 16 Demand
180 120
150
The Stepping Stone method starts with an evaluation of each of the unoccupied
cells, viz., (F1, W2), (F2, W3), (F3, W1), (F3, W2) to examine weather it would
improve the initial solution by introducing any of these cells into the current
solution basis. To demonstrate the application of this method let us evaluate the
unoccupied cell (F1, W2) and assign θ units to be shipped from factory F1 to
warehouse W2 . Since the requirements of the warehouse must be satisfied, we
adjust the allocation of cell (F1, W1) by subtracting θ units from the initial
assignment of 140 units which decreases the cost by Rs. 16 per unit. In order to
make this adjustment and to satisfy the supply restriction at factories F1, we
subtract θ units from cell (F2, W2) and then θ units to cell (F2, W1). The
closed path followed in making these adjustments is given below:
By following the closed path and analyzing the unit shipment, we can compute
the incremental cost evaluation of unoccupied cell (F1, W2) as follows:
(F1, W2) +1 + 20 × 1
(F1, W1) -1 - 16 × 1
+ 10 Net
change
175
-θ
+
16 θ
20
40 120
140 60
+θ -θ +θ -θ
14 8
16 20 12
40 120
-θ +θ
14 8 18
Table 2 Table 3
This indicates that shift of 1 unit into unoccupied cell (F1, w2) increases the
transportation cost by Rs. 10. Obviously, cell (F1, W2) is not included in the
assignment. Let us compute the opportunity cost for one more unoccupied cell
(F2, W3). As before, we assign θ units (F2, W3) and make necessary
adjustments in cells (F1, W3), (F1, W1) and (F2, W1).The closed path associated
with this assignments is shown.
The change in cost is:
(18 × 1 -12 × 1 + 16 × 1 – 14 × 1), i.e. Rs. 8 per unit.
Since this route is more expensive than our initial solution, we shall not plan
any change based on this evaluation. We now evaluate the remaining
unoccupied cells (F3, W1) and (F3, W2). The path suggested for these is shown
below:
W1 W2 W3 W1 W2 W3
140 60 140 60
+
-θ θ F -θ +
16 20 1 16 20 θ
12 12
40 120 40 120
+θ -
14 8 18 F 14 θ 18
90 2 8
90
+θ -
26 24 θ +θ -θ
16 26 24 16
F
3
Table 4 Table 5
The closed path and an incremental cost change for each of unoccupied cells
are given below:
(F1, W2) (F1, W2) → (F2, W2) → (F2, W1) → (F1, W1) + 20 – 8 +14 -16
=10
(F2, W3) (F2, W3) → (F1, W3) → (F1, W1) → (F3,W1) + 18 – 12 + 16 -14=8
(F3, W1) (F3, W1) → (F3, W3) → (F1, W3) → (F1, W1) + 26 – 16 + 12
-16=6
(F3, W2) (F3, W2) → (F3, W3) → (F1, W3) → (F1, W1) + 24 – 16 + 12 – 16
Since, none of the unoccupied cells in the above table is associated with a
negative value, the total transportation costs will either remain the same or
increase if a shift of the unit is made to any one of the unoccupied cells. Hence,
the preceding table provides an optimum plan as follows: