You are on page 1of 25

(special cases of Linear Programming)

1. Transportation Problem (TP)


Distributing any commodity from any group
of supply centers, called sources, to any group
of receiving centers, called destinations, in
such a way as to minimize the total
distribution cost (shipping cost).

1
1. Transportation Problem (TP)
Total supply must equal total demand.
If total supply exceeds total demand, a dummy
destination, whose demand equals the difference
between the total supply and total demand is
created. Similarly if total supply is less than total
demand, a dummy source is created, whose supply
equals the difference.
All unit shipping costs into a dummy destination or
out of a dummy source are 0.

Example 1:

2
Example 2:

Destinatio Supply
n
D1 D2 D3 D4
S1 50 75 35 75 12
Source S2 65 80 60 65 17
S3 40 70 45 55 11
(D) 0 0 0 0 10
Demand 15 10 15 10

Transportation Tableau:

3
Initial Solution Procedure:
1. Northwest Corner Starting Procedure
1. Select the remaining variable in the upper left (northwest)
corner and note the supply remaining in the row, s, and the
demand remaining in the column, d.
2. Allocate the minimum of s or d to this variable. If this minimum
is s, eliminate all variables in its row from future consideration and
reduce the demand in its column by s; if the minimum is d,
eliminate all variables in the column from future consideration and
reduce the supply in its row by d.
REPEAT THESE STEPS UNTIL ALL SUPPLIES HAVE BEEN ALLOCATED.

Total sipping cost = 2250

4
Allocate using N-W method

W1 W2 W3 W4 availability
P1 190 300 500 100 70
P2 700 300 400 600 90
P3 400 100 600 0 180

Requirements 50 80 70 140

2. Least Cost Starting Procedure


1. For the remaining variable with the lowest unit cost, determine
the remaining supply left in its row, s, and the remaining demand
left in its column, d (break ties arbitrarily).
2. Allocate the minimum of s or d to this variable. If this minimum
is s, eliminate all variables in its row from future consideration
and reduce the demand in its column by s; if the minimum is d,
eliminate all variables in the column from future consideration
and reduce the supply in its row by d.
REPEAT THESE STEPS UNTIL ALL SUPPLIES HAVE BEEN
ALLOCATED.

5
Total sipping cost = 2065

6
Allocate using least Cost method

W1 W2 W3 W4 availability
P1 190 300 500 100 70
P2 700 300 400 600 90
P3 400 100 600 0 180

Requirements 50 80 70 140

3. Vogel’s Approximation Method Starting Procedure


1. For each remaining row and column, determine the difference between the
lowest two remaining costs; these are called the row and column penalties.
2. Select the row or column with the largest penalty found in step 1 and note
the supply remaining for its row, s, and the demand remaining in its column,
d.
3. Allocate the minimum of s or d to the variable in the selected row or
column with the lowest remaining unit cost. If this minimum is s, eliminate all
variables in its row from future consideration and reduce the demand in its
column by s; if the minimum is d, eliminate all variables in the column from
future consideration and reduce the supply in its row by d.
REPEAT THESE STEPS UNTIL ALL SUPPLIES HAVE BEEN ALLOCATED.

7
Total sipping cost = 2030

Allocate using Vogel method

W1 W2 W3 W4 availability
P1 190 300 500 100 70
P2 700 300 400 600 90
P3 400 100 600 0 180

Requirements 50 80 70 140

8
Optimization
Optimization of Transportation initial solution
Stepping Stone Method
MODI method
Stepping Stone Method
Calculate opportunity cost of each empty cell
What impact it would have on the total cost if one unit
is assigned to empty cell
Occupied cells are called Stones
Cells containing stones are called Stone Cells
The unoccupied cells are called Water Cells
Unit movement is achieved by +-/ increase –decrease of
allocation
Loop to be formed with minimum three allocated cells
in clockwise manner

Optimization of Min Cost method

Total shipping cost = 2065


S1D1 : S1D1 -> S1D4-> S3D4 -> S3D1 = 50-45+55-40 = 20
S1D2: S1D2 ->S1D4->s2D4-S2D2 = 75-45+60-80=10
S2D1 : S2D1->S2D4->S3D4-S3D1 = 65-60+55-40=20
S2D3: S2D3->S1D3->S1D4-S2D4 = 40-30+45-60=-5
S3D2: S3D2->S2D2->s2D4->s3D4=70-80+60-55=-5
S3D3: S3D3->S1D3->S1D4->S3D4=50-30+45-55=10

9
Cost is reduced to 2030

D1 D2 D3 D4 Supply
3 9
S1 50 75 30 45 12

S2 65 10 80 7 40 60 17
10 1
S3 40 70 50 55 11

Demand 10 10 10 10 40

MODI Method

