Sei sulla pagina 1di 100

TRANSPORTATION

& ASSIGNMENT
PROBLEMS
Dr. Mukesh Kumar Mehlawat
Department of Operational Research,
University of Delhi
INTRODUCTION
THE TRANSPORTATION
PROBLEM
To find the most economical way of allocating 𝑚 sources to 𝑛
destinations, given:
• Capacity of each source;
• Demand of each destination;
• Transportation cost to ship one unit from a source to a destination.
Capacity of each source

Demand of each
destination

Transportation cost to ship one unit


from a source to a destination
A company has 4 production plants and 3 warehouses. After production, finished goods
are transferred to warehouses to meet distributors’ demand. Estimated production at
each of the plants, planned allocation to each of the warehouses (in units of truckloads),
and shipping costs for the upcoming month are given below.

Destination A Destination B Destination C Production

Source 1 $8/unit $9/unit $4/unit 72 units


Source 2 $5/unit $6/unit $8/unit 38 units
Source 3 $7/unit $9/unit $6/unit 46 units
Source 4 $5/unit $3/unit $7/unit 19 units
Demand 110 units 34 units 31 units

Since the cost of shipping is significant, the company wants to minimize the
transportation cost. Given the data, determine the optimal shipping plan to
minimize the total shipping cost.

A TYPICAL TRANSPORTATION
PROBLEM
Destination A Destination B Destination C Production
Source 1 $8/unit $9/unit $4/unit 72 units
Source 2 $5/unit $6/unit $8/unit 38 units
Source 3 $7/unit $9/unit $6/unit 46 units
Source 4 $5/unit $3/unit $7/unit 19 units
Demand 110 units 34 units 31 units 175 Total demand
Total production = EQUAL

Balanced transportation problem:


Total supply = total demand

Unbalanced transportation problem:


• Total supply ≠ total demand
• Solve the problem same way as for the balanced transportation problem
• Dummy source / dummy destination is used for solving (discussed later)

BALANCED / UNBALANCED
TRANSPORTATION PROBLEM
• 3 plants
• 4 warehouses
• Objective is to determine a minimum cost shipping plan that meets the production
and allocation requirements

Shipping cost (INR)/ truckload


W1 W2 W3 W4 Production
Plant 1 464 513 654 867 75
Plant 2 352 416 690 791 125
Plant 3 995 682 388 685 100
Allocation 80 65 70 85 300

EXAMPLE: DATA
• 3 plants
• 4 warehouses
• Objective is to determine a minimum cost shipping plan that meets the production
and allocation requirements

Shipping cost (INR)/ truckload


W1 W2 W3 W4 Production
Plant 1 464 513 654 867 75
Plant 2 352 416 690 791 125
Plant 3 995 682 388 685 100
Allocation 80 65 70 85 300

First, check if it’s balanced

EXAMPLE: POINT TO NOTE


W1 - 80

75 P1

W2 - 65

125 P2

W3 - 70

100 P3

W4 - 85
Formulate the problem as a linear program.

VISUAL REPRESENTATION
• Decision variables
𝒙𝒊𝒋 : Number of units to be shipped from plant 𝒊 to warehouse 𝒋

• Constraints
• Production constraint at each plant
• Allocation constraint at each warehouse
• Non-negativity constraints for the number of units to be shipped

• Objective function
To minimize the total shipping cost (𝒁)

FORMULATION
Minimize 𝑍 = 464𝑥11 + 513𝑥12 + 654𝑥13 + 867𝑥14 + 352𝑥21 + 416𝑥22 +
690𝑥23 + 791𝑥24 + 995𝑥31 + 682𝑥32 + 388𝑥33 + 685𝑥34

𝑠. 𝑡.
𝑥11 + 𝑥12 + 𝑥13 + 𝑥14 = 75 Production
𝑥21 + 𝑥22 + 𝑥23 + 𝑥24 = 125 Constraints
𝑥31 + 𝑥32 + 𝑥33 + 𝑥34 = 100
𝑥11 + 𝑥21 + 𝑥31 = 80
𝑥12 + 𝑥22 + 𝑥32 = 65 Allocation
𝑥13 + 𝑥23 + 𝑥33 = 70 constraints
𝑥14 + 𝑥24 + 𝑥34 = 85
𝑥𝑖𝑗 ≥ 0, 𝑖 = 1,2,3; 𝑗 = 1,2,3,4 Non-negativity constraints

LINEAR PROGRAMMING
FORMULATION
𝑚 𝑛

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = ෍ ෍ 𝑐𝑖𝑗 𝑥𝑖𝑗


𝑖=1 𝑗=1
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:
𝑛

෍ 𝑥𝑖𝑗 = 𝑠𝑖 , 𝑖 = 1,2, … , 𝑚 Supply side constraint for point 𝑖


𝑗=1
𝑚

෍ 𝑥𝑖𝑗 = 𝑑𝑗 , 𝑗 = 1,2, … , 𝑛 Demand side constraint for point 𝑗


𝑖=1
𝑥𝑖𝑗 ≥ 0 ∀𝑖 = 1,2, … , 𝑚; 𝑗 = 1,2, … , 𝑛 Non-negativity constraints

