0% found this document useful (0 votes)
519 views53 pages

Chapter 5 - Network Models

The document discusses network optimization models in operations research. It begins with an introduction to network models and their applications in transportation, logistics, and other systems. The key topics covered include definitions of basic network terminology like nodes, arcs, paths, and trees. Several classic network problems are introduced, such as the shortest path problem, minimum spanning tree problem, maximum flow problem, and minimum cost flow problem. The document provides detailed explanations of the shortest path problem and minimum spanning tree problem formulations as examples of network optimization models.

Uploaded by

Nam Phạm
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
0% found this document useful (0 votes)
519 views53 pages

Chapter 5 - Network Models

The document discusses network optimization models in operations research. It begins with an introduction to network models and their applications in transportation, logistics, and other systems. The key topics covered include definitions of basic network terminology like nodes, arcs, paths, and trees. Several classic network problems are introduced, such as the shortest path problem, minimum spanning tree problem, maximum flow problem, and minimum cost flow problem. The document provides detailed explanations of the shortest path problem and minimum spanning tree problem formulations as examples of network optimization models.

Uploaded by

Nam Phạm
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/ 53

OPERATION RESEARCH

CHAPTER 5
NETWORK
OPTIMIZATION
MODELS
ASSOC. PROF. HO THANH PHONG
OUTLINE

• Introduction
• Terminology of Networks
• Typical Problems:
• Shortest-Path Problem
• Minimum Spanning Tree Problem
• Maximum Flow Problem
• Minimum Cost Flow Problem
• Special cases

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 2


INTRODUCTION
• Many types of network in real life:
▪ Transportation network, information network, and
electricity network…
▪ Manufacturing, distributing, planning, positioning
facilities…
▪ Logistics systems, Supply Chain Systems
▪ Administration flow …

• Optimization Network models: special type of


linear programming problems.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 3


BASIC DEFINITIONS

Graph: A graph or network is defined by two sets of symbols : nodes and


arcs. Denotes G=(N,A)
• Nodes: A set ( call N ) of points in a graph, also called vertices.
• Arcs (edges,A): Link between two nodes. For arc(j,k), node j is the
initial node of the arc, and node k is the terminal node of the arc, the
arc is said to go from node j to node k.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 4


BASIC DEFINITIONS
• Directed arc: If flow through an arc is allowed in only one direction, the arc
is said to be a directed arc.
• Undirected arc: If flow through an arc is allowed in any direction, the arc is
said to be an undirected arc.
• Directed network: A network that has only directed arcs is called a directed
network.
• Undirected network:If all its arcs are undirected, the network is said to be
an undirected network.
A B

Directed arc Undirected arc

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 5


BASIC DEFINITIONS
• Path : A path between two nodes is a sequence of distinct connecting these nodes.
e.g. AB – BC – CE : A path from node A to E.
A D

B E

• Directed path: A directed path from node i to node j is a sequence of connecting arcs whose
direction is toward node j, so that flow from node i to node j along this path is feasible.

• Undirected path :An undirected path from node i to node j is a sequence of connecting arcs whose
direction (if any) can be either toward or away from node j. (may includes directed arcs).

• Connected: Two nodes are said to be connected if the network contains at least one undirected path
between them.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 6


BASIC DEFINITIONS

• Connected network: A connected network is a network where every pair of nodes is


connected.
• Cycle: A path is a finite path that begins and terminates at the same node is called a
cycle.
• Tree: A tree is defined to be a connected subset 𝐺ҧ = (𝑁,
ഥ 𝐴)ҧ containing no cycle,
where 𝐺ҧ is a subset of G.
• Spanning tree:A spanning tree is a tree that contains
𝐺ሜ every node in the network.
For network of n nodes, a spanning tree contains n nodes and exactly n-1 arcs.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 7


BASIC DEFINITIONS

• Example:
Path OT, from node O to node T can go through arcs OB - BD - DT
(O->B->D->T)

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 8


BASIC DEFINITIONS
• A minimum spanning tree is a spanning tree with minimum weight.

(a) undirected (b) spanning tree (c) a tree of (a)


network of (a)

(d) directed network (e) tree of (d)

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 9


BASIC DEFINITIONS
Supply node Demand node
About Supply –
Demand
xij –flow from node i to node j
nodes/networks
cij – cost per unit flow from node i
to node j

