0% found this document useful (0 votes)
55 views41 pages

ECE 307 - Techniques For Engineering Decisions: Transshipment and Shortest Path Problems

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)
55 views41 pages

ECE 307 - Techniques For Engineering Decisions: Transshipment and Shortest Path Problems

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/ 41

ECE 307 – Techniques for

Engineering Decisions
Transshipment and Shortest Path Problems

George Gross
Department of Electrical and Computer Engineering
University of Illinois at Urbana-Champaign

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

TRANSSHIPMENT PROBLEMS

‰ We consider the shipment of a certain homo-


geneous commodity from a specified point or
source to a particular destination or sink
‰ In general, the source and the sink need not be
directly connected; rather, the flow goes through
the transshipment points or intermediate nodes
‰ The objective is to determine the maximal flow
from the source to the sink
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

1
FLOW NETWORK EXAMPLE

1
4

s 3 t

2 5

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

TRANSSHIPMENT PROBLEMS

 nodes 1, 2, 3, 4 and 5 are the transshipment


points
 arcs of the network are ( s, 1 ), ( s, 2 ), ( 1, 2 ),
( 1, 3 ), ( 2, 5 ), ( 3, 4 ), ( 3, 5 ),( 4, 5 ), ( 5, 4 ) ( 4, t ),
( 5, t ) ; the existence of an arc from 4 to 5 and
from 5 to 4 allows bidirectional flows between
the two nodes
 each arc may be constrained in terms of a
limit on the flow through the arc
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

2
MAX FLOW PROBLEM

‰ We denote by fij the flow from i to j and this


equals the commodity amount shipped from i
to j on an arc (i , j) that directly connects the
nodes i and j
‰ The problem is to determine the maximal flow f

from s to t taking into account the flow limits kij

on each arc (i , j)
‰ The mathematical statement of the problem is
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

MAX FLOW PROBLEM

max Z = f
s.t .
0 ≤ f ij ≤ kij ∀ arc ( i , j ) that connects
nodes i and j
f = ∑fi
si at source s conservation
of flow
∑i f it = f at sink t relations

⎫⎪
∑i f ij = ∑k f jk ⎬ at each transshipment node j
⎪⎭
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

3
MAX FLOW PROBLEM

‰ While the simplex approach can solve the max

flow problem, it is possible to construct a highly

efficient network method to find f directly

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

NETWORK DEFINITIONS

‰ Each arc is directed and so for an arc (i, j), fij ≥ 0


‰ A forward arc at a node i is one that leaves
node i to some node j and is denoted by (i, j)
‰ A backward arc at node i is one that enters
node i from some node j and is denoted by (j, i)
‰ A path connecting node i to node j is a
sequence of arcs starting at node i and
terminating at node j
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

4
NETWORK DEFINITION

 we denote a path by

P = { ( i, k ), ( k, l ), …, ( m, j ) }

 in the example network

( 1, 2 ), ( 2, 5 ), ( 5, 4 ) is a path from 1 to 4

( 1, 3 ), ( 3, 4 ) is another path from 1 to 4

‰ A cycle is a path with i = j , i.e.,

P = { ( i, k ), ( k, l ), …, ( m, i ) }
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

NETWORK DEFINITION

‰ We denote the set of nodes of the network by N

 the definition is

N = { i : i is a node of the network }

 In the example network

N = { s , 1, 2, 3, 4, 5, t }
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

5
NETWORK CUT

‰ A cut is a partitioning of nodes into two distinct


subsets S and T with
N = S ∪ T and S ∩ T = φ
‰ We are interested in cuts with the property that
s ∈ S and t ∈ T
 the sets S and T are said to provide an s - t
cut
 in the example network,
S = { s, 1, 2 } and T = { 3, 4, 5, t }
provide an s - t cut
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

NETWORK CUT

‰ The capacity of a cut is


Κ (S ,T ) = ∑ kij
i ∈S
j∈T
‰ In the example network with
S = { s, 1, 2 } and T = { 3, 4, 5, t }
we have
Κ (S , T ) = k13 + k25
but for the cut with
S = {s, 1, 2, 3, 4 } and T = { 5, t }
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

6
NETWORK CUT
Κ (S ,T ) = k4, t + k4, 5 + k3, 5 + k2, 5
Note : arc (5, 4) is directed from a node in T to a
node in S and is not included in the summation

