100% found this document useful (1 vote)
203 views

CHAPTER 3-Distribution Models

The document discusses distribution models, specifically transportation and assignment problems. It provides learning objectives and defines transportation and assignment problems. Transportation problems deal with shipments from sources to destinations to minimize costs, while assignment problems match candidates to positions. The document then provides an example transportation problem involving shipping coffee beans from warehouses to subsidiaries, formulates the problem as a linear program to minimize total shipping costs, and provides the optimal solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
203 views

CHAPTER 3-Distribution Models

The document discusses distribution models, specifically transportation and assignment problems. It provides learning objectives and defines transportation and assignment problems. Transportation problems deal with shipments from sources to destinations to minimize costs, while assignment problems match candidates to positions. The document then provides an example transportation problem involving shipping coffee beans from warehouses to subsidiaries, formulates the problem as a linear program to minimize total shipping costs, and provides the optimal solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

CHAPTER 3 – DISTRIBUTION MODELS

LEARNING OBJECTIVES
At the end of the lessons, the students are expected to:
1. formulate distribution models;
2. analyze and solve transportation problems; and
3. analyze and solve assignment problems.

Distribution Models
A distribution problem is a special type of linear programming problem. There are two
main types of distribution problems:
 Transportation Problem
 Assignment Problem

The transportation problem deals with shipments from number of sources to a number of
destinations while on the contrary, the assignment problem deals with finding the best one-to-one
match for each of a given number of viable candidates to variety of proposed “positions”. The
objective is to induce maximum reward or minimum cost.

Transportation Problem
Transportation problem deals with shipments (of materials, goods, people, etc.) from
a number of sources to a number of destinations. Every source has generally the restricted supply
and every destination has usually known demand. Unit shipping cost between each source and
destination is determined. The objective is to seek out a possible shipping schedule (shipped
quantities) with minimal total shipping cost. This model can also be used when a company is
deciding where to locate a new facility. Sensible monetary decisions regarding facility location
also attempt to minimize total transportation and production costs for the entire system.
If the total supply equals the total demand, the model is termed balanced transportation
model. In real-life situations the problem is usually unbalanced, i.e. the total demand exceeds the
total supply, or the total supply exceeds the total demand. Unbalanced models can be transformed
into balanced by introducing a dummy source or destination. Whereas shipments from a dummy
source correspond to unsatisfied requirements, shipments to a dummy destination represent
remains of suppliers.

Example #1
Star Coffee, Inc. operating in the Czech Republic is going to establish three subsidiaries
producing coffee. They should be located in following cities: Benešov, Jihlava and Tábor.
The main ingredient – coffee beans - will be supplied from two warehouses in Humpolec
and Pelhřimov (see Figure 1).

Fig.1 Star Coffee’s Distribution Problem


The management of the corporation has estimated the weekly requirements of the
companies. The warehouses’ capacities are limited. Coffee beans are transported once a week
from suppliers to destinations by train and it is possible to evaluate a unit shipping cost per ton.
All the values are given in the following table:

Destination Weekly
Benešov Jihvala Tábor Supply [t]
Warehouse
Humpolec 330 250 350 70
Pelhřimov 300 240 250 80
Weekly 150
Demand [t] 45 60 35 140
Tab. 1 Supply, Demand and Unit Shipping Cost
The objective is to ascertain such deliveries from warehouses to destinations that minimize
the total shipping value. This shipping schedule must satisfy the requirement of each
destination, and should not exceed supply of any warehouse.

Formulation

As it is apparent from Table 1 the problem is unbalanced - total demand (140 tons) is less
than the total supply (150 tons). The balanced model can be obtained after introducing a dummy
destination with demand 10 tons (computed as the difference between the values 150 and 140):

Destination Weekly
Benešov Jihvala Tábor
Dummy Supply [t]
Warehouse
Humpolec 330 250 350 0 70
Pelhřimov 300 240 250 0 80
Weekly 150
Demand [t] 45 60 35 10 150
Tab. 1.2 Balanced Transportation Model

Since the dummy destination does not exist, no physical shipping occurs and therefore
all the corresponding unit transportation costs equal zeroes.

1. Define the decision variables

In distribution models, it is reasonable to define the variables with two indices (generally
xij). In case of transportation model the variable xij corresponds to the amount transported from
the source i to the destination j.

x11 = amount of potatoes transported from Humpolec to Benešov [in tons],


x12 = amount of potatoes transported from Humpolec to Jihlava,

x13 = amount of potatoes transported from Humpolec to Tábor,


x14 = amount of potatoes remaining in Humpolec.
x21 = amount of potatoes transported from Pelhřimov to
Benešov, x22 = amount of potatoes transported from Pelhřimov
to Jihlava, x23 = amount of potatoes transported from Pelhřimov
to Tábor, x24 = amount of potatoes remaining in Pelhřimov.