- Supply node (source node/source): the flow out of the node exceeds the flow into the node.
- Demand node (sink node/sink): the flow into the node exceeds the flow out of the node.
- Transshipment (intermediate) node: Flow in equals flow out.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 10


1. SHORTEST-PATH PROBLEM

Consider a network consisting of:


- m nodes,
- n directed arcs,
- cij : cost per unit flow through arc (i, j).
Find the shortest path (i.e. the path with the minimum
total travel cost) from the origin to the destination.
Total travel cost is the sum of the travel costs through
each arc on the path.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 11


SHORTEST-PATH PROBLEM
BINARY INTEGER PROGRAMMING

0 𝑖𝑓𝑎𝑟𝑐 𝑖, 𝑗 𝑖𝑠 𝑛𝑜𝑡 𝑖𝑛𝑐𝑙𝑢𝑑𝑒𝑑


𝐿𝑒𝑡 𝑥𝑖𝑗 = ൝
1 𝑖𝑓𝑎𝑟𝑐 𝑖, 𝑗 𝑖𝑠 𝑖𝑛𝑐𝑙𝑢𝑑𝑒𝑑

The mathematical model is

𝑀𝑖𝑛 𝑍 = ෍ ෍ 𝑐𝑖𝑗 𝑥𝑖𝑗


𝑖 𝑗
Subject to:
1 𝑖𝑓 𝑖 = 1
෍ 𝑥𝑖𝑗 − ෍ 𝑥𝑘𝑖 = ቐ 0 𝑖𝑓 𝑖 = 2, 𝑚 − 1
𝑗 𝑘 −1 𝑖𝑓 𝑖 = 𝑚

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 12


EXAMPLE FOR SHORTEST-PATH PROBLEM
Example: The routes of a park is as follows:
7
1 4
5

2 2
4

5 6
1
0 3
3
4 1
7

4 5
2

Node 0: entrance Node 6: destination. Arcs represent the train


routes between stations. The number on each arc is the distance
between stations.
Find the shortest path from the entrance to the destination.
Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 13
EXAMPLE FOR SHORTEST-PATH PROBLEM USING LP
1 𝑖𝑓 𝑡ℎ𝑒𝑟𝑒 𝑖𝑠 𝑟𝑜𝑢𝑡𝑒 𝑖 → 𝑗
𝐿𝑒𝑡 𝑥𝑖𝑗 = ቊ
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑀𝑖𝑛𝑍 = 2𝑥01 + 4𝑥02 + 5𝑥03 + 2𝑥13 + 7𝑥14 + 4𝑥25
+𝑥32 + 4𝑥34 + 3𝑥35 + 5𝑥46 + 𝑥54 + 7𝑥56
7
1 4
5

Subject to: 𝑥01 + 𝑥02 + 𝑥03 = 1 2 2 4

5 6
1
−𝑥01 + 𝑥13 + 𝑥14 = 0 0 3
3
4 1 7
−𝑥02 − 𝑥32 + 𝑥25 = 0 4 5
2
−𝑥03 − 𝑥13 + 𝑥32 + 𝑥34 + 𝑥35 = 0
−𝑥14 − 𝑥34 − 𝑥54 + 𝑥46 = 0
−𝑥25 − 𝑥35 + 𝑥54 + 𝑥56 = 0
−𝑥46 − 𝑥56 = −1

𝑥𝑖𝑗 = 0 𝑜𝑟 1, ∀𝑖, 𝑗
Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 14
ALGORITHMS SOLVING
SHORTEST PATH PROBLEMS

1. Direct algorithm or Forwarding algorithm


2. Backwarding algorithm.
3. Dijkstra Algorithm
4. Floyd Algorithm

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 15


FORWARDING ALGORITHM
• Objective of nth iteration: Find the nth nearest node to the origin (shortest

distance node to the origin). Shortest distance from node 0 to node k: 𝑑0𝑘

• Input for nth iteration: Shortest distance from node 0 to node j 𝑑0𝑗 and shortest

distance from node j to node k 𝑑𝑗𝑘
• [Shortest distance from 0 to node k] = [Shortest distance from 0 to node j]
+ [Shortest distance jk]
• The computation will be done in forwarding way, starting from origin node 0.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 16