‰ An important characteristic of the s - t cuts of

interest is that if all the arcs in the cut are


removed then no path exists from s to t

‰ Consequently no flow is possible since any flow


from s to t must go through the arcs in a cut and
thus the flow is limited by the capacity of the cut
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

NETWORK CUT LEMMA

‰ Lemma: for any directed network the flow f

from s to t is constrained by an s to t cut

f ≤ Κ (S , T ) for any cut S , T

‰ Clearly, this lemma implies that

max flow ≤ Κ (S , T ) ∀ S , T

and consequently

max flow ≤ min Κ (S , T )


S ,T

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

7
MAX FLOW MIN CUT THEOREM

‰ For any network, the value of the maximal flow

from s to t is equal to the minimal cut, i.e., the


cut S , T with the smallest capacity

‰ The max-flow min-cut theorem allows us, in

principle, to find the maximal flow in a network

by finding the capacities of all the cuts and

choosing the minimum capacity cut


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

MAX FLOW

‰ The maximal flow algorithm is based on finding


a path through which a positive flow from s to t
can be sent, the so called flow augmenting
path; the procedure is continued until no such
flow augmenting path can be found and
therefore we have the maximal flow

‰ The labeling procedure is used to find a flow


augmenting path from s to t
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

8
LABELING PROCEDURE

Step 0 : start with node s


Step 1 : label node j : node j can be labeled if
and only if flow can be sent from s to t ;
we label node j given that node i is
labeled only if
(i) either there exists an arc (i, j) and
fij < kij
(ii) or there exists an arc ( j, i ) and
fji < 0
Step 2 : if j = t , stop; else, go to Step 1
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

THE MAX FLOW ALGORITHM


Step 0 : start with a feasible flow
Step 1 : use the labeling procedure to find a flow
augmenting path
Step 2 : determine the maximum value δ for the
max increase (decrease) of flow on all
forward (backward) arcs
Step 3 : use the labeling procedure to find a flow
augmenting path; if no such path exists,
stop; else, go to Step 2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

9
EXAMPLE APPLICATION

‰ Consider the simple network with the flow


capacities on each arc indicated

7 1 9

s 3 t

9 8
2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE APPLICATION

‰ We initialize the network with a flow 1


f = 1

(1,7) 1 (0, 9)

s (1, 3) t

(0, 9) (1,8)
2

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

10
EXAMPLE APPLICATION

‰ We apply the labeling procedure


f = min { 6, 2, 7 } = 2

6 1

s 2 t

7
2

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE APPLICATION

‰ Consider the simple network with the flow


capacities on each arc indicated f = 3

(3,7) 1 (0, 9)

s (3, 3) t

(0, 9) (3, 8)
2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

11
EXAMPLE APPLICATION

‰ We repeat application of the labeling procedure

f = min { 5, 9 } = 5

s t

9 5
2

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE APPLICATION

‰ We increase the flow by 5


f = 8

(3,7) 1 (0, 9)

s t
(3, 3)

(5, 9) (8, 8)
2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

12
EXAMPLE APPLICATION

‰ We repeat application of the labeling procedure

f = min { 4, 9 } = 4

4 1 9

s t

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE APPLICATION

‰ We increase the flow by 4


f = 12

(7,7) 1 (4, 9)

s t
(3, 3)

(5, 9) (8, 8)
2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

13
EXAMPLE APPLICATION

‰ We repeat application of the labeling procedure

f = min { 4, 3, 5 } = 3
1 5

s t
3

4
2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE APPLICATION

‰ We increase the flow by 3


f = 15
(7,7) 1 (7, 9)

s (0, 3)
t

(8, 9) (8, 8)
2

no possibility of flow augmenting path


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

14
UNDIRECTED NETWORKS
‰ A network with undirected arcs is called an
undirected network: the flows on each arc ( i, j )
with the limit kij cannot violate the capacity
constraints in either direction

‰ Mathematically, we require

f ij ≤ kij ⎫ interpretation of

f ji ≤ k ji ⎪⎬ unidirectional flow below

f ij f ji = 0 ⎪⎭ capacity limit
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLES OF AN UNDIRECTED
NETWORK WITH ARCS
‰ Consider the network with the three unrestricted
arcs

30
1 3
40 50