Ui/Vi 30 70 30 45

D1 D2 D3 D4 Supply
50 75 3 30 9 45
0 S1 -20 -5 12
65 80 7 40 60
10 S2 -20 10 -5 17
10 40 70 50 1 55
10 S3 10 -10 11

Demand 10 10 10 10 40

S3D2->S2D2->S2D3-S1D3->S1D4->S3D4

10
Final iteration
Ui/Vi 30 70 30 45

D1 D2 D3 D4 Supply
50 75 30 10 45
0 S1 -20 -5 2 12
65 80 8 40 60
10 S2 -20 9 -5 17
10 40 70 50 0 55
10 S3 1 -10 11

Demand 10 10 10 10 40

Cost is 2020. since all non basic variables Ui+vi-cij <=0, we have reach optimality

Special Problems in
Transportation Method
 Unbalanced problem
 Demand less than supply
 Demand greater than supply
 Degeneracy
 More than one optimal solution

11
Unbalanced Transportation
Problems
 In real-life problems, total demand is not equal to
total supply.
 These unbalanced problems can be handled
easily by using dummy sources or dummy
destinations.
 If total supply is greater than total demand, a
dummy destination (warehouse), with demand
exactly equal to the surplus, is created.
 If total demand is greater than total supply,
introduce a dummy source (factory) with a
supply equal to the excess of demand over
supply.

Unbalanced
Transportation Problems
 Regardless of whether demand or supply
exceeds the other, shipping cost coefficients of
zero are assigned to each dummy location or
route because no shipments will actually be
made from a dummy factory or to a dummy
warehouse.
 Any units assigned to a dummy destination
represent excess capacity, and units assigned to
a dummy source represent unmet demand.

12
Unbalanced Problem
Demand Less than Supply

 Suppose that the Des Moines factory increases


its rate of production to 250 desks.
 That factory’s capacity used to be 100 desks per
production period.
 The firm is now able to supply a total of 850
desks each period.
 Warehouse requirements remain the same so the
row and column totals do not balance.

Unbalanced Problem
Demand Less than Supply
(Continued)
 To balance this type of problem, simply add a
dummy column that will represent a fake
warehouse requiring 150 desks.
 This is somewhat analogous to adding a slack
variable in solving an LP problem.
 Just as slack variables were assigned a value of
zero dollars in the LP objective function, the
shipping costs to this dummy warehouse are all
set equal to zero.

13
Unbalanced Problem
Demand Less than Supply
Customer Customer Dummy
1 2 Factory
Capacity

8 5 0
Factory 1
170

15 10 0
Factory 2
130

3 9 0
Factory 3
80

Customer
Requirements 150 80 150 380

Unbalanced Problem
Supply Less than Demand
 The second type of unbalanced
condition occurs when total demand is
greater than total supply.
 This means that customers or
warehouses require more of a product
than the firm’s factories can provide.
 In this case we need to add a dummy
row representing a fake factory.
 The new factory will have a supply
exactly equal to the difference between
total demand and total real supply.
 The shipping costs from the dummy
factory to each destination will be zero.

14
Unbalanced Problem
Supply Less than Demand
Customer Customer Customer Factory
1 2 3 Capacity

Factory 1 8 5 16
170

Factory 2 15 10 7
130

Dummy 0 0 0
80

Customer
Requirements 150 80 150 380

Degeneracy
 Degeneracy occurs when the number of
occupied squares or routes in a
transportation table solution is less than
the number of rows plus the number of
columns minus 1.
 # Occupied Squares = Rows + Columns – 1
 Such a situation may arise in the initial
solution or in any subsequent solution.
 Degeneracy requires a special procedure to
correct the problem.
 Without enough occupied squares to trace
a closed path for each unused route, it
would be impossible to apply the stepping-
stone method or to calculate the R and K
values needed for the MODI technique.

15
Degeneracy
 To handle degenerate problems,
create an artificially occupied cell.
* That is, place a zero (representing a
fake shipment) in one of the unused
squares and then treat that square as
if it were occupied.
 The square chosen must be in such
a
position as to allow all stepping-
stone paths to be closed.
* Although there is usually a good
deal of flexibility in selecting the
unused square that will receive the
zero.

More Than One Optimal Solution


 As with LP problems, it is possible for a Transportation
Problem to have multiple optimal solutions.
 Such is the case when one or more of the improvement
indices that we calculate for each unused square is zero
in the optimal solution.
 This means that it is possible to design alternative
shipping routes with the same total shipping cost.
 The alternate optimal solution can be found by
shipping the most to this unused square using a
stepping-stone path.
 Practically speaking, multiple optimal solutions
provide management with greater flexibility in
selecting and using resources.

16
Maximization Transportation
Problems
 If the objective in a transportation problem is to