2. The objective is to minimize the total shipping cost

If parameter cij is generally a unit shipping cost corresponding to the source i and the
destination j, then cij xij is the total shipping cost. If we evaluate the total shipping cost
corresponding to all the sources and destinations, their sum gives the total shipping cost for our
transportation problem. Thus, the objective function can be expressed as follows:

Minimize z = 330x11 + 250x12 + 350x13 + 300x21 + 240x32 + 250x33 .

3. The constraints

Real shipping must not exceed supply of warehouses and must satisfy demand
of destinations. In the example, there are 6 constraints:
x1

1 + x12 + x13 + x14 = 70


x + x22 + x23 + x24
21 = 80
x1

1 + x21 = 45
x
12 + x22 = 60
x
13 + x23 = 35
x + x24
14 = 10

4. The nonnegativity constraints


x11 , x12 , ..., x24 ≥ 0 .

Optimal Solution
Table 1.3 shows the optimal solution. Every week, 60 tons is delivered from Humpolec
to Jihlava. From Pelhřimov, 45 tons are transported to Benešov and 35 tons to Tábor. This
shipping schedule minimizes the total weekly cost at the level 37 250 CZK. In Humpolec, 10
tons remain. This amount can be used for another purpose or the management should consider
increase in the production of the subsidiaries.

Destination Benešov Jihlava Tábor Dummy Weekly


Warehouse Supply [t]

Humpolec - 60 - 10 70

Pelhřimov 45 - 35 - 80

Weekly 150
Demand [t] 45 60 35 10 150

Tab. 1.3 Optimal Solution – Transported Amount


Initial solution - Northwest Corner Rule

The initial basic possible solution can be obtained by using Northwest Corner Rule. The
procedure for constructing an initial basic feasible solution selects the basic variables one at a time.
The method begins with an allocation at the top left-hand corner of the tableau and proceeds
systematically along either a row or a column and make allocations to subsequent cells until the
bottom right-hand corner is reached, by which time enough allocations will have been made to
constitute an initial solution. The procedure for constructing an initial solution using the North
West Corner rule is as follows:

North-West Corner Method (NWCM) Steps (Rule)


Step-1: Select the upper left corner cell of the transportation matrix and allocate min(s1,
d1).
Step-2: a. Subtract this value from supply and demand of respective row and column.

b. If the supply is 0, then cross (strike) that row and move down to the next cell.

c. If the demand is 0, then cross (strike) that column and move right to the next
cell.

d. If supply and demand both are 0, then cross (strike) both row & column and
move diagonally to the next cell.
Step-3: Repeat this steps until all supply and demand values are 0.
Example-2
1. Find Solution using North-West Corner method

D1 D2 D3 D4 Supply
S1 19 30 50 10 7
S2 70 30 40 60 9
S3 40 8 70 20 18
Demand 5 8 7 14

Solution:
TOTAL number of supply constraints : 3
TOTAL number of demand constraints : 4
Problem Table is

D1 D2 D3 D4 Supply
S1 19 30 50 10 7
S2 70 30 40 60 9
S3 40 8 70 20 18

Demand 5 8 7 14

The rim values for 𝑆1=7 and 𝐷1=5 are compared.


The smaller of the two i.e. min(7,5) = 5 is assigned to 𝑆1 𝐷1
This meets the complete demand of 𝐷1 and leaves 7 - 5 = 2 units with 𝑆1
Table-1
D1 D2 D3 D4 Supply
S1 19(5) 30 50 10 2
S2 70 30 40 60 9
S3 40 8 70 20 18

Demand 0 8 7 14

The rim values for 𝑆1=2 and 𝐷2=8 are compared.


The smaller of the two i.e. min(2,8) = 2 is assigned to 𝑆1𝐷2
This exhausts the capacity of 𝑆1 and leaves 8 - 2 = 6 units with 𝐷2
Table-2

D1 D2 D3 D4 Supply
S1 19(5) 30(2) 50 10 0
S2 70 30 40 60 9
S3 40 8 70 20 18

Demand 0 6 7 14

The rim values for 𝑆2=9 and 𝐷2=6 are compared.


The smaller of the two i.e. min(9,6) = 6 is assigned to 𝑆2 𝐷2
This meets the complete demand of 𝐷2 and leaves 9 - 6 = 3 units with 𝑆2
Table-3
D1 D2 D3 D4 Supply
S1 19(5) 30(2) 50 10 0
S2 70 30(6) 40 60 3
S3 40 8 70 20 18

Demand 0 0 7 14

The rim values for 𝑆2=3 and 𝐷3=7 are compared.