where:
𝑚: number of origins
𝑚: number of destinations
𝑥𝑖𝑗 : quantity shipped from origin 𝑖 to destination 𝑗
𝑐𝑖𝑗 : unit cost of shipping from origin 𝑖 to destination 𝑗
𝑠𝑖 : supply at origin 𝑖
𝑑𝑗 : demand at destination 𝑗

GENERAL TRANSPORTATION
PROBLEM
SOLVING A
TRANSPORTATION
PROBLEM
After all it’s a linear program!
• Simplex method for LP
• Using Excel Solver, LINGO and other relevant software

If it’s a linear program only, why study it separately?


• Real life problems involve a large number of variables and
constraints, so using standard Simplex method may become
computationally exorbitant
• Most of the coefficients are zero, and non-zero coefficients occur in a
specific pattern

HOW TO SOLVE A TRANSPORTATION


PROBLEM?
Constraint Set

𝑥11 + 𝑥12 + 𝑥13 + 𝑥14 = 75


𝑥21 + 𝑥22 + 𝑥23 + 𝑥24 = 125
𝑥31 + 𝑥32 + 𝑥33 + 𝑥34 = 100
𝑥11 + 𝑥21 + 𝑥31 = 80
𝑥12 + 𝑥22 + 𝑥32 = 65
𝑥13 + 𝑥23 + 𝑥33 = 70
𝑥14 + 𝑥24 + 𝑥34 = 85
𝑥𝑖𝑗 ≥ 0, 𝑖 = 1,2,3; 𝑗 = 1,2,3,4

TRANSPORTATION PROBLEMS:
SPECIAL STRUCTURE
Constraint matrix as it appears in the Simplex Table
𝒙𝟏𝟏 𝒙𝟏𝟐 𝒙𝟏𝟑 𝒙𝟏𝟒 𝒙𝟐𝟏 𝒙𝟐𝟐 𝒙𝟐𝟑 𝒙𝟐𝟒 𝒙𝟑𝟏 𝒙𝟑𝟐 𝒙𝟑𝟑 𝒙𝟑𝟒
1 1 1 1

1 1 1 1

1 1 1 1

1 1 1

1 1 1

1 1 1

1 1 1

TRANSPORTATION PROBLEMS:
SPECIAL STRUCTURE
More efficient special-purpose
algorithms than LP (though
applicable) exist for solving the
Transportation and Assignment
applications.
As in the simplex algorithm, they
involve :
SPECIAL-  finding an initial solution
PURPOSE  testing this solution to see if it
is optimal
ALGORITHMS  developing an improved
solution
This process continues until an
optimal solution is reached.
Unlike the simplex method, the
Transportation and Assignment
methods are simpler in terms of
computation.
Streamlined versions of the
simplex method are important
IMPORTANCE for two reasons:

OF SPECIAL-
 Their computation times are
generally 100 times faster

PURPOSE 
than the simplex algorithm.
They require less computer
ALGORITHMS memory (and hence can
permit larger problems to be
solved).
SPECIAL-PURPOSE ALGORITHMS
FOR TRANSPORTATION PROBLEM

Two common techniques for developing initial solutions


are:
 Northwest corner method, and
 Vogel’s approximation method (VAM).

After an initial solution is developed, it must be


evaluated by either:
 the stepping-stone method, or
 the modified distribution (MODI) method.
SETTING UP A TRANSPORTATION
PROBLEM
◼ The Executive Furniture Corporation manufactures office desks at three
locations: Factory 1, Factory 2 and Factory 3
◼ The firm distributes the desks through regional warehouses located in
Store A, Store B and Store C
◼ Estimates of the monthly production capacity of each factory and the desks
needed at each warehouse are shown as follows:

Factories Warehouses
(Sources) (Destinations)

100 Units Factory 1 Store A 300 Units

300 Units Factory 2 Store B 200 Units

300 Units Factory 3 Store C 200 Units

Capacities Shipping Routes Requirements


SETTING UP A TRANSPORTATION
PROBLEM
◼ The first step is setting up the transportation table
◼ Its purpose is to summarize all the relevant data and keep track of
algorithm computation

Transportation costs per desk for Executive Furniture


TO
Store A Store B Store C
FROM
Factory 1 $5 $4 $3

Factory 2 $8 $4 $3

Factory 3 $9 $7 $5
SETTING UP A TRANSPORTATION
PROBLEM
Capacity
constraint

TO
FROM
Store A Store B Store C Total
$5 $4 $3
Factory 1 100

$8 $4 $3
Factory 2 300

$9 $7 $5
Factory 3 300

Total 300 200 200 700

Cost of shipping 1 unit from Store C Total supply


Factory 3 to Store B and demand
demand
In this table, total factory
supply exactly equals
total warehouse demand

When equal demand and


SETTING UP A
TRANSPORTATION
supply occur, a balanced
PROBLEM problem is said to exist

This is uncommon in the


real world and we have
techniques to deal with
unbalanced problems
VOGEL’S APPROXIMATION METHOD:
TO FIND AN INITIAL SOLUTION

◼ Vogel’s Approximation Method (VAM) is not as


