Chapter 6
Introduction to Network and Transportation
Problem
Prof. Hai Yang
Department of Civil and Environmental Engineering
HKUST
1
Outline
• Introduction to Network Models
• Transportation Problem
• Assignment Problem
• Transshipment Problem
• Summary
2
What is a Network Model?
• A network model is one which can be represented by
a set of nodes, a set of arcs, costs associated with arcs,
supplies and demands associated with nodes etc.
1 c1
• Classical network problems: 4
c2
c3
– Transportation problem 2
c4
– Assignment problem c5 5
– Transshipment problem 3 c6
–3
– Minimum cost flow problem 3
c12, u12
– Shortest path problem
– Maximum flow problem 1
100,10
2
50,3
4 –7
– Minimum cut problem +10
5
➔ Network representation and LP formulation
3
Network Models
• Each of the models can be formulated as a linear
program and solved by general purpose linear
programming codes.
• For each network model, if the right-hand side values of
the linear programming formulations are all integers,
the optimal solution of the decision variables will be in
integer values.
• Special computer codes have been developed to solve
network models to take advantage of their network
structure.
4
Features of Network Models
• Ability to be represented in simple network flow diagrams.
• These diagrams consist of directed arcs and nodes.
• Could be single source and destination nodes, or multiple
source and destination nodes. Source Destination
1 c1
c2
c1 2 3 c6 c2 4
Source Destination c3
1 c4 2
c5 5 c4
c3
4 c5 5
c6
3
• Same goal: To find the optimum assignment of arc flows xi
to satisfy a single minimization or maximization objective
function and a set of constraint conditions. 5
Features of Network Models
• The control variables xi can be either continuous and
nonnegative values, 𝑥𝑖 ≥ 0, or nonnegative integers, 𝑥𝑖 =
0, 1, 2, …
• A unit cost 𝑐𝑖 is assigned to each arc.
• The total cost for the entire network is equal to the sum of
individual cost assignments.
𝑧 = 𝑐𝑖 𝑥𝑖
𝑖
• The flow entering each node must be equal to the flow
leaving it
Flow in = Flow out
• If there are n nodes, then there are n constraint equations
for the conservation of flow condition. Other constraints
may be imposed for different network models. 6
Introduction to Network Transportation
Problem
7
Transportation Problem
• The transportation problem is a type of distribution
problem.
• The transportation problem seeks to minimize the total
shipping costs of transporting goods from m origins
(each with a supply 𝑠𝑖 ) to n destinations (each with a
demand 𝑑𝑗 ), when the unit shipping cost from an origin
i to a destination j is 𝑐𝑖𝑗 .
8
Transportation Problem: Network Representation
• The network representation for a transportation
problem with 2 sources and 3 destinations:
Total transportation cost 1 d1
= 𝑐11 𝑥11 + 𝑐12 𝑥12 + 𝑐13 𝑥13 c11
s1 1 c12
+ 𝑐21 𝑥21 + 𝑐22 𝑥22 + 𝑐23 𝑥23
c13
= σ2𝑖=1 σ3𝑗=1 𝑐𝑖𝑗 𝑥𝑖𝑗 2 d2
c21
c22
s2 2
c23
3 d3
SOURCES DESTINATIONS
9
Transportation Problem: LP Formulation
• The LP formulation in terms of the amounts 𝑥𝑖𝑗 shipped
from the origin i to the destination j can be written as:
Minimize 𝑍 = σ𝑖 σ𝑗 𝑐𝑖𝑗 𝑥𝑖𝑗
subject to:
σ𝑗 𝑥𝑖𝑗 ≤ 𝑠𝑖 for each origin i (Supply)
σ𝑖 𝑥𝑖𝑗 = 𝑑𝑗 for each destination j (Demand)
𝑥𝑖𝑗 ≥ 0 for all i and j
10
LP Formulation of Transportation Problem:
Special Cases
• The following special case modifications to the linear
programming formulation can be made:
• Minimum shipping guarantee from i to j:
𝑥𝑖𝑗 ≥ 𝑙𝑖𝑗
• Maximum route capacity from i to j:
𝑥𝑖𝑗 ≤ 𝑢𝑖𝑗
• Unacceptable route:
– Remove the corresponding decision variable.
11
Transportation Problem Example:
Allocating Workers to Work Sites
• A contractor allocates workers to four work sites each day.
• The travel time in minutes between each pair of dispatch
location and work site is shown in the network diagram.
• Goal: To minimize the total worker travel time, which is
considered as unproductive.
• Two dispatch locations with 30 and 50 workers,
respectively.
• The numbers of workers required at each work site 1, 2, 3,
and 4 are 15, 20, 30, and 15, respectively.
12
An Example of Transportation Problem:
Allocating Workers to Work Sites
Dispatch location Work site
40 1 d1 = 15
xA1
sA = 30 A xA2 20
xA3 25
xA4 2 d2 = 20
50
30
xB1
xB2 55
sB = 50 B xB3
3 d3 = 30
xB4 10
60
4 d4 = 15
13
An Example of Transportation Problem:
Allocating Workers to Work Sites
Supply of
Travel time Site 1 Site 2 Site 3 Site 4 dispatch
location
Dispatch A 40 25 30 10 30
Dispatch B 20 50 55 60 50
Demand of
15 20 30 15 80
work site
• Note that total supply = total demand = 80
14
An Example of Transportation Problem:
Allocating Workers to Work Sites
• 𝑥𝑖𝑗 = number of workers allocated from dispatch location i
to work site j
Min 𝑍 = 40𝑥𝐴1 + 25𝑥𝐴2 + 30𝑥𝐴3 + 10𝑥𝐴4 + 20𝑥𝐵1 + 50𝑥𝐵2 + 55𝑥𝐵3 + 60𝑥𝐵4
subject to 𝑥𝐴1 + 𝑥𝐴2 + 𝑥𝐴3 + 𝑥𝐴4 = 30 (Supply of A)
𝑥𝐵1 + 𝑥𝐵2 + 𝑥𝐵3 + 𝑥𝐵4 = 50 (Supply of B)
𝑥𝐴1 + 𝑥𝐵1 = 15 (Demand of site 1)
𝑥𝐴2 + 𝑥𝐵2 = 20 (Demand of site 2)
𝑥𝐴3 + 𝑥𝐵3 = 30 (Demand of site 3)
𝑥𝐴4 + 𝑥𝐵4 = 15 (Demand of site 4)
𝑥𝑖𝑗 ≥ 0
15
An Example of Transportation Problem:
Allocating Workers to Work Sites
• What if total supply > total demand?
Dispatch location Work site
40 1 d1 = 10
xA1 20
sA = 30 A xA2
xA3 25
xA4 2 d2 = 20
50 75
80
xB1 30
xB2 55 3 d3 = 30
sB = 50 B xB3
xB4 10
60
4 d4 = 15
16
An Example of Transportation Problem:
Allocating Workers to Work Sites
• 𝑥𝑖𝑗 = number of workers allocated from dispatch location i
to work site j
Min 𝑍 = 40𝑥𝐴1 + 25𝑥𝐴2 + 30𝑥𝐴3 + 10𝑥𝐴4 + 20𝑥𝐵1 + 50𝑥𝐵2 + 55𝑥𝐵3 + 60𝑥𝐵4
Subject to 𝑥𝐴1 + 𝑥𝐴2 + 𝑥𝐴3 + 𝑥𝐴4 ≤ 30 (Supply of A) Actual supply may be
less than total available
𝑥𝐵1 + 𝑥𝐵2 + 𝑥𝐵3 + 𝑥𝐵4 ≤ 50 (Supply of B) supply at each source
𝑥𝐴1 + 𝑥𝐵1 = 10 (Demand of site 1)
𝑥𝐴2 + 𝑥𝐵2 = 20 (Demand of site 2)
𝑥𝐴3 + 𝑥𝐵3 = 30 (Demand of site 3)
𝑥𝐴4 + 𝑥𝐵4 = 15 (Demand of site 4)
𝑥𝑖𝑗 ≥ 0
17
An Example of Transportation Problem:
Allocating Workers to Work Sites
• What if total supply < total demand?
Dispatch location Work site
40 1 d1 = 25
xA1 20
sA = 30 A xA2
xA3 25
xA4 2 d2 = 20
50
80 90
30
xB1
xB2 55
sB = 50 B xB3
3 d3 = 30
xB4 10
60
4 d4 = 15
18
An Example of Transportation Problem:
Allocating Workers to Work Sites
• There is no feasible solution for the problem
• However, we can still search for the optimal way of
serving as much demand as possible.
• There are two ways:
1. Write the supply constraints as equality and demand
constraints as “”.
2. Add a dummy supply node d with capacity equal to
the deficit in supply (= 10 in the example) and costs on
its arcs cdj = 0.
19
Allocating Workers to Work Sites
Total Supply < Total Demand: Method 1
• 𝑥𝑖𝑗 = number of workers allocated from dispatch location i
to work site j
Min 𝑍 = 40𝑥𝐴1 + 25𝑥𝐴2 + 30𝑥𝐴3 + 10𝑥𝐴4 + 20𝑥𝐵1 + 50𝑥𝐵2 + 55𝑥𝐵3 + 60𝑥𝐵4
Subject to 𝑥𝐴1 + 𝑥𝐴2 + 𝑥𝐴3 + 𝑥𝐴4 = 30 (Supply of A) Supply constraints
changed to equality
𝑥𝐵1 + 𝑥𝐵2 + 𝑥𝐵3 + 𝑥𝐵4 = 50 (Supply of B)
𝑥𝐴1 + 𝑥𝐵1 ≤ 25 (Demand of site 1)
𝑥𝐴2 + 𝑥𝐵2 ≤ 20 (Demand of site 2) Demand constraints
changed to
𝑥𝐴3 + 𝑥𝐵3 ≤ 30 (Demand of site 3)
𝑥𝐴4 + 𝑥𝐵4 ≤ 15 (Demand of site 4)
𝑥𝑖𝑗 ≥ 0
20
Allocating Workers to Work Sites
Total Supply < Total Demand: Method 2―Dummy Source
Dispatch location Work site
40 1 d1 = 25
xA1 20
sA = 30 A xA2
xA4 xA3 25
50 2 d2 = 20
90 90
xB1 30
xB2 55 3 d3 = 30
sB = 50 B x
xB4 B3 10
60
sD = 10 D 4 d4 = 15
21
Allocating Workers to Work Sites
Total Supply < Total Demand: Method 2 - Dummy Source
• 𝑥𝑖𝑗 = number of workers allocated from dispatch location i
to work site j
Min 𝑍 = 40𝑥𝐴1 + 25𝑥𝐴2 + 30𝑥𝐴3 + 10𝑥𝐴4 + 20𝑥𝐵1 + 50𝑥𝐵2 + 55𝑥𝐵3 + 60𝑥𝐵4
+0𝑥𝐷1 + 0𝑥𝐷2 + 0𝑥𝐷3 + 0𝑥𝐷4
Subject to 𝑥𝐴1 + 𝑥𝐴2 + 𝑥𝐴3 + 𝑥𝐴4 = 30 (Supply of A)
𝑥𝐵1 + 𝑥𝐵2 + 𝑥𝐵3 + 𝑥𝐵4 = 50 (Supply of B)
𝑥𝐷1 + 𝑥𝐷2 + 𝑥𝐷3 + 𝑥𝐷4 = 10 (Supply of dummy source)
𝑥𝐴1 + 𝑥𝐵1 + 𝑥𝐷1 = 25 (Demand of site 1)
𝑥𝐴2 + 𝑥𝐵2 + 𝑥𝐷2 = 20 (Demand of site 2)
𝑥𝐴3 + 𝑥𝐵3 + 𝑥𝐷3 = 30 (Demand of site 3)
𝑥𝐴4 + 𝑥𝐵4 + 𝑥𝐷4 = 15 (Demand of site 4)
𝑥𝑖𝑗 ≥ 0
22
Introduction to Network
Assignment Problem
23
Assignment Problem
• An assignment problem seeks to minimize the total
cost assignment of m workers to m jobs, given that the
cost of worker i performing job j is cij.
• It assumes that all workers are assigned and each job
is performed.
• An assignment problem is a special case of a
transportation problem in which all supplies and all
demands are equal to 1; hence assignment problems
may be solved as linear programs.
24
Assignment Problem: Network Representation
• The network representation for an assignment problem with
3 agents and 3 tasks:
c11
Total cost a1 1 1 t1
c12
= 𝑐11 𝑥11 + 𝑐12 𝑥12 + 𝑐13 𝑥13 c13
+ 𝑐21 𝑥21 + 𝑐22 𝑥22 + 𝑐23 𝑥23 c21
a2 c22
+ 𝑐31 𝑥31 + 𝑐32 𝑥32 + 𝑐33 𝑥33 2 2 t2
c23
= σ3𝑖=1 σ3𝑗=1 𝑐𝑖𝑗 𝑥𝑖𝑗
c31
where 𝑥𝑖𝑗 = 0 or 1 c32
a3 3 c33 3 t3
AGENTS TASKS
25
Assignment Problem: LP Formulation
• The LP formulation in terms of the assignment of agents
to different tasks, 𝑥𝑖𝑗 , can be written as:
Minimize z = σ𝑖 σ𝑗 𝑐𝑖𝑗 𝑥𝑖𝑗
Subject to: σ𝑗 𝑥𝑖𝑗 = 1 for each agent i
σ𝑖 𝑥𝑖𝑗 = 1 for each task j
𝑥𝑖𝑗 = 0 or 1 for all i and j
Note: The right-hand side of the first constraint set can be modified if an agent
is permitted to fulfil more than 1 task.
26
LP Formulation of Assignment Problem:
Special Cases
• Number of agents exceeds the number of tasks:
σ𝑗 𝑥𝑖𝑗 ≤ 1 for each agent i
• Number of tasks exceeds the number of agents:
Add enough dummy agents to make the number of agents and the number of
tasks the same. The costs for these new variables would be zero.
• The assignment problem is evaluated in terms of revenue
or profit:
Solve as a maximization problem.
• An assignment is unacceptable:
Remove the corresponding decision variable.
• Each agent is permitted to fulfill (up to) k tasks:
σ𝑗 𝑥𝑖𝑗 ≤ 𝑘 for each agent i
27
Example of Assignment Problem:
Assigning Equipment to Job Sites
• A contractor has four sets of excavation equipment at
different locations.
• The contractor wants to assign these sets of equipment to
three different excavation job sites.
• Goal: To minimize the total travel distances of the
equipment.
• The distances between the equipment locations and the
job sites:
Distance Job Site 1 Job Site 2 Job Site 3
Equipment A 50 36 16
Equipment B 28 30 18
Equipment C 35 32 20
Equipment D 25 25 14
28
Example of Assignment Problem:
Assigning Equipment to Job Sites
Equipment Job site
50
A 36 1
16
28
30
B 2 3 Tasks
4 Agents 18
35
32
C 20 3
25 25
14 Number of agents exceeds the
D number of tasks:
σ𝑗 𝑥𝑖𝑗 ≤ 1 for each agent i
29
Example of Assignment Problem
Assigning Equipment to Job Sites
• 𝑥𝑖𝑗 = whether or not equipment i is assigned to job site j
Min 𝑍 = 50𝑥𝐴1 + 36𝑥𝐴2 + 16𝑥𝐴3 + 28𝑥𝐵1 + 30𝑥𝐵2 + 18𝑥𝐵3
+35𝑥𝐶1 + 32𝑥𝐶2 + 20𝑥𝐶3 + 25𝑥𝐷1 + 25𝑥𝐷2 + 14𝑥𝐷3
Subject to 𝑥𝐴1 + 𝑥𝐴2 + 𝑥𝐴3 ≤ 1 (Assignment of Equipment A)
𝑥𝐵1 + 𝑥𝐵2 + 𝑥𝐵3 ≤ 1 (Assignment of Equipment B)
𝑥𝐶1 + 𝑥𝐶2 + 𝑥𝐶3 ≤ 1 (Assignment of Equipment C)
𝑥𝐷1 + 𝑥𝐷2 + 𝑥𝐷3 ≤ 1 (Assignment of Equipment D)
𝑥𝐴1 + 𝑥𝐵1 + 𝑥𝐶1 + 𝑥𝐷1 = 1 (Assignment to Site 1)
𝑥𝐴2 + 𝑥𝐵2 + 𝑥𝐶2 + 𝑥𝐷2 = 1 (Assignment to Site 2)
𝑥𝐴3 + 𝑥𝐵3 + 𝑥𝐶3 + 𝑥𝐷3 = 1 (Assignment to Site 3)
𝑥𝑖𝑗 = 0 or 1 for all i and j
30
Introduction to Network Transshipment
Problem
31
Transshipment Problem
• Transshipment problems are transportation problems in
which a shipment may move through intermediate nodes
(transshipment nodes) before reaching a particular
destination node.
• Transshipment problems can be converted to larger
transportation problems and solved by a special
transportation program.
• Transshipment problems can also be solved by general
purpose linear programming codes.
• One main concept for each intermediate node:
Flow in = Flow out
32
Transshipment Problem: Network Representation
• The network representation for a transshipment problem
with 2 sources, 3 intermediate nodes and 2 destinations:
c36
3
c13
c37
s1 1 c14 6 d6
c15 c46
Supply 4 c47 Demand
c23
c24 c56
s2 2 7 d7
c25
5 c57
SOURCES INTERMEDIATE DESTINATIONS
NODES 33
Transshipment Problem:
LP Formulation
• Suppose the total supply is greater than or equal to the
total demand, the LP formulation in terms of the amounts
shipped from node i to node j, 𝑥𝑖𝑗 , can be written as:
Minimize 𝑍 = σ𝑖 σ𝑗 𝑐𝑖𝑗 𝑥𝑖𝑗
subject to: σ𝑗 𝑥𝑖𝑗 ≤ 𝑠𝑖 for each origin i (supply)
σ𝑖 𝑥𝑖𝑘 − σ𝑗 𝑥𝑘𝑗 = 0 for each intermediate node k
(flow in = flow out)
σ𝑖 𝑥𝑖𝑗 = 𝑑𝑗 for each destination j (demand)
𝑥𝑖𝑗 ≥ 0 for all i and j
34
Example of Transshipment Problem:
Supplying Materials to Work Sites
• Company A and Company B supply customized steel sections to three
construction sites (Eastwood, Northwood, Westwood) weekly, with
weekly demands of 500, 600, and 400, respectively.
• Company A and Company B order steel from the same two steel
manufacturers, M1 and M2, each of which has at most 750 units.
• Goal: To minimize the total cost of the steel supply.
• Due to long standing contracts based on past orders, the unit costs from
the manufacturers to Company A and Company B are:
Unit cost Company A Company B
M1 50 80
M2 70 40
• The costs to supply and install steel sections at different sites are:
Unit cost Eastwood Northwood Westwood
Company A 10 50 80
Company B 30 40 40
35
Steel-making
Customized steel sections
Construction sites
36
Example of Transshipment Problem:
Supplying Materials to Work Sites
• Network Representation:
Eastwood 500
10
50
750 ARNOLD
M1 Comp A 50
80 80
Northwood 600
30
70
M2 Comp
WASH B 40
750 BURN
40 40
Westwood 400
37
Supplying Materials to Work Sites:
LP Formulation
• 𝑥𝑖𝑗 = Amount shipped from manufacturer i to supplier j
• 𝑥𝑗𝑘 = Amount shipped from supplier j to customer k
where i = 1 (M1), 2 (M2);
j = 3 (Company A), 4 (Company B)
k = 5 (Eastwood), 6 (Northwood), 7 (Westwood)
Minimize 𝑍 = 50𝑥13 + 80𝑥14 + 70𝑥23 + 40𝑥24 + 10𝑥35 + 50𝑥36 + 80𝑥37
+30𝑥45 + 40𝑥46 + 40𝑥47
subject to: 𝑥13 + 𝑥14 = 750 (Supply of M1)
𝑥23 + 𝑥24 = 750 (Supply of M2)
𝑥13 + 𝑥23 − 𝑥35 − 𝑥36 − 𝑥37 = 0 (Flow balance for Company A)
𝑥14 + 𝑥24 − 𝑥45 − 𝑥46 − 𝑥47 = 0 (Flow balance for Company B)
𝑥35 + 𝑥45 = 500 (Demand of Eastwood)
𝑥36 + 𝑥46 = 600 (Demand of Northwood)
𝑥37 + 𝑥47 = 400 (Demand of Westwood)
𝑥𝑖𝑗 ≥ 0 for all i and j 38
Supplying Materials to Work Sites:
Optimal Solution
• Network Representation: ZROX
Eastwood 500
50 750 10
750 ARNOLD
M1 Comp A 50
80 80
HEWES
Northwood 600
70 30
M2 Comp
WASH B 40
750 BURN
40 750 40
Westwood 400
Objective Function Value = 11,500
39
Applications of Transshipment Problem in Logistics
40
Introduction to Network and
Transportation Problem:
Summary
41
Summary
• Network Models
– A set of nodes, arcs, and functions (e.g. costs, supplies, demands).
– Single source and destination vs. Multiple sources and destinations
– Flow in = Flow out
– Sometimes can be solved by taking advantages of the network structure.
• Transportation Problem
– Minimize total shipping costs of transportation goods
– Can be solved as LP, or using Transportation Simplex Method
– Dummy source or dummy destination may be added
• Assignment Problem
– Special case of Transportation Problem, with xij = 0 or 1
– Can be solved as LP, Transportation Problem (number of agents must
equal number of tasks)
• Transshipment Problem
– Special case of Transportation Problem, with intermediate nodes
– Flow in = Flow out, for all intermediate nodes 42