The smaller of the two i.e. min(3,7) = 3 is assigned to 𝑆2 𝐷3
This exhausts the capacity of 𝑆2 and leaves 7 - 3 = 4 units with 𝐷3
Table-4

D1 D2 D3 D4 Supply
S1 19(5) 30 (2) 50 10 0
S2 70 30(6) 40(3) 60 0
S3 40 8 70 20 18

Demand 0 0 4 14

The rim values for 𝑆3=18 and 𝐷3=4 are compared.


The smaller of the two i.e. min(18,4) = 4 is assigned to 𝑆3 𝐷3
This meets the complete demand of 𝐷3 and leaves 18 - 4 = 14 units with 𝑆3
Table-5

D1 D2 D3 D4 Supply
S1 19(5) 30(2) 50 10 0
S2 70 30(6) 40(3) 60 0
S3 40 8 70(4) 20 14

Demand 0 0 0 14

The rim values for 𝑆3=14 and 𝐷4=14 are compared.


The smaller of the two i.e. min(14,14) = 14 is assigned to 𝑆3 𝐷4
Table-6

D1 D2 D3 D4 Supply
S1 19(5) 30(2) 50 10 0
S2 70 30(6) 40(3) 60 0
S3 40 8 70 (4) 20(14) 0

Demand 0 0 0 0

Initial feasible solution is

D1 D2 D3 D4 Supply
S1 19 (5) 30 (2) 50 10 7
S2 70 30 (6) 40 (3) 60 9
S3 40 8 70 (4) 20 (14) 18

Demand 5 8 7 14

The minimum total transportation cost =19×5+30×2+30×6+40×3+70×4+20×14=1015

Here, the number of allocated cells = 6 is equal to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is non-degenerate
Least Cost Method Rule

The Least Cost Method is another method used to acquire the initial feasible solution for
the transportation problem. Using this, the allocation begins with the cell which has the minimum
cost. The lower cost cells are selected over the higher-cost cell with the objective to have the least
cost of transportation.

Least Cost Method (LCM) Steps (Rule)


Step-1: Select the cell having minimum unit cost cij and allocate as much as possible,
i.e. min(si,dj).
Step-2: a. Subtract this min value from supply si and demand dj.

b. If the supply si is 0, then cross (strike) that row and If the demand dj is 0 then
cross (strike) that column.

c. If min unit cost cell is not unique, then select the cell where maximum allocation
can be possible

Step-3: Repeat this steps for all uncrossed (unstriked) rows and columns until all supply
and demand values are 0.

Stepping Stone method

The next step is determining whether the present allocation at any stage of the solution
process is ideal. The Stepping Stone method originates its name from the analogy of crossing a
pond using stepping stones. The occupied cells are analogous to the stepping stones, which are
used in making certain movements in this method. The Stepping Stone Method is used to check
the optimality of the initial feasible solution and a process for finding the potential of any non-
basic variables (empty cells) in terms of the objective function

The five steps of the Stepping-Stone Method are as follows:

Stepping Stone method

Step-1: Select an unused square to be evaluated.


Step-2: Beginning at this square, trace a closed path back to the original square via squares
that are currently being used (only horizontal or vertical moves allowed). You can
only change directions at occupied cells

Step-3: Beginning with a plus (+) sign at the unused square, place alternative minus (-)
signs and plus signs on each corner square of the closed path just traced.

Step-4: Calculate an improvement index, Iij by adding together the unit cost figures found
in each square containing a plus sign and then subtracting the unit costs in each
square containing a minus sign.
Step-5: Repeat steps 1 to 4 until an improvement index has been calculated for all unused
squares.

• If all indices computed are greater than or equal to zero, an optimal solution has
been reached.

• If not, it is possible to improve the current solution and decrease total shipping
costs.

Example-1
Find Solution using Voggel's Approximation method, also find optimal solution using stepping
stone method

D1 D2 D3 D4 Supply
S1 19 30 50 10 7
S2 70 30 40 60 9
S3 40 8 70 20 18
Demand 5 8 7 14

Solution:
TOTAL number of supply constraints : 3
TOTAL number of demand constraints : 4
Problem Table is

D1 D2 D3 D4 Supply
S1 19 30 50 10 7
S2 70 30 40 60 9
S3 40 8 70 20 18

Demand 5 8 7 14

Table-1

D1 D2 D3 D4 Supply Row Penalty


S1 19 30 50 10 7 9=19-10
S2 70 30 40 60 9 10=40-30
S3 40 8 70 20 18 12=20-8

Demand 5 8 7 14
Column
21=40-19 22=30-8 10=50-40 10=20-10
Penalty

The maximum penalty, 22, occurs in column 𝐷2.