simple as the northwest corner method, but it
provides a very good initial solution, often one that is
the optimal solution
◼ VAM tackles the problem of finding a good initial
solution by considering the costs associated with
each route alternative
◼ To apply VAM, we first compute for each row and
column the penalty faced if we should ship over the
second-best route instead of the least-cost route
VOGEL’S APPROXIMATION METHOD

◼ The six steps involved in determining an initial VAM


solution are illustrated below beginning with the same
layout originally shown in the table
VAM Step 1:
For each row and column of the transportation table,
find the difference between the distribution cost on the
best route in the row or column and the second best
route in the row or column.
◼ This is the opportunity cost of not using the best
route
◼ Step 1 has been done in the table
VOGEL’S APPROXIMATION METHOD

◼ Transportation table with VAM row and column


differences shown
OPPORTUNITY
3 0 0 COSTS
TO TOTAL
FROM
A B C AVAILABLE
$5 $4 $3
1 100 100 1

$8 $4 $3
2 200 100 300 1

$9 $7 $5
3 100 200 300 2

TOTAL REQUIRED 300 200 200 700


VOGEL’S APPROXIMATION METHOD
VAM Step 2:
Identify the row or column with the greatest opportunity
cost, or difference (column A in this example)
VAM Step 3:
Assign as many units as possible to the lowest-cost
square in the row or column selected
VAM Step 4:
Eliminate any row or column that has been completely
satisfied by the assignment just made by placing Xs in
each appropriate square
VAM Step 5:
Recompute the cost differences for the transportation
table, omitting rows or columns eliminated in the
previous step
VOGEL’S APPROXIMATION METHOD

◼ Transportation table with VAM row and column


differences shown
OPPORTUNITY
31 03 02 COSTS
TO TOTAL
FROM
A B C AVAILABLE
$5 $4 $3
1 100 X X 100 1

$8 $4 $3
2 300 1

$9 $7 $5
3 300 2

TOTAL REQUIRED 300 200 200 700


VOGEL’S APPROXIMATION METHOD

VAM Step 6:
Return to step 2 for the rows and columns remaining and
repeat the steps until an initial feasible solution has been
obtained
◼ In this case column B now has the greatest difference,
3
◼ We assign 200 units to the lowest-cost square in the
column, B
◼ We recompute the differences and find the greatest
difference is now in row 2
◼ We assign 100 units to the lowest-cost square in the
column, C
VOGEL’S APPROXIMATION METHOD

◼ Second VAM assignment with B’s requirements


satisfied
OPPORTUNITY
31 03 02 COSTS
TO TOTAL
FROM
A B C AVAILABLE
$5 $4 $3
1 100 X X 100 1

$8 $4 $3
2 200 300 1

$9 $7 $5
3 X 300 2

TOTAL REQUIRED 300 200 200 700


VOGEL’S APPROXIMATION METHOD

◼ Third VAM assignment with E’s requirements


satisfied

TO TOTAL
FROM
A B C AVAILABLE
$5 $4 $3
1 100 X X 100

$8 $4 $3
2 X 200 100 300

$9 $7 $5
3 X 300

TOTAL REQUIRED 300 200 200 700


VOGEL’S APPROXIMATION METHOD

◼ Final assignments to balance column and row


requirements

TO TOTAL
FROM
A B C AVAILABLE
$5 $4 $3
1 100 X X 100

$8 $4 $3
2 X 200 100 300

$9 $7 $5
3 200 X 100 300

TOTAL REQUIRED 300 200 200 700


VOGEL’S APPROXIMATION METHOD

◼ We can easily compute the cost of this shipping


assignment

UNITS PER UNIT TOTAL


SHIPPED x COST ($) = COST ($)
100 5 500
200 4 800
100 3 300
200 9 1800
100 5 500
3,900

◼ This is the minimum transportation cost (optimal)


UNBALANCED
TRANSPORTATION
PROBLEM
In real-life problems, total demand is frequently
not equal to total supply

These unbalanced problems can be handled


easily by introducing dummy sources or
Unbalanced dummy destinations

Transportation
Problems 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, we


introduce a dummy source (factory) with a
supply equal to the excess of demand over
supply

© 2009 Prentice-Hall, Inc. 10 – 35


In either case, shipping cost coefficients of
zero are assigned to each dummy location or
route as no goods will actually be shipped

Unbalanced
Transportation
Any units assigned to a dummy destination
represent excess capacity
Problems

Any units assigned to a dummy source


represent unmet demand

© 2009 Prentice-Hall, Inc. 10 – 36


W1 - 80

75 P1

W2 - 65

125 P2

W3 - 100

100 P3

W4 - 85

CASE 1: TOTAL SUPPLY < TOTAL


DEMAND
W1 - 80

75 P1

W2 - 65

125 P2

W3 - 100

100 P3

W4 - 85
30 D
What would be the cost associated with these arcs?

CASE 1: TOTAL SUPPLY < TOTAL


DEMAND
W1 - 80

75 P1

W2 - 65

125 P2

W3 - 100

100 P3

0
0 W4 - 85
0
30 D 0