EXAMPLE FOR SHORTEST-PATH PROBLEM
• This is forward computation algorithm
A D • [Shortest distance from 0 to node k] = [Shortest distance
from 0 to node j] + [Shortest distance jk]
T ∗ ∗ ∗
O B • 𝑑0𝑘 = 𝑑0𝑗 + 𝑑𝑗𝑘
∗ ∗
• 1𝑠𝑡 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛: 𝑑01 = 2; 𝑑02 = 4;
C E ∗
• 𝑑03 ∗
= min 𝑑01 ∗
+ 𝑑13 , 𝑑03 = min 4, 5 = 4.
∗ ∗ ∗ ∗ ∗
• 2𝑛𝑑 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛: 𝑑05 = min 𝑑03 + 𝑑35 , 𝑑02 + 𝑑25 =
1
7
4
5
min 4 + 3, 4 + 4 = min 7, 8 = 7.
∗ ∗ ∗ ∗ ∗ ∗ ∗
2 2 4 • 𝑑04 = min 𝑑01 + 𝑑14 , 𝑑03 + 𝑑34 , 𝑑05 + 𝑑54 =
5 1
6 min 2 + 7, 4 + 4, 7 + 1 = 8
0 3
∗ ∗ ∗ ∗ ∗
4 1
3 • 𝑑06 = min 𝑑04 + 𝑑46 , 𝑑05 +𝑑56 = min(8 + 5, 7 +
7
6) = 13
4 5
2
• From the last result, write back the sequence:
• The shortest path from 1 → 6 is 01346 or 013546 with
distance is 13

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 17


BACKWARDING ALGORITHM

• Objective of nth iteration: Find the nth nearest node to the origin (shortest

distance node to the origin). Shortest distance from node 0 to node k: 𝑑0𝑘

• Input for nth iteration: Shortest distance from node 0 to node j 𝑑0𝑗 and shortest

distance from node j to node k 𝑑𝑗𝑘
• [Shortest distance from 0 to node k] = [Shortest distance from 0 to node j]
+ [Shortest distance jk]
• The computation will be done in forwarding way, starting from origin node 0.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 18


EXAMPLE FOR SHORTEST-PATH PROBLEM
• This is backward computation algorithm
A D • [Shortest distance from 0 to node k] = [Shortest distance from 0 to
node j] + [Shortest distance jk]
∗ ∗ ∗
T • 𝑑 0𝑘 = 𝑑0𝑗 + 𝑑𝑗𝑘
O B • 1𝑠𝑡 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛: 𝑑06∗
= min 𝑑04∗ ∗
+ 5, 𝑑05 + 7 (1)
∗ ∗ ∗ ∗
• 2𝑛𝑑 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛: 𝑑04 = min 𝑑01 + 7, 𝑑03 + 4, 𝑑05 + 1 (2)
E ∗ ∗ ∗
C • 𝑑05 = min 𝑑02 + 4 𝑑03 + 3 (3)
∗ ∗
• 3𝑟𝑑 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛: 𝑑03 = min 𝑑01 + 2, 𝑑03 (4);
∗ ∗
1
7
4 • 4th 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛: 𝑑01 = 2 ⇒ 𝑠𝑢𝑏𝑚𝑖𝑡 𝑡𝑜 4 𝑔𝑒𝑡 𝑑03 = 4;
5
∗ ∗ ∗
2 2 4 • 𝑑02 = min 𝑑03 + 1, 𝑑02 = min 4 + 1, 4 =⇒ 𝑑02 = 4.
∗ ∗
5 1
6
• 𝑆𝑢𝑏𝑚𝑖𝑡 𝑡𝑜 3 , 𝑑05 = min 4 + 4, 4 + 3 =⇒ 𝑑05 = 7;
0 3
3 ∗ ∗
4 1 7
• 𝑆𝑢𝑏𝑚𝑖𝑡 𝑡𝑜 2 , 𝑑04 = min 2 + 7, 4 + 4, 7 + 1 =⇒ 𝑑04 = 8;
∗ ∗
4 5
• 𝑆𝑢𝑏𝑚𝑖𝑡 𝑡𝑜 1 , 𝑑06 = min 8 + 5, 7 + 7 =⇒ 𝑑06 = 13;
2

• From the last result, write back the sequence:


• The shortest path from 1 → 6 is 01346 or 013546 with distance is 13

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 19


DIJKSTRA ALGORITHM

• Dijkstra’s Algorithm was used in order to find the shortest path from a source node to any
other nodes in the network. It can be used for cyclic network.
• Dijkstra’s Algorithm employed a special label assignment.
Let
ui is the shortest distance from source node to node i
dij ( > 0): is the distance of arc (i, j)
Label of node j is defined as:
[uj, i] = [ ui + dij, i], dij > 0

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 20


DIJKSTRA ALGORITHM

There are two labels:


- Temporary label: the label can be replaced by another lable if there exist
a shorter path to the node under investigation.
Temporary label : [uj, i]
- Permanent Label: if we can not find any other shorter path then the
temporary label will be changed to permanent label.
Permanent label: [uj, i]*

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 21


DIJKSTRA ALGORITHM

• Sep 1: Assign permanent label to sources node [0, -]*.


Let i = 1
• Step 2: Compute temporary labels [uj + dij, i] of node j that i can reach, knowing that
j is not permanently labeled.
If node j is already labeled with a label from a node k [uj, k], and if distance from
node i: (ui + dij) < uj, replace [uj, k] with [ui + dij, i].
• Step 3:
If all the nodes have permanent labels, stop.
Otherwise, select the label [ur, s] having the shortest distance (= ur) among all the
temporary labels. Set i = r, repeat step i.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 22


DIJKSTRA ALGORITHM

Example:
• Find the shortest path from node 1: 15
2
4

100
20 10 50

30 60
1 5
3

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 23


DIJKSTRA ALGORITHM
[100, 1]
[55, 4]* [40, 3]*
15
2
4
100
20 10 50
[90, 3]*
[0, -]* 30 60
1 3 5 [90, 4]*

[30, 1]*
Shortest path form :
Node 1 to 2: 55, 1 → 3 → 4 → 2.
Node 1 to 3: 30, 1 → 3
Node 1 to 4: 40, 1→ 3 → 4
Node 1 to 5: 90, 1 → 3 → 5 OR 1→3→ 4→5

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 24


FLOYD ALGORITHM

Student find literature about Floyd algorithm then presentation in the


class.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 25


OTHER APPLICATIONS OF ALGORITHMS

1- Minimize the total distance traveled


2- Minimize the total cost of a sequence of activities
3- Minimize the total time of a sequence of activities

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 26


MINIMUM SPANNING TREE PROBLEM

• You are given the nodes of a networks but not the links. Instead, you are
given the potential links and the positive length for each if it is inserted
into the network.
• You wish to design the network by inserting enough links to satisfy the
requirement that there be a path between every pair of nodes.
• The objective is to satisfy this requirement in a way that minimizes the
total length of the links inserted into the network.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 27


ALGORITHM

1. Select any node arbitrarily, and then connect it (i.e., add a link) to the nearest
distinct node.
2. Identify the unconnected node that is closest to a connected node, and then
connect these two nodes (i.e., add a link between them). Repeat this step until
all nodes have been connected.
3. Tie breaking: Ties for the nearest distinct node (step 1) or the closest
unconnected node (step 2) may be broken arbitrarily, and the algorithm must still
yield an optimal solution. However, such ties are a signal that there may be (but
need not be) multiple optimal solutions. All such optimal solutions can be
identified by pursuing breaking ties to their conclusion.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 28


ALGORITHM (CONTD.)
The park example: select routes that connect all stations
with minimum total length.

1. 2.
A A
2 7 2 7
2 2
5 T 5 T
5 4 5 4
O B D O B D
3 1 7 3 1 7
4 1 4 1
C E C E
4 4

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 29


ALGORITHM (CONTD.)

3. 4.
A A
2 7 2 7
2 2
5 T 5 T
5 4 5 4
O B D O B D
3 1 7 3 1 7
4 1 4 1
C E C E
4 4

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 30


ALGORITHM (CONTD.)

5. 6.
A A
2 7 2 7
2 2
5 T 5 T
5 4 5 4
O B D O B D
3 1 7 3 1 7
4 1 4 1
C E C E
4 4
7.
A
2 7
2
5 T
5 4
O B D
3 1 7
4 1
C E
4

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 31


