Networks - Dalton State College

advertisement
INTRODUCTION TO OPERATIONS
RESEARCH
Networks and the Shortest Path Problem
NETWORKS ARE EVERYWHERE

Physical Networks
 Road
Networks
 Railway Networks
 Airline traffic Networks
 Electrical networks, e.g., the power grid

Abstract networks
 organizational
charts
 precedence relationships in projects

Others?
OVERVIEW
Networks and graphs are powerful modeling
tools.
 Most OR models have networks or graphs as a
major aspect
 Each representation has its advantages

 Major
purpose of a representation
 efficiency
in algorithms
 ease of use
DESCRIPTION
Many important optimization problems can be
analyzed by means of graphical or network
representation. In this chapter the following
network models will be discussed:
1.
2.
3.
4.
5.
Shortest path problems
Maximum flow problems
CPM-PERT project scheduling models
Minimum Cost Network Flow Problems
Minimum spanning tree problems
SHORTEST PATH PROBLEM
Most efficient way to go from one point to
another in a distance network or networks
representing non-distance phenomenon, e.g.,
the “cost network” representing production,
inventory, and other costs
A
D
C
B
E
DEFINITIONS









Networks – consists of a set of points and a set of lines connecting
certain points.
Nodes – The points in the network
Arcs – The lines in the network
Directed Arc – An arc for which flow is allowed in only one direction
Undirected Arc – An arc for which flow is allowed in both directions
Directed Network – A network with only directed arcs
Undirected Network – A network with only undirected arcs
Directed Path – A sequence of arcs from node i to node j such that all
arcs are directed towards node j
Undirected Path – A sequence of arcs from node i to node j such that
all arcs can be directed either towards or away from node j
DEFINITIONS









Cycle – A path that begins and ends at the same node
Connected – Two nodes with at least one undirected path between
them
Connected Network – A network where every pair of nodes is
connected
Tree – A network without any cycles and with the number of
connected nodes being greater than the number of arcs
Spanning Tree – A tree that is a connected network
Arc Capacity – The maximum flow that can be carried on a directed
arc
Supply Node – Flow out of the node exceeds flow into the node
Demand Node – Flow into the node exceeds flow out of the node
Transshipment Node – Flow into the node equals flow out of the node
BASIC DEFINITIONS
A minimum spanning tree is a spanning tree
with minimum weight.
(a) undirected
network
(b) spanning tree (c) a tree of (a)
of (a)
(d) directed network
(e) tree of (d)
THE SHORTEST-PATH PROBLEM
Consider an undirected and connected network
with two special nodes called the origin and the
destination.
 Associated with each of the links (undirected
arcs) is a nonnegative distance. The objective
is to find the shortest path (the path with the
minimum total distance) from the origin to the
destination.

SHORTEST PATH PROBLEM ALGORITHM


Objective of nth iteration: Find the nth nearest node to
the origin (to be repeated for n = 1,2, . . . until the nth
nearest node is the destination.)
Input for nth iteration: n - 1 nearest nodes to the origin
(solved for at the previous iterations), including their
shortest path and distance from the origin. (These
nodes, plus the origin, will be called solved nodes; the
others are unsolved nodes.)
SHORTEST PATH PROBLEM ALGORITHM


Candidates for nth nearest node: Each solved node
that is directly connected by a link to one or more
unsolved nodes provides one candidate-the unsolved
node with the shortest connecting link. (Ties provide
additional candidates.)
Calculation of nth nearest node: For each such solved
node and its candidate, add the distance between
them and the distance of the shortest path from the
origin to this solved node. The candidate with the
smallest such total distance is the nearest node (ties
provide additional solved nodes), and its shortest
path is the one generating this distance.
SEERVADA PARK


Cars are not allowed into the park
There is a narrow winding road system for trams
and for jeeps driven by the park rangers






The road system is shown without curves in the next slide
Location O is the entrance into the park
Other letters designate the locations of the ranger
stations
The scenic wonder is at location T
The numbers give the distance of these winding roads in
miles
The park management wishes to determine which
route from the park entrance to station T has the
smallest total distance for the operation of the
trams
SHORTEST PATH
Consider an undirected and connected network with origin and destination nodes.
Associated with every arc is a non-negative distance. The objective is to find the
shortest path from the origin to the destination.
7
A
5
D
2
2
T
4
1
5
B
O
7
3
4
1
E
4
C
SHORTEST PATH
1st iteration:
Step 1: Neighboring Nodes = {A, B, C}
Step 2: Shortest path from O to neighboring nodes Min {2, 5, 4} = 2
Step 3: The shortest path from O to A
S = {O, A}
7
A
5
D
2
2
T
4
1
5
B
O
7
3
4
1
E
4
C
SHORTEST PATH
2nd iteration:
Step 1: Neighboring nodes = {B, C, D}
Step 2: Min (Min (2 + 2, 5), 4, (2 + 7)) = 4.
Step 3: Shortest path B to C
S = {O, A, B, C}
7
A
5
D
2
2
T
4
1
5
B
O
7
3
4
1
E
4
C
SHORTEST PATH
3rd iteration:
Step 1: Neighboring nodes = {D, E}. Only AD, BD, BE, and CE
Step 2: Min(Min(2 + 7, 4+4), Min(4 + 3, 4+4)) = 7
Step 3: The shortest path to E
S = {O, A, B, C, E}
7
A
5
D
2
2
T
4
1
5
B
O
7
3
4
1
E
4
C
SHORTEST PATH
4th iteration:
Step 1: Include Nodes D and T. Include arcs AD, BD, ED, & ET
Step 2: Min((min(2+7, 4+4, 7+1), (7+7))) = 8
Step 3: Shortest path from node O to D S = {O, A, B, C, E, D}
7
A
5
D
2
2
T
4
1
5
B
O
7
3
4
1
E
4
C
Download