CASE 1: TOTAL SUPPLY < TOTAL


DEMAND
W1 - 80

75 P1

W2 - 65

125 P2

W3 - 70

150 P3

W4 - 85

CASE 2: TOTAL SUPPLY > TOTAL


DEMAND
W1 - 80

75 P1

W2 - 65

125 P2

W3 - 70

150 P3

W4 - 85

What would be the cost associated with these arcs? D - 50

CASE 2: TOTAL SUPPLY > TOTAL


DEMAND
W1 - 80

75 P1

W2 - 65

125 P2

W3 - 70

150 P3

0 W4 - 85
0 0

D - 50

CASE 2: TOTAL SUPPLY > TOTAL


DEMAND
Shipping cost / truckload
W1 W2 W3 W4 Production
Plant 1 464 513 654 867 75
Plant 2 352 416 --- 791 125
Plant 3 995 682 388 685 100
Allocation 80 65 70 85

Shipping cost / truckload


W1 W2 W3 W4 Production
Plant 1 464 513 654 867 75
Plant 2 352 416 Infinity/M 791 125
Plant 3 995 682 388 685 100
Allocation 80 65 70 85

CASE 3: NOT ALL SUPPLY-DEMAND


LINKS EXIST
APPLICATIONS
Originated in the
context of
IS IT ONLY
transportation
ABOUT
TRANSPORTING
GOODS? It is the problem
structure that classifies
as a transportation
problem
XYZ Co. has to determine the number of product A that it should produce
in each of the next four months so as to minimize the total production and
storage cost. Data about its contracted deliveries, production capacity, unit
cost of production, and storage are as given below:

Contracted Maximum Unit cost of Unit cost of


Month
Deliveries Production production storage/month
1 10 25 1.08 0.015
2 15 35 1.11 0.015
3 25 30 1.10 0.015
4 20 10 1.13 0.015

Formulate this problem as a transportation problem.

APPLICATION: PRODUCTION
SCHEDULING
1. Source 𝒊:

2. Destination 𝒋:

3. Supply at source 𝒊, 𝒔𝒊 :

4. Demand at destination 𝒋, 𝒅𝒋 :

5. Cost of transportation from


source 𝒊 to destination 𝒊, 𝒄𝒊𝒋 :

REQUIRED INFORMATION
1. Source 𝒊: Production in month 𝑖

2. Destination 𝒋: Deliveries in month 𝑗

3. Supply at source 𝒊, 𝒔𝒊 : Production capacity in month 𝑖

4. Demand at destination 𝒋, 𝒅𝒋 : Number of scheduled deliveries in


month 𝑗

5. Cost of transportation from source 𝒊 to destination 𝒊, 𝒄𝒊𝒋 :


Cost of production + storage (if any) … if 𝑖 ≤ 𝑗
Infinity … if 𝑖 > 𝑗

INFORMATION IN PRODUCTION
SCHEDULING SCENARIO
D1 -10
25 P1

35 P2 1.11
D2 -15

30 P3 1.10
D3 -25
10 P4

D4 -20

NETWORK FIGURE
TRANSPORTATION PROBLEMS: MORE
APPLICATIONS
MWD administers water distribution in a large region. Water is imported from three rivers
and is then resold to four cities in the region.
It is possible to supply any of these cities from any of the rivers except for City 4 which
can not be supplied water from River 3. Water distribution costs differ for different city-
river combinations and are given in the table below.
MWD is committed to provide each city a certain minimum amount of water to meet its
essential needs. Each city also has an upper limit on the amount of water that it can
receive which depends on its storage capacity.
Cost (tens of Rs) per Acre Foot
City 1 City 2 City 3 City 4 Supply
River 1 16 13 22 17 50
River 2 14 13 19 15 60
River 3 19 20 23 --- 50
Minimum needed 30 70 0 10 (in units of Mn
Requested 50 70 30  acre feet)

Determine the distribution plan if all the available water is to be distributed in such a
way as to at least meet the essential needs of each city while minimizing the total cost
to MWD.
WATER DISTRIBUTION AT MWD
 Preferred distribution plan would be to meet each
city’s requested demand
 Can never meet City 4’s requested demand

 How much of it can be met (in addition to its minimum)?


 (50 + 60 + 50 ) – (30 + 70 + 0 + 10) = 50

 But now total demand = (50 + 70 + 30 + 60) = 210

 Total supply = (50 + 60 + 50) = 160


 Excess demand = 210 – 160 = 50, what to do ?
WATER DISTRIBUTION AT MWD

Cost (tens of Rs) per Acre Foot


City 1 City 2 City 3 City 4 Supply
River 1 16 13 22 17 50
River 2 14 13 19 15 60
River 3 19 20 23 --- 50
Dummy 0 0 0 0 50
Demand 50 70 30 60

But would it not violate the minimum needed water constraint?


WATER DISTRIBUTION AT MWD

Cost (tens of Rs) per Acre Foot


