Download presentation
Presentation is loading. Please wait.
Published byDelphia McCoy Modified over 9 years ago
1
1 Chapter 2 Notation and Definitions Data Structures Transformations
2
2 Node-Arc Incidence Matrix Consider the network in Figure 2.13, p. 32. The flow- conservation constraints in the LP formulation are: Notice that these have a very special form. If we extract the coefficients of the variables into a matrix we get:
3
3 It has a row for each node and a column for each arc (n x m) The matrix consists of 0, +1 and –1 entries Each column contains one +1 (tail/from) and one –1 (head/to) The +1’s in a node’s row identify all the arcs emanating from that node The –1’s in a node’s row identify all the arcs directed into it
4
4 Node-Node Adjacency Matrix The (i, j)th element of this n x n matrix contains a 1 if there is an arc (i, j) and a 0 otherwise The 1’s in a node’s row indicate arcs emanating from it The 1’s in a node’s column identify arcs directed into it
5
5 Adjacency List Both the incidence and the adjacency matrix are inefficient for sparse networks. An alternative is to use linked lists to store the arcs that exist. Following the pointers from first(i) identifies all the arcs emanating from node i, along with their costs and capacities. 2 2530 4 2 3 3 4 5 3 4015 45 15 2535 45 35 10 30 2050 60 500 0 0 0 0 Array first 1 2 3 4 5
6
6 Forward Star Similar to the adjacency list but uses fixed-size arrays rather than linked lists. pointtailheadcostcapacity 111122530 232133550 343241540 454324510 575431530 696454560 7532520 8543550 nodearc
7
7 Arcs are numbered in order of those directed out of node 1, followed by those directed out of node 2, etc. To find all the arcs directed out of node i (along with cost & capacity), go to point(i), which stores the index of the first arc directed out of node i and stop when you get to point(i+1) – 1. A reverse star is similar except it is organized according to arcs directed into each node. Storing both the forward and reverse star means a lot of duplicated information; it can be reduced by a compact forward and reverse star representation.
8
8 Forward and Reverse Star pointtailheadcostcapacitytracerpoint 1111225301111 2321335504212 3432415402333 4543245105464 5754315307585 6964545603696 753252087 854355068
9
9 Network Transformations Simplify a network Show that two network formulations are equivalent State in a standard form required by a solution algorithm Transformations we will use: –Change undirected arcs to directed arcs –Remove lower and upper bounds –Arc reversal (to change negative costs to positive) In each case, the resulting network is equivalent (w.r.t. optimization) to original –at least some of the optimal solutions for the original network remain optimal in the transformed network
10
10 Transform Undirected Arcs to Directed Original undirected arc {i, j} has cost c ij 0 and capacity u ij (this only works if l ij = 0). –Constraint –Term in objective function –In some optimal solution, at least one of {x ij, x ji } will be zero (non- overlapping) Transformed network has two directed arcs (i, j) and (j, i) –Each has cost c ij and capacity u ij –If original arc {i, j} has (non-overlapping) flow from i to j and 0 from j to i, then in transformed net, x ij = , x ji = 0. –If transformed network has flows x ij and x ji, then original network has flow
11
11 Remove Nonzero Lower Bounds Original arc (i, j) has lower bound l ij > 0 Let “excess flow” Flow bound constraint becomes Effect is to decrease b(i) by l ij and increase b(j) by l ij A constant amount c ij l ij is subtracted from the objective function – does not affect set of optimal solutions Fig. 2.19 should be: (direction of arc unchanged) iijj b(i)b(i)b(i)- l ij b(j)b(j)b(j)+l ij x ij x ij ’ (c ij, u ij ) (c ij, u ij - l ij )
12
12 Change Negative Cost to Positive Reverse direction of the arc by replacing x ij by u ij - x ji Effect is to replace arc (i, j) with cost c ij by an arc (j, i) with cost -c ij Reversal subtracts u ij from b(i) and adds it to b(j) Equivalent to sending u ij units of flow across (i, j) and then subtracting back the new flow x ji iijj b(i)b(i)b(i)- u ij b(j)b(j)b(j)+u ij x ij x ji (c ij, u ij ) (-c ij, u ij )
13
13 Remove Arc Capacities Introduce a slack variable s ij 0 so the upper bound constraint becomes Interpret constraint as the conservation of flow constraint for a new node k (flow in = demand of u ij ). Subtract this new constraint from the cons. of flow constraint for node j. ik b(i)b(i) b(j)+u ij x ij ij b(i)b(i)b(j)b(j) (c ij, u ij ) (-c ij, ) j -u ij (0, ) s ij
14
14 Remove Capacities (cont.) If every arc in the original network is capacitated, applying this transformation to each of them results in a bipartite uncapacitated network. –Each original node i becomes a supply node with –Each newly created node (inserted in arc (i, j)) is a demand node with demand u ij Original capacitated minimum cost network flow problem with n nodes and m arcs is equivalent to uncapacitated transportation problem with n supply nodes and m demand nodes.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.