The minimum 𝑐𝑖𝑗 in this column is 𝑐32 = 8.
The maximum allocation in this cell is min(18,8) = 8.
It satisfy demand of 𝐷2 and adjust the supply of 𝑆3 from 18 to 10 (18 - 8 = 10).

Table-2

D1 D2 D3 D4 Supply Row Penalty


S1 19 30 50 10 7 9=19-10
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20 10 20=40-20

Demand 5 0 7 14
Column
21=40-19 -- 10=50-40 10=20-10
Penalty

The maximum penalty, 21, occurs in column D1.


The minimum 𝑐𝑖𝑗 in this column is 𝑐11 = 19.
The maximum allocation in this cell is min(7,5) = 5.
It satisfy demand of 𝐷1 and adjust the supply of 𝑆1 from 7 to 2 (7 - 5 = 2).

Table-3

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10 2 40=50-10
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20 10 50=70-20

Demand 0 0 7 14
Column
-- -- 10=50-40 10=20-10
Penalty

The maximum penalty, 50, occurs in row S3.


The minimum 𝑐𝑖𝑗 in this row is 𝑐34 = 20.
The maximum allocation in this cell is min(10,14) = 10.
It satisfy supply of 𝑆3 and adjust the demand of 𝐷4 from 14 to 4 (14 - 10 = 4).
Table-4

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10 2 40=50-10
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20(10) 0 --

Demand 0 0 7 4
Column
-- -- 10=50-40 50=60-10
Penalty

The maximum penalty, 50, occurs in column 𝐷4.


The minimum 𝑐𝑖𝑗 in this column is 𝑐14 = 10.

The maximum allocation in this cell is min(2,4) = 2.


It satisfy supply of 𝑆1 and adjust the demand of 𝐷4from 4 to 2 (4 - 2 = 2).

Table-5

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10(2) 0 --
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20(10) 0 --

Demand 0 0 7 2
Column
-- -- 40 60
Penalty

The maximum penalty, 60, occurs in column 𝐷4.


The minimum 𝑐𝑖𝑗 in this column is 𝑐24 = 60.
The maximum allocation in this cell is min(9,2) = 2.
It satisfy demand of 𝐷4 and adjust the supply of 𝑆2 from 9 to 7 (9 - 2 = 7).

Table-6

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10(2) 0 --
S2 70 30 40 60(2) 7 40
S3 40 8(8) 70 20(10) 0 --

Demand 0 0 7 0
Column
-- -- 40 --
Penalty

The maximum penalty, 40, occurs in row 𝑆2.


The minimum 𝑐𝑖𝑗 in this row is 𝑐23 = 40.
The maximum allocation in this cell is min(7,7) = 7.
It satisfy supply of 𝑆2 and demand of 𝐷3.

Initial feasible solution is

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10(2) 7 9 | 9 | 40 | 40 | -- | -- |
S2 70 30 40(7) 60(2) 9 10 | 20 | 20 | 20 | 20 | 40 |
S3 40 8(8) 70 20(10) 18 12 | 20 | 50 | -- | -- | -- |

Demand 5 8 7 14
21 22 10 10
21 -- 10 10
Column -- -- 10 10
Penalty -- -- 10 50
-- -- 40 60
-- -- 40 --

The minimum total transportation cost =19×5+10×2+40×7+60×2+8×8+20×10=779

Here, the number of allocated cells = 6 is equal to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is non-degenerate

Optimality test using stepping stone method...


Allocation Table is

D1 D2 D3 D4 Supply
S1 19 (5) 30 50 10 (2) 7
S2 70 30 40 (7) 60 (2) 9
S3 40 8 (8) 70 20 (10) 18

Demand 5 8 7 14
Iteration-1 of optimality test

1. Create closed loop for unoccupied cells, we get

Unoccupied cell Closed path Net cost change


S1D2 S1D2→S1D4→S3D4→S3D2 30 - 10 + 20 - 8 = 32
S1D3 S1D3→S1D4→S2D4→S2D3 50 - 10 + 60 - 40 = 60
S2D1 S2D1→S2D4→S1D4→S1D1 70 - 60 + 10 - 19 = 1
S2D2 S2D2→S2D4→S3D4→S3D2 30 - 60 + 20 - 8 = -18
S3D1 S3D1→S3D4→S1D4→S1D1 40 - 20 + 10 - 19 = 11
S3D3 S3D3→S3D4→S2D4→S2D3 70 - 20 + 60 - 40 = 70

2. Select the unoccupied cell having the highest negative net cost change i.e. cell S2D2=-18.
and draw a closed path from S2D2.
Closed path is S2D2→ S2D4→ S3D4→ S3D2
Closed path and plus/minus allocation for current unoccupied cell S2D2