maximize profit, a minor change is required in the
transportation algorithm.
 Since the improvement index for an empty cell indicates
how the objective function value will change if one unit is
placed in that empty cell,
 the optimal solution is reached when all the improvement
indices are negative or zero.
 If any index is positive, the cell with the largest positive
improvement index is selected to be filled using a
stepping-stone path.
 This new solution is evaluated and the process continues
until there are no positive improvement indices.

Unacceptable Or Prohibited Routes

 At times there are transportation problems in


which one of the sources is unable to ship to one or
more of the destinations.
 When this occurs, the problem is said to have an
unacceptable or prohibited route.
 In a minimization problem, such a prohibited route
is assigned a very high cost to prevent this route
from ever being used in the optimal solution.
 After this high cost is placed in the transportation
table, the problem is solved using the techniques
previously discussed.
 In a maximization problem, the very high cost used
in minimization problems is given a negative sign,
turning it into a very bad profit.

17
The Assignment Model

 The second special-purpose LP algorithm is the


assignment method.
 Each assignment problem has associated with it a
table, or matrix.
 Generally, the rows contain the objects or people
we wish to assign, and the columns comprise the
tasks or things we want them assigned to.
 The numbers in the table are the costs associated
with each particular assignment.

2. The Assignment Problem (AP) —


a special case of TP with m=n and si=dj for all i,
and j.

The Hungarian Algorithm


=> solving the assignment problem of a least
cost assignment of m workers to m jobs

18
Assumptions:
1. There is a cost assignment matrix for the m
“people” to be assigned to m “tasks.” (If necessary
dummy rows or columns consisting of all 0’s are
added so that the numbers of people and tasks are
the same.)
2. All costs are nonnegative.
3. The problem is a minimization problem.

The Hungarian Algorithm


Initialization
1. For each row, subtract the minimum number from all numbers in
that row.
2. In the resulting matrix, subtract the minimum number in each
column from all numbers in the column.

19
Iterative Steps
1. Make as many 0 cost assignments as possible. If all workers are
assigned, STOP; this is the minimum cost assignment. Otherwise
draw the minimum number of horizontal and vertical lines
necessary to cover all 0’s in the matrix. (A method for making the
maximum number of 0 cost assignments and drawing the
minimum number of lines to cover all 0’s follows.)
2. Find the smallest value not covered by the lines; this number is
the reduction value.
3. Subtract the reduction value from all numbers not covered by
any lines. Add the reduction value to any number covered by
both a horizontal and vertical line.
GO TO STEP 1.

For small problems, one can usually determine the maximum


number of zero cost assignments by observation. For larger
problems, the following procedure can be used:
Determining the Maximum Number of Zero-Cost Assignments
1. For each row, if only one 0 remains in the row, make that
assignment and eliminate the row and column from consideration
in the steps below.
2. For each column, if only one 0 remains, make that assignment
and eliminate that row and column from consideration.
3. Repeat steps 1 and 2 until no more assignments can be made. (If
0’s remain, this means that there are at least two 0’s in each
remaining row and column. Make an arbitrary assignment to one of
these 0’s and repeat steps 1 and 2.)

20
Again, for small problems, the minimum number of lines required
to cover all the 0’s can usually be determined by observation. The
following procedure, based on network flow arguments, can be
used for larger problems:
Drawing the Minimum Number of Lines to Cover All 0’s
1. Mark all rows with no assignments (with a “‧”).
2. For each row just marked, mark each column that has a 0 in
that row (with a “‧”).
3. For each column just marked, mark each row that has an
assignment in that column (with a “‧”).
4. Repeat steps 2 and 3 until no more marks can be made.
5. Draw lines through unmarked rows and marked columns.

Example:

21
Minimum uncovered
number

22
Minimum uncovered
number

23
CONVERSION OF A MAXIMIZATION PROBLEM
TO A MINIMIZATION PROBLEM

The Hungarian algorithm works only if the matrix is a


cost matrix. A maximization assignment problem can
be converted to a minimization problem by creating a
lost opportunity matrix. The problem then is to
minimize the total lost opportunity.

Profit Matrix:
J1 J2 J3 J4
W1 67 58 90 55
W2 58 88 89 56
W3 74 99 80 22
(D) 0 0 0 0

24
The lost opportunity matrix given below is derived by
subtracting each number in the J1 column from 74, each
number in the J2 column from 99, each number in the J3
column from 90, and each number in the J4 from 56.

J1 J2 J3 J4
W1 7 41 0 1
W2 16 11 1 0
W3 0 0 10 34
(D) 74 99 90 56

The Hungarian algorithm can now be applied to this lost


opportunity matrix to determine the maximum profit set of
assignments.

Thank You

25

You might also like