City 1 City 1
City 2 City 3 City 4 Supply
(min) (extra)
River 1 16 16 13 22 17 50
River 2 14 14 13 19 15 60
River 3 19 19 20 23 M 50
Dummy M 0 M 0 0 50
Demand 30 20 70 30 60
SOLVING WATER DISTRIBUTION
PROBLEM AT MWD
 Standard simplex method for LP
 Introduce artificial variables
 In constraints
 In the objective function
 Transform into a maximization problem
 Determine basic variables
 Make the coefficients of basic variables 0
 Determine the entering variable
 Determine the leaving variable

 Repeat the process until all the artificial variables leave the basis
 So much to get to a “feasible” solution!

 No need for all this, we have a better method to get an initial BF


solution
INITIAL BASIC FEASIBLE SOLUTION
 With (m + n) constraints, a standard LP has (m + n)
basic variables
 A transportation problem (TP) will have (m + n – 1),
why??
 So a TP will have exactly (m + n – 1) non-negative
allocations
 How to get an initial basic feasible solution?
CONSTRUCTING AN INITIAL BASIC
FEASIBLE SOLUTION
1. From the rows and columns still under consideration, select the
next basic variable according to some criterion.

2. Make that allocation large enough to exactly use up the remaining


supply in its row or remaining demand in its column.

3. Eliminate that row or column (the exhausted one) from further


consideration. Incase of a tie arbitrary select the row.

4. If only one row or one column remains, then select every


remaining variable associated with that row or column. Otherwise
return to Step 1.
VOGEL’S APPROXIMATION METHOD

City 1 City 1 City 2 City 3 City 4 Supply Row


(min) (extra) Difference
River 1 16 16 13 22 17 50 3

River 2 14 14 13 19 15 60 1

River 3 19 19 20 23 M 50 0

Dummy M 0 M 0 0 50 20 0

Demand 30 20 70 30 60
Select x44 = 30
Column 2 14 0 19 15
Difference
VOGEL’S APPROXIMATION METHOD

City 1 City 1 City 2 City 3 City 4 Supply Row


(min) (extra) Difference
River 1 16 16 13 22 17 50 3

River 2 14 14 13 19 15 60 1

River 3 19 19 20 23 M 50 0

Dummy M 0 M 0 0 20 0

Demand 30 20 70 30 60 40
Select x45 = 20
Column 2 14 0 19 15
Difference
VOGEL’S APPROXIMATION METHOD

City 1 City 1 City 2 City 3 City 4 Supply Row


(min) (extra) Difference
River 1 16 16 13 22 17 50 3

River 2 14 14 13 19 15 60 1

River 3 19 19 20 23 M 50 0

Dummy M 0 M 0 0 20 0

Demand 30 20 70 20 30 40
Select x13 = 50
Column 2 2 0 19 2
Difference
VOGEL’S APPROXIMATION METHOD

City 1 City 1 City 2 City 3 City 4 Supply Row


(min) (extra) Difference
River 1 16 16 13 22 17 50 3

River 2 14 14 13 19 15 60 20 1

River 3 19 19 20 23 M 50 0

Dummy M 0 M 0 0 20 0

Demand 30 20 20 30 40
Select x25 = 40
Column 5 5 7 19 M – 15
Difference
VOGEL’S APPROXIMATION METHOD

City 1 City 1 City 2 City 3 City 4 Supply Row


(min) (extra) Difference
River 1 16 16 13 22 17 50 3

River 2 14 14 13 19 15 20 1

River 3 19 19 20 23 M 50 0

Dummy M 0 M 0 0 20 0

Demand 30 20 20 0 30 40
Select x23 = 20
Column 5 5 7 19 M – 15
Difference
VOGEL’S APPROXIMATION METHOD

City 1 City 1 City 2 City 3 City 4 Supply Row


(min) (extra) Difference
River 1 16 16 13 22 17 50 3

River 2 14 14 13 19 15 20 1

River 3 19 19 20 23 M 50

Dummy M 0 M 0 0 20 0

Demand 30 20 20 0 30 40
Select x31 = 30
Column 7 19 M – 15 x32 = 20, x33 = 0
Difference
OPTIMALITY TEST

 A basic feasible solution is optimal if and only if, for every


non-basic 𝑥𝑖𝑗,
𝑐𝑖𝑗 – 𝑢𝑖 – 𝑣𝑗 ≥ 0

 How to find 𝑢𝑖 and 𝑣𝑗?


▪ For every basic variable 𝑥𝑖𝑗, 𝑐𝑖𝑗 – 𝑢𝑖 – 𝑣𝑗 = 0,
▪ (𝑚 + 𝑛) unknowns and (𝑚 + 𝑛 – 1) equations
-Choose one value arbitrarily
OPTIMALITY TEST

City 1 City 1
City 2 City 3 City 4 Supply
(min) (extra)
16 16 13 40 22 17 10 50
River 1

River 2 1430 14 13 30 19 15 60

19 19 20 20 23 30 M 50
River 3 0

Dummy M 0 M 0 0 50 50

Demand 30 20 70 30 60
REVISITING MWD’S DISTRIBUTION PROBLEM

City 1 City 1
City 2 City 3 City 4 Supply
(min) (extra)

16 16 13 22 17 50
River 1 10
40
14 14 13 19 15 60
River 2
30 30
19 19 20 23 M 50
River 3 30
0 20