s 15 20 25 t

30 30
2 4
50
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

15
EXAMPLE OF A NETWORK WITH
UNDIRECTED ARCS
‰ To make the problems realistic, we assume that
the numbers represent traffic flow capacities:
the directed arcs correspond to unidirectional
streets and the problem is to place one-way
signs on each street ( i, j ) not already directed
so as to maximize traffic flow from s to t

‰ The procedure is to replace each undirected arc


by two directed arcs ( i, j ) and ( j, i ) to deter-
mine the maximal s – t flow
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE OF A NETWORK WITH


UNDIRECTED ARCS
‰ Consider the network with the three unrestricted
arcs

1 30 3
40 50

s 15 15 20
25 25 t
20

30 30
2 4
50
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

16
EXAMPLE OF A NETWORK WITH
UNDIRECTED ARCS
‰ We apply the max flow scheme to the directed
network and give the following interpretations to
the flows on the max flow bidirectional arcs that
are the initially undirected arcs ( i, j ) : if
fij > 0 , fji > 0 and fij > fji
set up the flow from i to j with value fij – fji
and remove the arc ( j, i )
‰ The computation of the max flow f for this
example is left as a homework exercise
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE OF A NETWORK WITH


UNDIRECTED ARCS

(30 ,30)
30
1 3 (30
(40 ,50)
50
(40
(30 ,40)
40

20
s 15 15 25 (10 ,25)
25 t
20
(10 ,20)

30
(30 ,30) (30 ,30)
30
2 4
50
(30 ,50)

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

17
EXAMPLE OF A NETWORK WITH
UNDIRECTED ARCS
flow: s 1 3 n = 30
flow: s 2 4 n = 30

flow: s 1 4 3 t = 10

and so the maximum flow is 30 + 30 + 10 = 70


one way signs should be put from 1 4 and 4 3
an alternative routing of a flow of 10 is the path
s 1 2 4 3 t which would require one
way signs from 1 2 and 4 3
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

NETWORKS WITH MULTIPLE


SOURCES AND MULTIPLE SINKS

‰ We next consider a network with several supply

and several demand points

‰ We introduce a super source ŝ linking to all the

sources and a super sink t̂ linking all the sinks

‰ We can consequently apply the max flow

algorithm to the modified network


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

18
NETWORKS WITH MULTIPLE
SOURCES AND MULTIPLE SINKS

s1 t1
n
e
t
ŝ s2 w t2 t̂
o
. . .

. . .
r

sm k
tn
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

MULTIPLE SOURCE / MULTIPLE SINK


NETWORK EXAMPLE
15 sink with
2 5 demand 15
10 sink with
5
10 5 demand 20

1 3 5 6 10 8
20

5 5
sources 10 10
with
supply 20 4 5 7

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

19
MULTIPLE SOURCE / MULTIPLE SINK
NETWORK EXAMPLE
2 15 5
super sink
node t̂
10 15
5 t̂
10 5
20 20
ŝ 1 3 5 6 10 8
20

20 5
5 10 10
super source
node ŝ 5
4 7

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

MULTIPLE SOURCE / MULTIPLE SINK


NETWORK EXAMPLE
‰ The transshipment problem is feasible if and

only if the maximal sˆ − t̂ flow f satisfies

f = ∑
sinks
demands

‰ Show that the transshipment problem is infeas-

ible since the network cannot accommodate the

total demand of 35 ; also determine the small-

est shortage for this problem


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

20
MULTIPLE SOURCE / MULTIPLE SINK
NETWORK EXAMPLE

2 15 5 f
15
10 t̂
5
10 5
20
1 3 5 6 10 8
20

20 5 5
10 10

20 4 5 7
f
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

MULTIPLE SOURCE / MULTIPLE SINK


NETWORK EXAMPLE

‰ The minimum cut is shown and has capacity

15 + 5 + 5 + 5 = 30

and the maximum flow is, therefore, 30

‰ Since the maximum flow fails to meet the total

demand of 35 units, the problem is infeasible;

the minimum shortage is 5


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

21
APPLICATION TO MANPOWER
SCHEDULING
‰ Consider the case of a company that must comp-
lete 4 projects in 6 months
manpower
earliest start latest finish
project requirements
month month
( person/month )

A 1 4 6

B 1 6 8

C 2 5 3

D 1 6 4
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

APPLICATION TO MANPOWER
SCHEDULING
‰ There are the following additional constraints:

 the company has only 4 engineers

 at most 2 engineers may be assigned to any


one project in a given month

 no engineer maybe assigned to more than


one project at any time

‰ The question is whether there is a feasible


assignment
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

22
APPLICATION TO MANPOWER
SCHEDULING
‰ The solution approach is to setup the problem
as a transshipment network
 the sources are the 6 months
 the sinks are the 4 projects
 arcs ( i, j ) are introduced whenever a
feasible assignment of the engineers in
month i can be made to project j ; each arc
has capacity
kij = 2 i = 1, 2, …, 6 , j = A, B, C, D
 there is no arc ( 1, C ) since project C cannot
start before month 2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

APPLICATION TO MANPOWER
SCHEDULING
4 1
A 6
4 2
8
man / months

B
man / months

demands

4 3
supply

4 4 C 3

4 5
D 4
4 6 each arc has capacity 2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

23
APPLICATION TO MANPOWER
SCHEDULING

‰ The transshipment problem is feasible if the total

demand 6 + 8 + 3 + 4 = 21 can be met

‰ As a homework problem, determine whether a

feasible schedule exists and if so, find it


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

APPLICATION TO MANPOWER
SCHEDULING
1 (2, 2)
(4, 4) (2, 2) (2, 2) A (6, 6)

(4, 4)
2 (2, 2)

(2, 2)
(4, 4)
(2, 2) B (8, 8)
3
ŝ (2, 2) t̂
(4, 4) 4 (2, 2) (1, 2) C (3, 3)

(3, 4)
5 (2, 2)
(2, 4)
D (4, 4)

6 (2, 2)
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

24
APPLICATION TO MANPOWER
SCHEDULING
(2, 2)
1 (6, 6)
(4, 4) (2, 2) (2, 2) A
21
(4, 4)
2 (2, 2)

(2, 2) (8, 8)
(4, 4)
(2, 2) B
3
ŝ (2, 2) t̂
(3, 3)
(4, 4) 4 (2, 2) C
(1, 2) 21
(3, 4)
5 (2, 2)
(4, 4)
(2, 4)
D
6 (2, 2)
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

SHORTEST ROUTE PROBLEM


‰ The problem is to determine the shortest path
from s to t for a network with a set of nodes
N = { s = 1, 2, …, n = t }
and arcs ( i, j ) where for each arc ( i, j ) of the
network
dij = distance or transit time
‰ The determination of the shortest path from 1 to
n requires the specification of the path
{ ( 1, i1 ) , ( i1, i2 ) , …, ( iq , n ) }
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

25
SHORTEST ROUTE PROBLEM

‰ We can write an LP formulation of this problem in


the form of a transshipment problem:

ship 1 unit from node 1 to node n by


minimizing the shipping costs given the
parameters

dij = shipping costs for 1 unit from i to j ;


for i and j are not directly connected,

dij = ∞
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

DIJKSTRA’S ALGORITHM
‰ The solution is very efficiently performed using
Dijkstra’s algorithm

‰ The assumptions are

 dij is given for each pair of nodes

 dij ≥ 0

‰ The scheme is basically a label assignment


procedure, which assigns nodes with either a
permanent or a temporary label
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

26
DIJKSTRA’S ALGORITHM

‰ The temporary label of node i is the upper

bound on the shortest distance from node 1 to

node i

‰ The permanent label is the actual shortest

distance from node 1 to node i


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

DIJKSTRA’S ALGORITHM
Step 0 : assign the permanent label 0 to node 1
Step 1 : assign the temporary labels to all the other
nodes
 d1j if node j is directly connected to
node 1
 ∞ if node j is not directly connected
to node 1
and select the minimum of the temporary
labels and declare it permanent ; in case
of ties, the choice is arbitrary
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

27
DIJKSTRA’S ALGORITHM
Step 2 : let A be the node most recently assigned
a permanent label and consider each node
j with a temporary label; recompute the
label to be
⎪⎧ temporary label permanent label ⎪⎫
min ⎨ , + d Aj ⎬
⎪⎩ of node j of node A ⎪⎭

Step 3 : select the smallest of the temporary labels


and declare it permanent ; in case of ties,
the choice is arbitrary
Step 4 : if this is node n , stop; else, go to Step 2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

DIJKSTRA’S ALGORITHM

‰ The shortest path is obtained by retracing the

sequence of permanently labeled nodes back

from n to the node 1

‰ The path is then given in the forward direction

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

28
EXAMPLE : SHORTEST PATH

‰ Consider the undirected network


9
2 6
3 6
2

1 7 3 3

1 3
4
4 5
3
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE : SHORTEST PATH

‰ The problem is to

 find the shortest path from 1 to 6

 compute the length of the shortest path

‰ We apply the Dijkstra algorithm and assign

successively a permanent label to each node


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

29
EXAMPLE : SHORTEST PATH

0
3,7,4,∞ ,∞ ⎤⎦
Steps 0 and 1 : L (0 ) = ⎡⎣0 ,,3,7,4,
1

Steps 2 : L (1) = 3, 5, 4, ∞ ,12 ⎤⎦


⎡0 ,,3,5,4,

2

Steps 2,3 and 4 : L (2) = ⎡0 ,3,5,4,7,12



, 3, 5, 4,7,12⎤⎦
3
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE : SHORTEST PATH

Steps 2,3 and 4 : L (3) = ⎡0 ,,3,5,4,7,11



3, 5, 4, 7,11⎤⎦
4

Steps 2,3 and 4 : L (4) = ⎡0 ,,3,5,4,7,10



3, 5, 4, 7,10⎤⎦
5

L (4) = ⎡0,3,5,4,7,10 ⎤
⎣ ⎦
6
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

30
EXAMPLE : SHORTEST PATH

9
2 6 5
3 1 6
2

1 7 3 3 3
0

1 3
4 2
4 5 4
3
‰ The shortest distance is 10 and we get the path
{ ( 1, 4 ) , ( 4, 5 ) , ( 5, 6 ) }
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

PATH RETRACING
‰ We retrace the path from n back to 0 using the
scheme:

pick node j preceding node n as the node


with the property

permanent label of shortest


+ djn =
node j distance

‰ In the retracing scheme, certain nodes may be


skipped
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

31
SHORTEST PATH BETWEEN ANY TWO
NODES

‰ Dijkstra’s algorithm may be applied to

determine the shortest distance between any

pair of nodes i , j by taking i as the source

and j as the sink

‰ Consider as an example the following five node

network
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE : PATH RETRACING

4 8 10
0 1 2 3 4
3 3 2 3
4 4 8

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

32
EXAMPLE : SHORTEST PATH

L (0 ) = 3,4,8,10,∞ ⎤⎦
⎡0 ,,3,4,8,10,

0

L (1) = ⎡0 ,,3,4,7,10

3, 4,7,10 ⎤⎦
1

L (2) = ⎡0 ,3,4,6,8

, 3, 4, 6,8⎤⎦
2
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EXAMPLE : SHORTEST PATH

L (3) = ⎡0 ,,3,4,6,8

3, 4, 6, 8 ⎤⎦
3
Retracing the path we get
8 = 4
O + d 24
 
node 2 4

and so the path is


0 →2→4
gives the shortest distance from 0 to every other
node
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

33
EXAMPLE : PATH RETRACING

1 4 8 3 10
2
0 1 2 3 4 4
3 3 2 3
4 4 8
0

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

APPPLICATION : EQUIPMENT
REPLACEMENT PROBLEM
‰ We consider the problem of replacing old
equipment or continuing its maintenance

‰ As equipment ages, the level of maintenance


required increases and typically, this results in
increased operating costs

‰ O&M costs may be reduced by replacing aging


equipment; however this increases capital
investment costs
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

34
APPPLICATION : EQUIPMENT
REPLACEMENT PROBLEM

‰ The problem is how often to replace equipment

in order to minimize

total capital O&M


= +
costs costs costs

fixed variable

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

EQUIPMENT REPLACEMENT
PROBLEM
‰ Equipment replacement is planned during the
next 5 years
‰ The cost elements are
pj = purchase costs in year j
sj = salvage value of original
equipment after j years of use
cj = O&M costs in year j of operation
of equipment with the property that
… cj < cj+1 < cj+2 < …
‰ We formulate the equipment replacement
problem as a shortest route problem on a
directed network
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

35
EQUIPMENT REPLACEMENT PROBLEM
end of
planning
d16
d15 period
d14 d36
d13 d35

1 d12
2 d23
3 4 5 6
d34 d45 d56

d24 d46
d25
beginning of d26
planning period
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

APPPLICATION : EQUIPMENT
REPLACEMENT PROBLEM

where, the “distances” dij are defined to be


finite if i < j , i.e., year i precedes the year j ,
with
j−i
d ij = pi − s j−i + ∑ cτ
τ =1
j > i
 

purchase salvage value O&M costs


price in after j – i for j - i years
year i years of use of operation
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

36
APPPLICATION : EQUIPMENT
REPLACEMENT PROBLEM
‰ For example, if the purchase is made in year 1
5
d16 = p1 − s5 + ∑c
τ =1
τ

‰ The solution is the shortest distance path from


year 1 to year 6 ; if for example the path is
{ ( 1, 2) , (2, 3) , (3, 4) , (4, 5) , (5, 6) }
then the solution is interpreted as the replace-
ment of the equipment each year with
5
total costs = ∑
i =1
pi − 5 s1 + 5c1
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

COMPACT BOOK STORAGE IN A


LIBRARY
‰ This problem concerns the storage of books in a
limited size library

‰ Books are stored according to their size, in


terms of height and thickness, with books
placed in groups of same or higher height; the
set of book heights { Hi } is arranged in
ascending order

H1 < H2 < … < Hn


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

37
COMPACT BOOK STORAGE IN A
LIBRARY
‰ Any book of height Hi may be shelved on a
shelf of height ≥ Hi

‰ The length Li of shelving required for height


class i is computed given the thickness of each
book; the total shelf area required is ∑i H i Li

if only 1 height class [ corresponding to the


tallest book ] exists, total shelf area required
is the total length of the thickness of all
books times the height of the tallest book
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

COMPACT BOOK STORAGE IN A


LIBRARY
 if 2 or more height classes are considered,
the total area required is less than the total
area required for a single class

‰ The costs of construction of shelf areas for each


height class Hi have the components

si fixed costs [ independent of shelf area ]

ci variable costs / unit area


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

38
COMPACT BOOK STORAGE IN A
LIBRARY
‰ For example, if we consider the problem with 2
height classes Hm and Hn with Hm < Hn
 all books of height ≤ Hm are shelved in shelf
with height Hm
 all other books are shelved on the shelf with
height Hn
‰ The corresponding total costs are
⎡ m ⎤ ⎡ n ⎤
⎢ sm + c m H m
⎢⎣
∑ L j ⎥ + ⎢ sn + c n H n
⎥⎦ ⎢⎣
∑ Lj ⎥

j =1 j = m +1 ⎦
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

COMPACT BOOK STORAGE IN A


LIBRARY
‰ The problem is to find the set of shelf heights and
lengths to minimize the total shelving costs

‰ The solution approach is to use a network flow


model for a network with the

 set of n + 1 nodes
N = { 1, 2, . . . , n }
corresponding to the n + 1 book heights with

1 ↔ H1 < H2 < … < Hn ↔ n


ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

39
COMPACT BOOK STORAGE IN A
LIBRARY

 directed arcs ( i , j ) only if j > i resulting in

a total of n ( n + 1) arcs
2

 “distance” dij on each arc given by

⎧ j
⎪ s + cj H j
d ij = ⎨ j ∑
k = i +1
Lk if j > i
⎪ ∞ otherwise

ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

COMPACT BOOK STORAGE IN A


LIBRARY
‰ For this network, we solve the shortest route

problem for the specified “distances” dij

‰ Suppose that for a problem with n = 17 , we

determine the optimal trajectory to be

{ ( 0, 7 ) , ( 7, 9 ) , ( 9, 15 ) , (1 5, 17 ) }
the interpretation of this solution is :
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

40
COMPACT BOOK STORAGE IN A
LIBRARY
 store all the books of height ≤ H7 on the
shelf of height H7
 store all the books of height ≤ H9 but > H7
on the shelf of height H9
 store all the books of height ≤ H15 but > H9
on the shelf of height H15
 store all the books of height ≤ H17 but >
H15 on the shelf of height H17
ECE 307© 2006 George Gross, University of Illinois at Urbana-Champaign, All Rights Reserved.

41

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy