Network Models

advertisement
Network Optimization Models
NetworkModel-1
Network Terminology
• A network consists of a set of nodes and arcs.
• The arcs may have some flow through them.
• If flow is allowed in only one direction, the arc is
a directed arc.
• If flow is allowed in both directions, the arc is an
undirected arc.
NetworkModel-2
Network Terminology (Cont’d)
• A path between two nodes is a sequence of
distinct arcs connecting these two nodes.
• A directed path consists of directed arcs in
same direction.
• An undirected path allows arc of any direction.
A
B
NetworkModel-3
Network Terminology (Cont’d)
• A path that begins and ends at the same node is
a cycle.
• In a directed network, a cycle is either a
directed cycle or an undirected cycle
depending on the directions of the arcs in the
path.
NetworkModel-4
Network Terminology (Cont’d)
• Two nodes are connected if there is a path
between them.
• A connected network is a network where every
pair of nodes is connected.
NetworkModel-5
Network Terminology (Cont’d)
• A tree is a connected network that contains no
cycles.
• A spanning tree is a tree that connects all
nodes in the network.
• If a connected network has n nodes, every
spanning tree has exactly n-1 arcs .
NetworkModel-6
Network Terminology (Cont’d)
• In a directed network with flow, the arc capacity is the maximum
flow allowed on an arc.
• A supply node (or source node) has net flow out of the node.
• A demand node (or sink node) has net flow into the node.
• A transshipment node (or intermediate node) satisfies
conservation of flow; flow in equals flow out.
A
3
9
1
5
(Demand)
D
4
7
Source
Sink
B
(Supply)
6
4
5
2
C
4
1
E
NetworkModel-7
Shortest Route Problem
• Find the shortest route between Source and
Sink.
• Idea is to start with the source, or origin, and find
the shortest route to each of the nodes in the
network sequentially until the destination is
reached.
7
A
2
5
2
D
4
5
Sink
B
Source
4
1
C
7
3
4
1
E
NetworkModel-8
Algorithm for Shortest Route Problem
• Start with the source, or origin. Label it with zero
distance from origin. It is now called a solved node.
• Find the next nearest node: do this by
– Consider all unsolved (unlabelled) nodes that are directly
connected to a solved (labelled) node – these are the candidate
nodes
– For each candidate, calculate the distance to origin by adding
the branch distance to the labelled distance
– Find the minimum distance, and label that node with the distance
and the preceding node. This node is now called a solved node.
(if there is a tie, label both nodes.)
• Repeat until the destination becomes a solved node.
The shortest route can then be traced backwards.
NetworkModel-9
Minimal Spanning Tree Problem
• Find the spanning tree of the shortest length
A
7
2
2
4
5
Source
5
D
Sink
B
7
4
1
C
1
3
4
E
NetworkModel-10
Algorithm for Minimal Spanning Tree
Problem
• Start with any node (source node is OK). Label it with 0.
This is now a labelled node.
• Find the closest unlabelled node to any labelled node.
Label it with the preceding node.
• Repeat until all nodes have been labelled.
The minimal spanning tree can then be traced.
Ties may be broken arbitrarily, but multiple optimal
solutions can be identified by pursuing all ties.
NetworkModel-11
Maximum Flow Problem
• Find the max flow from Source to Sink.
A
3
9
1
5
4
7
Source
D
Sink
B
6
4
5
2
C
4
1
E
NetworkModel-12
The Augmenting Path Algorithm for the
Maximum Flow Problem
1. Identify a flow augmenting path in the residual network
(initially the original network), by checking all nodes
connected to the source node with residual capacity
along the arcs.
If no augmenting path exists, the current flow is optimal.
2. Identify the residual capacity c* of this augmenting path
by finding the minimum residual capacities along all
arcs in the path. Increase the flow in this path by c*.
3. Decrease the residual capacities on each arc in the
path by c* (if arc is in the opposite direction, increase its
residual capacity by c*). Go to step 1.
NetworkModel-13
Minimum Cost Flow Problem
Demand nodes
Supply nodes
Transshipment nodes
Let xij be flow though arc i→j.
n
minimize
Z=
n
 c x
i 1 j 1
n
subject to
ij ij
n
x x
j 1
ij
j 1
0  xij  uij
ji
 bi
(cost of flow)
for each node i (flow conservation)
for each arc i  j (capacity and non-negativity constraints)
NetworkModel-14
Download