M 0 M 0 0 50
Dummy
50

Demand 30 20 70 30 60 𝑍 = 2570
COMPUTING DUAL VARIABLES

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50
River 1 10
40
14 14 13 19 15 60
River 2
30 30
19 19 20 23 M 50
River 3 30
0 20

M 0 M 0 0 50
Dummy
50

Demand 30 20 70 30 60 𝑍 = 2570

𝒗𝒋
CHECKING OPTIMALITY CONDITIONS: NOT
OPTIMAL

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -5
River 1
+2 +2 40 +4 10

14 14 13 19 15 60 -5
River 2
30 0 30 +1 -2
19 19 20 23 M 50 0
River 3 +2 30
0 20 M - 22
M 0 M 0 0 50 -22
Dummy
M+3 +3 M+4 -1 50

Demand 30 20 70 30 60 𝑍 = 2570

𝒗𝒋 19 19 18 23 22
CHECKING OPTIMALITY CONDITIONS:
INCOMING VARIABLE

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -5
River 1
+2 +2 40 +4 10

14 14 13 19 15 60 -5
River 2
30 0 30 +1 -2
19 19 20 23 M 50 0
River 3 +2 30
0 20 M - 22
M 0 M 0 0 50 -22
Dummy
M+3 +3 M+4 -1 50

Demand 30 20 70 30 60 𝑍 = 2570

𝒗𝒋 19 19 18 23 22
CHECKING OPTIMALITY CONDITIONS:
OUTGOING VARIABLE

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

13 22 17 50 -5
River 1 16
+2
16
+2 +
40 +4 -
10

14 14 13 19 15 60 -5
River 2
30 0 -
30 +1 -2 +
19 19 20 23 M 50 0
River 3 +2 30
0 20 M - 22
M 0 M 0 0 50 -22
Dummy
M+3 +3 M+4 -1 50

Demand 30 20 70 30 60 𝑍 = 2570

𝒗𝒋 19 19 18 23 22
NEW BASIC FEASIBLE SOLUTION

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50
River 1
50
14 14 13 19 15 60
River 2
30 20 10
19 19 20 23 M 50
River 3 30
0 20

M 0 M 0 0 50
Dummy
50

Demand 30 20 70 30 60 𝑍 = 2550

𝒗𝒋
CHECKING OPTIMALITY CONDITIONS:
COMPUTING DUAL VARIABLES

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -5
River 1
50
14 14 13 19 15 60 -5
River 2
30 20 10
19 19 20 23 M 50 0
River 3 30
0 20

M 0 M 0 0 50 -20
Dummy
50

Demand 30 20 70 30 60 𝑍 = 2550

𝒗𝒋 19 19 18 23 20
CHECKING OPTIMALITY CONDITIONS

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -5
River 1
+2 +2 50 +4 +2
14 14 13 19 15 60 -5
River 2
30 0 20 +1 10
19 19 20 23 M 50 0
River 3 +2 30
0 20 M - 20
M 0 M 0 0 50 -20
Dummy
M+1 +1 M+2 -3 50

Demand 30 20 70 30 60 𝑍 = 2550

𝒗𝒋 19 19 18 23 20
CHECKING OPTIMALITY CONDITIONS:
INCOMING VARIABLE

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -5
River 1
+2 +2 50 +4 +2
14 14 13 19 15 60 -5
River 2
30 0 20 +1 10
19 19 20 23 M 50 0
River 3 +2 30
0 20 M - 20
M 0 M 0 0 50 -20
Dummy
M+1 +1 M+2 -3 50

Demand 30 20 70 30 60 𝑍 = 2550

𝒗𝒋 19 19 18 23 20
CHECKING OPTIMALITY CONDITIONS:
OUTGOING VARIABLE

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -5
River 1
+2 +2 50 +4 +2
14 14 13 19 15 60 -5
River 2
30 - 0 20 +1 +
10
19 19 20 23 M 50 0
River 3 +0 20 +2 30 - M - 20
M 0 M 0 0 50 -20
Dummy
M+1 +1 M + 2 -3 + -
50

Demand 30 20 70 30 60 𝑍 = 2550

𝒗𝒋 19 19 18 23 20
NEW BASIC FEASIBLE SOLUTION

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50
River 1
50
14 14 13 19 15 60
River 2
20 40
19 19 20 23 M 50
River 3 0
30 20

M 0 M 0 0 50
Dummy
30 20

Demand 30 20 70 30 60 𝑍 = 2460

𝒗𝒋
COMPUTING DUAL VARIABLES

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -8
River 1
50
14 14 13 19 15 60 -8
River 2
20 40
19 19 20 23 M 50 0
River 3 0
30 20

M 0 M 0 0 50 -23
Dummy
30 20

Demand 30 20 70 30 60 𝑍 = 2460

𝒗𝒋 19 19 21 23 23
CHECKING OPTIMALITY CONDITIONS

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -8
River 1
+5 +5 50 +7 +2
14 14 13 19 15 60 -8
River 2
+3 +3 20 +4 40
19 19 20 23 M 50 0
River 3
30 20 -1 0 M - 23
M 0 M 0 0 50 -23
Dummy
M+4 +4 M+2 30 20