D1 D2 D3 D4 Supply
S1 19 (5) 30 [32] 50 [60] 10 (2) 7
S2 70 [1] 30 [-18] (+) 40 (7) 60 (2) (-) 9
S3 40 [11] 8 (8) (-) 70 [70] 20 (10) (+) 18

Demand 5 8 7 14

3. Minimum allocated value among all negative position (-) on closed path = 2
Subtract 2 from all (-) and Add it to all (+)

D1 D2 D3 D4 Supply
S1 19 (5) 30 50 10 (2) 7
S2 70 30 (2) 40 (7) 60 9
S3 40 8 (6 70 20 (12) 18

Demand 5 8 7 14

4. Repeat the step 1 to 3, until an optimal solution is obtained.


Iteration-2 of optimality test
1. Create closed loop for unoccupied cells, we get

Unoccupied
Closed path Net cost change
cell
S1D2 S1D2→S1D4→S3D4→S3D2 30 - 10 + 20 - 8 = 32
S1D3→S1D4→S3D4→S3D2→S2D2→S2 50 - 10 + 20 - 8 + 30 - 40 =
S1D3
D3 42
S2D1→S2D2→S3D2→S3D4→S1D4→S1 70 - 30 + 8 - 20 + 10 - 19 =
S2D1
D1 19
S2D4 S2D4→S2D2→S3D2→S3D4 60 - 30 + 8 - 20 = 18
S3D1 S3D1→S3D4→S1D4→S1D1 40 - 20 + 10 - 19 = 11
S3D3 S3D3→S3D2→S2D2→S2D3 70 - 8 + 30 - 40 = 52

Since all net cost change ≥0


So final optimal solution is arrived.

D1 D2 D3 D4 Supply
S1 19 (5) 30 50 10 (2) 7
S2 70 30 (2) 40 (7) 60 9
S3 40 8 (6 70 20 (12) 18

Demand 5 8 7 14

The minimum total transportation cost =19×5+10×2+30×2+40×7+8×6+20×12=743

Modified Distribution Method


The modified distribution method, is also known as MODI method or (u - v) method
provides a minimum cost solution to the transportation problems. MODI method is an
improvement over stepping stone method. This model studies the minimization of the cost of
transporting a commodity from a number of sources to several destinations. The supply at each
source and the demand at each destination are known. The objectives are to develop and review
an integral transportation schedule that meets all demands from the inventory at a minimum total
transportation cost.

The concept of MODI can be further comprehended through an illustration given below:

MODI Method Steps (Rule)


Step-1: Find an initial basic feasible solution using any one of the three methods
NWCM, LCM or VAM.
Step-2: Find ui and vj for rows and columns. To start

a. assign 0 to ui or vj where maximum number of allocation in a row or column


respectively.

b. Calculate other ui's and vj's using cij=ui+vj, for all occupied cells.
Step-3: For all unoccupied cells, calculate dij=cij-(ui+vj), .
Step-4: Check the sign of dij

a. If dij>0, then current basic feasible solution is optimal and stop this
procedure.

b. If dij=0 then alternative soluion exists, with different set allocation and same
transportation cost. Now stop this procedure.

b. If dij<0, then the given solution is not an optimal solution and further
improvement in the solution is possible.
Step-5: Select the unoccupied cell with the largest negative value of dij, and included in
the next solution.
Step-6: Draw a closed path (or loop) from the unoccupied cell (selected in the previous
step). The right angle turn in this path is allowed only at occupied cells and at
the original unoccupied cell. Mark (+) and (-) sign alternatively at each corner,
starting from the original unoccupied cell.
Step-7: 1. Select the minimum value from cells marked with (-) sign of the closed path.

2. Assign this value to selected unoccupied cell (So unoccupied cell becomes
occupied cell).

3. Add this value to the other occupied cells marked with (+) sign.

4. Subtract this value to the other occupied cells marked with (-) sign.
Step-8: Repeat Step-2 to step-7 until optimal solution is obtained. This procedure stops
when all dij≥0 for unoccupied cells.

Example-1
Find Solution using Voggel's Approximation method, also find optimal solution using MODI
method

D1 D2 D3 D4 Supply
S1 19 30 50 10 7
S2 70 30 40 60 9
S3 40 8 70 20 18
Demand 5 8 7 14

Solution:
TOTAL number of supply constraints : 3
TOTAL number of demand constraints : 4
Problem Table is

D1 D2 D3 D4 Supply
S1 19 30 50 10 7
S2 70 30 40 60 9
S3 40 8 70 20 18

Demand 5 8 7 14

Table-1

D1 D2 D3 D4 Supply Row Penalty


S1 19 30 50 10 7 9=19-10
S2 70 30 40 60 9 10=40-30
S3 40 8 70 20 18 12=20-8

Demand 5 8 7 14
Column
21=40-19 22=30-8 10=50-40 10=20-10
Penalty

The maximum penalty, 22, occurs in column 𝐷2.


The minimum 𝑐𝑖𝑗 in this column is 𝑐32 = 8.
The maximum allocation in this cell is min(18,8) = 8.
It satisfy demand of 𝐷2 and adjust the supply of 𝑆3 from 18 to 10 (18 - 8 = 10).

Table-2

D1 D2 D3 D4 Supply Row Penalty


S1 19 30 50 10 7 9=19-10
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20 10 20=40-20

Demand 5 0 7 14
Column
21=40-19 -- 10=50-40 10=20-10
Penalty
The maximum penalty, 21, occurs in column 𝐷1.
The minimum 𝑐𝑖𝑗 in this column is 𝑐11 = 19.
The maximum allocation in this cell is min(7,5) = 5.
It satisfy demand of 𝐷1 and adjust the supply of 𝑆1 from 7 to 2 (7 - 5 = 2).

Table-3

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10 2 40=50-10
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20 10 50=70-20

Demand 0 0 7 14
Column
-- -- 10=50-40 10=20-10
Penalty

The maximum penalty, 50, occurs in row 𝑆3.


The minimum 𝑐𝑖𝑗 in this row is 𝑐34 = 20.
The maximum allocation in this cell is min(10,14) = 10.
It satisfy supply of 𝑆3 and adjust the demand of 𝐷4 from 14 to 4 (14 - 10 = 4).

Table-4

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10 2 40=50-10
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20(10) 0 --

Demand 0 0 7 4
Column
-- -- 10=50-40 50=60-10
Penalty

The maximum penalty, 50, occurs in column 𝐷4.


The minimum 𝑐𝑖𝑗 in this column is 𝑐14 = 10.
The maximum allocation in this cell is min(2,4) = 2.
It satisfy supply of 𝑆1 and adjust the demand of 𝐷4 from 4 to 2 (4 - 2 = 2).

Table-5

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10(2) 0 --
S2 70 30 40 60 9 20=60-40
S3 40 8(8) 70 20(10) 0 --

Demand 0 0 7 2
Column
-- -- 40 60
Penalty

The maximum penalty, 60, occurs in column 𝐷4.


The minimum 𝑐𝑖𝑗 in this column is 𝑐24 = 60.
The maximum allocation in this cell is min(9,2) = 2.
It satisfy demand of 𝐷4 and adjust the supply of 𝑆2 from 9 to 7 (9 - 2 = 7).

Table-6

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10(2) 0 --
S2 70 30 40 60(2) 7 40
S3 40 8(8) 70 20(10) 0 --

Demand 0 0 7 0
Column
-- -- 40 --
Penalty

The maximum penalty, 40, occurs in row 𝑆2.


The minimum 𝑐𝑖𝑗 in this row is 𝑐23 = 40.

The maximum allocation in this cell is min(7,7) = 7.


It satisfies supply of 𝑆2 and demand of 𝐷3.

Initial feasible solution is

D1 D2 D3 D4 Supply Row Penalty


S1 19(5) 30 50 10(2) 7 9 | 9 | 40 | 40 | -- | -- |
S2 70 30 40(7) 60(2) 9 10 | 20 | 20 | 20 | 20 | 40 |
S3 40 8(8) 70 20(10) 18 12 | 20 | 50 | -- | -- | -- |

Demand 5 8 7 14
21 22 10 10
21 -- 10 10
Column -- -- 10 10
Penalty -- -- 10 50
-- -- 40 60
-- -- 40 --

The minimum total transportation cost =19×5+10×2+40×7+60×2+8×8+20×10=779

Here, the number of allocated cells = 6 is equal to m + n - 1 = 3 + 4 - 1 = 6


∴ This solution is non-degenerate

Optimality test using MODI method


Allocation Table is

D1 D2 D3 D4 Supply
S1 19 (5) 30 50 10 (2) 7
S2 70 30 40 (7) 60 (2) 9
S3 40 8 (8) 70 20 (10) 18

Demand 5 8 7 14

Iteration-1 of optimality test


1. Find ui and vj for all occupied cells(i,j), where cij=ui+vj

1. Substituting, v4=0, we get


2.c14=u1+v4⇒u1=c14-v4⇒u1=10-0⇒u1=10
3.c11=u1+v1⇒v1=c11-u1⇒v1=19-10⇒v1=9
4.c24=u2+v4⇒u2=c24-v4⇒u2=60-0⇒u2=60
5.c23=u2+v3⇒v3=c23-u2⇒v3=40-60⇒v3=-20
6.c34=u3+v4⇒u3=c34-v4⇒u3=20-0⇒u3=20
7.c32=u3+v2⇒v2=c32-u3⇒v2=8-20⇒v2=-12

D1 D2 D3 D4 Supply ui
S1 19 (5) 30 50 10 (2) 7 u1=10
S2 70 30 40 (7) 60 (2) 9 u2=60
S3 40 8 (8) 70 20 (10) 18 u3=20

Demand 5 8 7 14
vj v1=9 v2=-12 v3=-20 v4=0
2. Find dij for all unoccupied cells(i,j), where dij=cij-(ui+vj)

1.d12=c12-(u1+v2)=30-(10-12)=32
2.d13=c13-(u1+v3)=50-(10-20)=60
3.d21=c21-(u2+v1)=70-(60+9)=1
4.d22=c22-(u2+v2)=30-(60-12)=-18
5.d31=c31-(u3+v1)=40-(20+9)=11
6.d33=c33-(u3+v3)=70-(20-20)=70

D1 D2 D3 D4 Supply ui
S1 19 (5) 30 [32] 50 [60] 10 (2) 7 u1=10
S2 70 [1] 30 [-18] 40 (7) 60 (2) 9 u2=60
S3 40 [11] 8 (8) 70 [70] 20 (10) 18 u3=20

Demand 5 8 7 14
vj v1=9 v2=-12 v3=-20 v4=0

3. Now choose the minimum negative value from all dij (opportunity cost) = d22 = [-18]
and draw a closed path from S2D2.
Closed path is S2D2→S2D4→S3D4→S3D2
Closed path and plus/minus sign allocation...

D1 D2 D3 D4 Supply ui
S1 19 (5) 30 [32] 50 [60] 10 (2) 7 u1=10
S2 70 [1] 30 [-18] (+) 40 (7) 60 (2) (-) 9 u2=60
S3 40 [11] 8 (8) (-) 70 [70] 20 (10) (+) 18 u3=20

Demand 5 8 7 14
vj v1=9 v2=-12 v3=-20 v4=0

4. Minimum allocated value among all negative position (-) on closed path = 2
Substract 2 from all (-) and Add it to all (+)

D1 D2 D3 D4 Supply
S1 19 (5) 30 50 10 (2) 7
S2 70 30 (2) 40 (7) 60 9
S3 40 8 (6 70 20 (12) 18

Demand 5 8 7 14
5. Repeat the step 1 to 4, until an optimal solution is obtained.

Iteration-2 of optimality test


1. Find ui and vj for all occupied cells(i,j), where cij=ui+vj

1. Substituting, u1=0, we get


2.c11=u1+v1⇒v1=c11-u1⇒v1=19-0⇒v1=19
3.c14=u1+v4⇒v4=c14-u1⇒v4=10-0⇒v4=10
4.c34=u3+v4⇒u3=c34-v4⇒u3=20-10⇒u3=10
5.c32=u3+v2⇒v2=c32-u3⇒v2=8-10⇒v2=-2
6.c22=u2+v2⇒u2=c22-v2⇒u2=30+2⇒u2=32
7.c23=u2+v3⇒v3=c23-u2⇒v3=40-32⇒v3=8

D1 D2 D3 D4 Supply ui
S1 19 (5) 30 50 10 (2) 7 u1=0
S2 70 30 (2) 40 (7) 60 9 u2=32
S3 40 8 (6) 70 20 (12) 18 u3=10

Demand 5 8 7 14
vj v1=19 v2=-2 v3=8 v4=10

2. Find dij for all unoccupied cells(i,j), where dij=cij-(ui+vj)

1.d12=c12-(u1+v2)=30-(0-2)=32
2.d13=c13-(u1+v3)=50-(0+8)=42
3.d21=c21-(u2+v1)=70-(32+19)=19
4.d24=c24-(u2+v4)=60-(32+10)=18
5.d31=c31-(u3+v1)=40-(10+19)=11
6.d33=c33-(u3+v3)=70-(10+8)=52

D1 D2 D3 D4 Supply ui
S1 19 (5) 30 [32] 50 [42] 10 (2) 7 u1=0
S2 70 [19] 30 (2) 40 (7) 60 [18] 9 u2=32
S3 40 [11] 8 (6) 70 [52] 20 (12) 18 u3=10

Demand 5 8 7 14
vj v1=19 v2=-2 v3=8 v4=10

Since all dij≥0.


So final optimal solution is arrived.
D1 D2 D3 D4 Supply
S1 19 (5) 30 50 10 (2) 7
S2 70 30 (2) 40 (7) 60 9
S3 40 8 (6 70 20 (12) 18

Demand 5 8 7 14

The minimum total transportation cost =19×5+10×2+30×2+40×7+8×6+20×12=743

Assignment Problem
The assignment problem refers to the class of linear programming problems that include
determining the most efficient assignment of people to projects, salespeople to territories,
contracts to bidders, jobs to machines, and etc. The goal of the method is to minimize the total
costs or total time of performing the tasks at hand.
Consider the situation where some objects (service teams, jobs, employees, projects, etc.)
should be assigned on a one-to-one basis to other objects. Every assignment can bring profit or
incur cost. The objective is to maximize the total profit or minimize the total cost ensuing from
the assignment structure.

Example 6
VP Inc. gets four commissions for building family houses in various parts of Prague
(Michle, Prosek, Radlice, Trója). In the first step the company must solve the problem of
excavating the shafts for basements. Each excavation takes 5 days. Management of the company
decided to use four own excavators stored in four separated garages. The objective is to allocate
each excavator to exactly one excavation with minimal cost. Since the costs are derived from
distances [in km] between garages and destinations (Table 2.9), we can concentrate only on
these distances to define the objective.

Destination Michle Prosek Radlice Trója

Garage

Garage 1 5 22 12 18

Garage 2 15 17 6 10

Garage 3 8 25 5 20

Garage 4 10 12 19 12

Tab. 2.9 Distances Between Garages and Destinations


Formulation
As you can see, the structure of assignment problem is rather similar to the structure of
the transportation problem. However, here is one basic difference: all supplies and demands are
equal to 1. Thus, exactly one excavator leaves each garage and each destination needs exactly
one of the machines.

1. Define the decision variables


Whereas in transportation models the variable xij corresponds to the amount
transported from the source i to the destination j, in assignment model this variable acts
as an indicator of assignment of the object i to the object j. This binary variable equals 1
in case of assignment (matching) and 0 otherwise. In the example, xij = 1 if the excavator
from the garage i goes to the destination j, and xij = 0 if the excavator from the garage i
does not go to the destination j. It is quite evident that there are 16 bivalent variables in
the example:
xij = 1 or 0, i, j = 1, 2, 3, 4 .

2. The objective is to minimize the total distance necessary for all excavators’
movement

If parameter cij is a distance between the garage i and the destination j, the
objective function can be expressed as follows:

44
Minimize z = ∑∑cij xij ,

i =1 j=1
or using real unit cost:
Minimize z = 5x11 + 22x12 + ... + 12x44 .
The objective function corresponds to the sum of kilometers that all machines go
together.

3. The constraints
From each garage exactly one excavator goes away:
x11 + x12 + x13 + x14 = 1
x 21 + x22 + x23 + x24 = 1
x 31 + x32 + x33 + x34 = 1
x 41 + x42 + x43 + x44 = 1

Each destination needs exactly one excavator:

x11 + x21 + x31 + x41 = 1


x12 + x22 + x32 + x42 = 1
x13 + x23 + x33 + x43 = 1
x14 + x24 + x34 + x44 = 1
Notice that the model is balanced, because the number of garages is equal to the number
of destinations. Unbalanced model would need one or more dummy objects to become the
balanced model.

Optimal Solution
In Table 2.10 the optimal assignment is dark shaded. The excavators go from Garage 1 to
Michle, from Garage 2 to Trója, from Garage 3 to Radlice and from Garage 4 to Prosek. All
machines go together 32 km (5 + 10 + 5 + 12). If the excavators return every day to their
garages, the total daily distance is 64 km and in 5 days all machines would go 320 km.
This value can be a basis for evaluating the total transportation cost.

Destination Michle Prosek Radlice Troja

Garage

Garage 1 5 22 12 18

Garage 2 15 17 6 10

Garage 3 8 25 5 20

Garage 4 10 12 19 12

Tab. 2.10 Optimal Assignment

Hungarian Algorithm
The Hungarian algorithm uses the following theorem for polynomial runtime complexity
and guaranteed optimality:
If a number is added to or subtracted from all of the entries of any one row or column of
a cost matrix, then an optimal assignment for the resulting cost matrix is also an optimal
assignment for the original cost matrix.
By using the Hungarian theorem, we decrease our original weight matrix to contain zeros.
We try to assign tasks to agents such that each agent is doing only one task and the penalty
incurred in each case is zero.
Core of the algorithm (assuming square matrix):

Step 1- For each row of the matrix, find the smallest element and subtract it from every
element in its row.
Step 2- Do the same (as step 1) for all columns.
Step 3- Cover all zeros in the matrix using minimum number of horizontal and vertical lines.
Step 4- Test for Optimality: If the minimum number of covering lines is n, an optimal
assignment is possible and we are finished. Else if lines are lesser than n, we haven’t
found the optimal assignment, and must proceed to step 5.
Step 5- Determine the smallest entry not covered by any line. Subtract this entry from each
uncovered row, and then add it to each covered column. Return to step 3.

You might also like