APPLICATIONS
1 - Design a telecommunication network
2 - Design of a lightly used transportation network to
minimize the total cost of providing the links (rail
lines, roads…)
3 - Design of a network of high-voltage electrical
power transmission lines
4 – Design of a network of wiring on electrical
equipment to minimize the total length of the wire.
5 – Design of a network of pipelines to connect a
number of locations.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 32


THE MAXIMUM FLOW PROBLEM

• Consider a directed and connected network


where just one node is a supply node, one node
is a demand node, and the rest are transshipment
nodes. Gives the arcs capacities, the objective is
to determine the feasible pattern of flows
through the network that maximize the total flow
from the supply node to demand node.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 33


THE MAXIMUM FLOW PROBLEM

• After some flows have been assigned to the arcs of the original
network, the residual network show remaining arc capacities (called
residual capacities) for assigning additional flows.

7 0 2 5
O B O B

• An augmenting path is a directed path from the supply node to


demand node in the residual network such that every arc on this path
has strictly positive residual capacities

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 34


THE MAXIMUM FLOW PROBLEM
Maximal flow model:
Consider the park problem again:
node O: entrance
node T: destination
others: intermediate nodes

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 35


THE MAXIMUM FLOW PROBLEM

Arcs represent the routes of trains through stations. Each arc


has a limited number of trains a day, shown by the number
above each arc.

In seasonal time, the number of visitors increases, the park has


to maximize the number of trains from O to T.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 36


THE MAXIMUM FLOW PROBLEM
Mathematical model:
Let xij: the number of train from i to j i = 0..5; j = 1..6
Max f 1
3
4
9

Subject to: 5 1 4

7 6
1
x01 + x02 + x03 = f 0 3
5
2
-x01 + x13 + x14 = 0 4 6
4
-x02 – x32 + x25 = 0
5
2

-x13 – x03 + x32 + x35 + x34 = 0


x 01  5 ; x02  4 ; x 03  7
-x14 - x34 – x54 + x46 = 0
x13  1 ; x14  3 ; x 25  4
-x25 – x35 + x54 + x56 = 0
x32  2 ; x34  4 ; x35  5
-x46 – x56 = -f
x46  9 ; x54  1 ; x56  6
x ij  0 ij

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 37


APPLICATIONS

1 - Maximize the flow through a company’s distribution


network from its factories to its customers.
2 - Maximize the flow through a company’s supply network
from its vendors to its factories.
3 - Maximize the flow of oil through a system of pipelines.
4 - Maximize the flow of water through a system of aqueducts.
5 - Maximize the flow of vehicles through a transportation
network.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 38


THE MAXIMUM FLOW PROBLEM

• A cut is defined as any set of directed arcs containing at least one arc
from any directed path from the supply node to the demand nodes.
• The cut value is the sum of the arc capacities of the arcs of the cut.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 39


MINIMUM COST FLOW PROBLEM
• The network is a directed and connected network.
• At least one of the nodes is a supply node.
• At least one node is a demand node.
• All the remaining nodes are transshipment nodes.
• Flow through an arc is allowed only in one direction
indicated by the arrowhead, where the maximum amount
of flow is given by the capacity of that arc.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 40


MINIMUM COST FLOW PROBLEM
• The network has enough arcs with sufficient capacity to
enable all the flow generated at the supply nodes to reach
all the demand nodes.
• The cost of the flow through each arc is proportional to
the amount of that flow, where the cost per unit flow is
known.
• The objective is to minimize the total cost (or maximize
the total profit) of sending the available supply through
the network to satisfy the given demand.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 41


FORMULATE

Consider a directed and connected network where the n nodes include at least one
supply node and at least one demand node.
xij = flow through arc i → j.
cij = cost per unit flow through arc i → j.
uij = arc capacity for i → j.
bi = net flow generated at node i.
The value of bi depends on the nature of node i, where
bi > 0 if node i is a supply node.
bi < 0 if node i is a demand node.
bi = 0 if node i is a transshipment node.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 42


MATHEMATICAL MODEL
n n
Min Z =  cij xij
i =1 j =1
n n
s. t.  x − x
j =1
ij
j =1
ji = bi for each node i