Demand 30 20 70 30 60 𝑍 = 2460

𝒗𝒋 19 19 21 23 23
CHECKING OPTIMALITY CONDITIONS:
INCOMING VARIABLE

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -8
River 1
+5 +5 50 +7 +2
14 14 13 19 15 60 -8
River 2
+3 +3 20 +4 40
19 19 20 23 M 50 0
River 3
30 20 -1 0 M - 23
M 0 M 0 0 50 -23
Dummy
M+4 +4 M+2 30 20

Demand 30 20 70 30 60 𝑍 = 2460

𝒗𝒋 19 19 21 23 23
CHECKING OPTIMALITY CONDITIONS:
OUTGOING VARIABLE

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -8
River 1
+5 +5 50 +7 +2
14 14 13 19 15 60 -8
River 2
+3 +3 20 - +4 +
40
19 19 20 23 M 50 0
River 3
30 20 -1 + 0- M - 23
M 0 M 0 0 50 -23
Dummy
M+4 +4 M+2
+30 -
20

Demand 30 20 70 30 60 𝑍 = 2460

𝒗𝒋 19 19 21 23 23
DEGENERATE CASE: NO CHANGE IN THE
OBJECTIVE FUNCTION VALUE

City 1 City 1
City 2 City 3 City 4 Supply 𝑢𝑖
(min) (extra)

16 16 13 22 17 50 -7
River 1
+4 +4 50 +7 +2
14 14 13 19 15 60 -7
River 2
+2 +2 20 +4 40
Optimal
20
Solution!! 50 0
River 3 19 19 23 M
30 20 0 +1 M - 22
M 0 M 0 0 50 -22
Dummy
M+3 +3 M+2 30 20

Demand 30 20 70 30 60 𝑍 = 2460

𝒗𝒋 19 19 20 22 22
ASSIGNMENT
PROBLEM
What is the impact of degeneracy?

What if we want the distribution quantities to


be integers?

Why did we emphasize on “balanced”


transportation problems?

UNANSWERED QUESTIONS
𝑚 𝑛

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = ෍ ෍ 𝑐𝑖𝑗 𝑥𝑖𝑗


𝑖=1 𝑗=1
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:
𝑛

෍ 𝑥𝑖𝑗 = 𝑠𝑖 , 𝑖 = 1,2, … , 𝑚 Supply side constraint for point 𝑖


𝑗=1
𝑚

෍ 𝑥𝑖𝑗 = 𝑑𝑗 , 𝑗 = 1,2, … , 𝑛 Demand side constraint for point 𝑗


𝑖=1
𝑥𝑖𝑗 ≥ 0 ∀𝑖 = 1,2, … , 𝑚; 𝑗 = 1,2, … , 𝑛 Non-negativity constraints

where:
𝑚: number of origins
𝑚: number of destinations
𝑥𝑖𝑗 : quantity shipped from origin 𝑖 to destination 𝑗
𝑐𝑖𝑗 : unit cost of shipping from origin 𝑖 to destination 𝑗
𝑠𝑖 : supply at origin 𝑖
𝑑𝑗 : demand at destination 𝑗

RECALL THE TRANSPORTATION


PROBLEM
𝑚 𝑛

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = ෍ ෍ 𝑐𝑖𝑗 𝑥𝑖𝑗


𝑖=1 𝑗=1
𝑠𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜:
𝑛

෍ 𝑥𝑖𝑗 = 1, 𝑖 = 1,2, … , 𝑚 Supply side constraint for point 𝑖


𝑗=1
𝑚

෍ 𝑥𝑖𝑗 = 1, 𝑗 = 1,2, … , 𝑛 Demand side constraint for point 𝑗


𝑖=1
𝑥𝑖𝑗 ≥ 0 ∀𝑖 = 1,2, … , 𝑚; 𝑗 = 1,2, … , 𝑛 Non-negativity constraints

where:
𝑚: number of origins
𝑚: number of destinations
𝑥𝑖𝑗 : quantity shipped from origin 𝑖 to destination 𝑗
𝑐𝑖𝑗 : unit cost of shipping from origin 𝑖 to destination 𝑗

SPECIAL CASE OF
TRANSPORTATION PROBLEM
WHAT CAN BE SAID ABOUT THE SPECIAL
CASE?
 𝑥𝑖𝑗: integer
 In fact “binary” i.e., either 0 or 1

 𝑛 = 𝑚 i.e., number of sources equals number of destinations

 Number of basic variables = 𝑛 + 𝑚 − 1 = 2𝑛 – 1

 Number of non-zero basic variables = 𝑛

 Every basic solution would be degenerate by 𝑛 – 1 variables


 Using transportation simplex will cause unnecessary iterations, let alone
exploiting the special structure of the problem

 So what do we do?
 But before that lets look at the applications of this special case
Problem of allocating assignees to tasks
• Assignee could be people, machines, plants, time slots
etc.

To meet the balanced transportation


formulation
• Number of assignees = number of tasks
• Each assignee is to be assigned exactly one task
• Each task is to be assigned to exactly one assignee
• Cost 𝑐𝑖𝑗 of assigning assignee 𝑖 to task 𝑗 is known
• The objective is to minimize the total cost of assignment

ASSIGNMENT PROBLEMS:
APPLICATIONS
ASSIGNMENT PROBLEMS:
APPLICATIONS
A company must decide the location for its three
new machines. There are four slots available in the
shop. Some of these slots are more desirable than
others for particular machines due to their
proximity to work centers that will have a heavy
workflow to and from these machines. There is no
workflow between the new machines. The
objective is to minimize the total cost of material
handling.

Formulate this problem as an assignment problem.


Material handling cost (INR)

Location 1 Location 2 Location 3 Location 4

Machine 1 13 16 12 11

Machine 2 15 --- 13 20

Machine 3 5 7 10 6

ASSIGNMENT PROBLEMS:
APPLICATIONS
Optimal solution

Location 1 Location 2 Location 3 Location 4

Machine 1 13 16 12 11

Machine 2 15 --- 13 20

Machine 3 5 7 10 6

HUNGARIAN METHOD:
SPECIAL ALGORITHM FOR
ASSIGNMENT PROBLEMS
Observations
 Each row will have exactly
one allocation
 Each column will have exactly
one allocation
 If possible, optimal solution
would consist of allocating to
the lowest cost elements in
HUNGARIAN each row

METHOD:  In case, the lowest cost


elements of more than one
MOTIVATION rows correspond to the same
column, some columns would
have no allocation
 In that case, we find out the
lowest cost element in that
column
 It is the relative cost i.e. cost
difference between two
alternative solutions that
matters, not the absolute cost
Subtract the smallest number in each row from every number in the
row (it’s called row reduction).

If this cost table has any column without a zero element, perform a
column reduction by subtracting the smallest number in each such
column from every number in the column.

If these zero elements provide a complete set of assignments, then


that is an optimal solution and the algorithm terminates.

HUNGARIAN METHOD
1 2 3 4
1 13 16 12 11
2 15 M 13 20
3 5 7 10 6
Dummy 0 0 0 0

HUNGARIAN METHOD: AN
EXAMPLE
1 2 3 4
1 2 5 1 0
2 2 M 0 7
3 0 2 5 1
Dummy 0 0 0 0

HUNGARIAN METHOD: AN EXAMPLE


1 2 3 4

1 2 5 1 0

2 2 M 0 7

3 0 2 5 1

Dummy 0 0 0 0

HUNGARIAN METHOD: AN
EXAMPLE
1. Subtract the smallest number in each row from
every number in the row (it’s called row
reduction).

2. If this cost table has any column without a zero


element, perform a column reduction by
subtracting the smallest number in each such
column from every number in the column.

3. If these zero elements provide a complete set of


assignments, then that is an optimal solution and
the algorithm terminates.

What if it doesn’t?

HUNGARIAN METHOD
1 2 3 4 5

1 80 0 30 120 0

2 80 0 30 120 0

3 60 60 M 80 0

4 60 60 M 80 0

5 0 90 0 0 M
Complete set of assignments is not possible with zero cost; at
most three assignments are possible.

HUNGARIAN METHOD: ANOTHER


EXAMPLE
Draw the minimum possible number of lines through some of the rows
and columns to cover all the zeros.

1 2 3 4 5

1 80 0 30 120 0

2 80 0 30 120 0

3 60 60 M 80 0

4 60 60 M 80 0

5 0 90 0 0 M

HUNGARIAN METHOD: ANOTHER


EXAMPLE
Subtract the minimum uncrossed number from all the uncrossed
numbers and add this number to points of intersection of two lines.

1 2 3 4 5

1 50 0 0 90 0

2 50 0 0 90 0

3 30 60 M 50 0

4 30 60 M 50 0

5 0 120 0 0 M
Complete set of assignments is still not possible with zero cost; at
most four assignments are possible. So REPEAT this procedure.

HUNGARIAN METHOD: ANOTHER


EXAMPLE
Subtract the minimum uncrossed number from all the uncrossed numbers
and add this number to points of intersection of two lines.

1 2 3 4 5

1 20 0 0 60 0

2 20 0 0 60 0

3 0 60 M 20 0

4 0 60 M 20 0

5 0 150 30 0 M

HUNGARIAN METHOD: ANOTHER


EXAMPLE
SUMMARY OF THE HUNGARIAN
METHOD
1. Subtract the smallest number in each row from every number in the
row.
2. Subtract the smallest number in each column of the new table from
every number in the column.
3. Test whether an optimal assignment can be made. You can do this
by determining the minimum number of lines required to cover all
zeros. If it is equal to the number of rows, an optimal assignment is
possible, go to Step 6, else go to Step 4.
4. Subtract the smallest uncovered number from every uncovered
number and add this number to the numbers at intersection.
5. Repeat Steps 3 and 4, until an optimal assignment is possible.
6. Make the assignment, one at a time in positions that have zero
elements. Begin with rows and columns that have only one zero.
Cross out both the row and the column after each assignment is
made. Continue this process until every row and every column has
exactly one assignment and so has been crossed out.

Potrebbero piacerti anche