0  xij  uij for each arc i → j

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 43


FEASIBLE SOLUTION PROPERTY
• A necessary condition for a minimum cost flow problem to have
a feasible solutions is that
𝑛

෍ 𝑏𝑖 = 0
𝑖=1

That is the total flow being generated at the supply nodes


equals the total flow being absorbed at the demand nodes.
• If a violation occurs, either a dummy demand node should be
added to absorb the excess supply or a dummy supply node
should be added to generate the flow for the excess demand.
• For minimum cost flow problems where bi and uij have integer
values, all the basic variables also have integer values.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 44


Example. A company has two factories, one distribution center, and two
warehouses as shown in the network below
Nodes 1, 2: factories ; node 3: distribution center ; node 4, 5: warehouses
Numbers in parentheses are demand (supply) at each node (+: supply, -: demand)
• Numbers on arcs are transported volumes.
• The maximum transported volume at arc 1 – 2 is 10, at arc 3 – 5 is 80
Determine the transported volume on arcs to minimize the transportation cost.

(50) (-30)
900
1 4
400

200 300
200 3
100
300

(40) 2 5
(-60)

45
45
MATHEMATICAL MODEL

𝑀𝑖𝑛 𝑍 = 2𝑥12 + 4𝑥13 + 9𝑥14 + 3𝑥23 + 𝑥53 + 3𝑥45 + 2𝑥54


𝑠. 𝑡.
𝑥12 +𝑥13 +𝑥14 = 50
−𝑥12 +𝑥23 = 40
−𝑥13 −𝑥23 +𝑥35 = 0
−𝑥14 +𝑥45 −𝑥54 = −30
−𝑥35 −𝑥45 +𝑥54 = −60 (50) (-30)
900
1 4
𝑥12 ≤ 10 𝑥35 ≤ 80 ∀ 𝑥𝑖𝑗 ≥ 0
400

200 300
200 3
100
300

(40) 2 5
(-60)

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 46


SPECIAL CASES
• The transportation problem.
• The assignment problem.
• The traveling salesman problem.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 47


TRAVELING SALESMAN PROBLEM (TSP)

There are n cities, the salesman:


• Start from city 1
• Go to each city once
• Return to city 1
• Traveling cost from city i to city j: cij.
Find the route so that the traveling cost is
minimum.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 48


TRAVELING SALESMAN PROBLEM (TSP)

Example 1:
TSP with n = 15,112

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 49


TRAVELING SALESMAN PROBLEM (TSP)

Example 2:
A person at node 1 wants to travel to all remaining nodes, then return to node 1. The distances
between nodes are as follows:

3
40
25
59
25
40
15
1 4
15 18
10

10 59

18
2
Find the minimum travel distance.

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 50


TRAVELING SALESMAN PROBLEM (TSP)

Mathematical model:
𝐿𝑒𝑡 𝑥𝑖𝑗 = ቊ 1 if there is travel from i to j
0 otherwise

Let M is a large positive number.


Objective function:
Min Z = Mx11+ 40x12 + 17x13 + 15x14 + 40x21
+ Mx22 + 59x23 + 18x24 + 17x31 + 59x32 + Mx33 +
25x34 + 15x41 + 18x42 + 25x43 + Mx44

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 51


TRAVELING SALESMAN PROBLEM (TSP)

Constraints:
x11+ x12 + x13 + x14 = 1 x12 + x21 <= 1
x13 + x31 <= 1
x21 + x22 + x23 + x24 = 1
x14 + x41 <= 1
x31 + x32 + x33 + x34 = 1 x23 + x32 <= 1
x41 + x42 + x43 + x44 = 1 x24 + x42 <= 1
x11 + x21 + x31 + x41 = 1 x34 + x43 <= 1

x12 + x22 + x32 + x42 = 1


x13 + x23 + x33 + x43 = 1
x14 + x24 + x34 + x44 = 1

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 52


TRAVELING SALESMAN PROBLEM (TSP)

Solving by LINGO:
x13 = x34 = x42 = x21 = 1,
Other variables equal 0.
Z = 100
Therefore the shortest route is 80.
Travel sequence: 1 – 3 – 4 – 2 – 1

Assoc. Professor Hồ Thanh Phong Operations Research – Deterministic Models 53

You might also like