Presentation is loading. Please wait.

Presentation is loading. Please wait.

TRLabs & University of Alberta © Wayne D. Grover 2002, 2003, 2004

Similar presentations


Presentation on theme: "TRLabs & University of Alberta © Wayne D. Grover 2002, 2003, 2004"— Presentation transcript:

1 TRLabs & University of Alberta © Wayne D. Grover 2002, 2003, 2004
ECE 780 - Lp_solve example, LP tactics, Min cost network flow, multi-commodity max flow, W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003, 2004

2 Revisit mesh “SCP” problem
Min sum of spare capacity i P p w f = å 1 ÷ ø ö ç è æ × j s , d Restoration flows for each failure = failed working capacity “Restorability” S.t. Restoration flows must be feasible under spare capacity “Spare Capacity” How would this be expressed as an lp_solve model... ?

3 Sample network for example of mesh “SCP”
7 B 4 C SCP = spare capacity placement here, spans all have equal length or cost span working capacity quantities are shown Problem is to place spare capacity for 100% restorability via span restoration. 8 E 10 7 2 4 12 F G Z 6 9

4 Lp_solve example for mesh SCP
/* Objective function */ min: Sab+Sbe+Seg+Sag+Saf+Sgf+Sbc+Scz+Sez+Sfz; /* The sum of all the flows on the different routes for restoration */ /* of span i must be greater or equal to wi */ f1 + f2 + f3 >= 7; /* span A-B */ (see next slide for interpretation) f4 + f5 + f6 + f7 >= 8; /* span B-E */ f8 + f9 + f10 + f11 >= 12; /* span E-G */ f12 + f13 + f14 >= 5; /* span A-G */ f15 + f16 + f17 + f18 >= 10; /* span A-F */ f19 + f20 >= 6; /* span G-F */ f21 + f22 >= 4; /* span B-C */ f23 + f24 >= 6; /* span C-Z */ f25 + f26 + f27 + f28 >= 4; /* span E-Z */ f29 + f30 + f31 + f32 >= 9; /* span F-Z */ One line per span failure The details come from the route identified for restoration, and the associated flow variable for defined for each route

5 Sample network for example of mesh “SCP”
7 B 4 C as a first step the “eligible restoration routes” for each failure are identified. For example, three distinct eligible routes for restoration of span A-B under 4 hops might be as shown…(examples only) 8 E 10 7 2 4 12 F G Z 6 9 Flow variables defined for A-B as a failure span f1 f2 f3 Illustration explaining the first “restorability” constraint...

6 Lp_solve example for mesh SCP
/* The spare capacity on each span must be >= to the sum of the flows /* on routes that cross this span for every failure scenario */ /* Span A-B */ Sab - f4 - f5 - f6 >= 0; /* failure of B-E */ Sab - f8 - f9 >= 0; /* failure of E-G */ Sab - f14 >= 0; /* failure of A-G */ Sab - f17 - f18 >= 0; /* failure of A-F*/ Sab - f22 >= 0; /* failure of B-C */ Sab - f24 >= 0; /* failure of C-Z */ Sab - f26 >= 0; /* failure of E-Z */ Sab - f31 - f32 >= 0; /* failure of F-Z */ /* Span B-E */ Sbe - f1 - f2 >= 0; /* failure of A-B */ Sbe - f8 - f9 >= 0; /* failure of E-G */ Sbe - f14 >= 0; /* failure of A-G */ ....etc... (produces S sets of (S-1) additional constraints) The exact definition of eligible restoration routes and corresponding flow variables is needed to produce this level of detail.

7 Illustration: explaining the first spare-capacity generating constraint
/* Span A-B */ Sab - f4 - f5 - f6 >= 0; /* failure of B-E */ ……. A 7 B 4 C as a first step the “eligible restoration routes” for each failure are identified. For example, three distinct eligible routes for restoration of span A-B under 4 hops might be as shown…(examples only) f4 8 f1 E 10 f5 7 2 f6 4 f3 12 F f2 G Z 6 9 F1, f2, f3 do not cross span A-B when B-E failure is considered f4, f5, f6 do cross span A-B when B-E failure is considered

8 Tips on formulating LP / IP’s
Mutual exclusion: - e.g. Each working demand flow may have only one route - use a “radio button” constraint: where is a decision variable to use route i or not. Peak minimizing: - e.g. Minimize the worst case “oversubscription” on all spans j over all failures, i cannot write min { max {function}} in an LP / IP - can write : min Z Z - zij >= 0 for every i,j

9 Bi-criteria or multi-objective LP / IP’s
Sometimes our notion of optimality depends on more than one criterion (with different units or measures) - can form a two term objective function - “blended” by some weighting factor e.g.: perhaps: (Z1 ~ capacity Z2~ restoration paths length) (Z1 ~ cost Z2~ uncertainty) Solve family of problem instances with varying “alpha” result is the “Pareto optimal” solution set - shows the shape of the “trade-off” of one goal versus the other - discrete (as shown) if IP - continuous Pareto curve if LP

10 Handling Modular Capacity
Sometimes capacity can only be placed in discrete modules, with associated cost e.g. OC-48, OC but demand flows are still integer or even real valued change objective function from Min (capacity) to Min (sum of all modules used * module cost) s.t. Sum of (modules placed * module capacity) >= capacity needed (book p. 249)

11 Min-cost Network flow (MCNF)
so far with the LP method we have looked at finding maximum flow, subject to constraining capacities. A related problem is to support a specified flow, between source and target nodes at min cost for the edges used. Two - terminal MCNF : S.t. Where Cij = edge capacities Optionally also :

12 “Unimodularity” Maximum flow and Min cost network flow
are problems know to have “special structure” also called “network structure” ..... If all the inputs are integer, ... the solution will be integer even if you solve it as a Linear Program not as an Integer Program. The mathematical property is called “unimodularity” and it is an important computational advantage whenever a problem has this special mathematical structure. Intuitively, the solution is “trapped” onto discrete integer solution values...no operations in the formulation can fractionate the flow variables

13 “Unimodularity” More formally, unimodularity requires that the matrix A formed by the constraint system of an IP formulation: Ax < c has the properties *: (i) every ai,j is {-1,0,1}. (ii) each column contains at most 2 non-zero coefficients. (iii) there exists a partition (M1,M2) of the set M rows such that the sum of coefficients in columns of M1 is equal and opposite to the corresponding sum of coefficients M2 Unimodularity can depend on the data involved, not just problem structure

14 Related network flow formulations
(Chapter 4) Multisource-sink Min cost network flow - same objective - every node has source or sink b_i quantity of “commodity” i - this canonical “transportation problem” is not quite the same as the communications version…. - It describes net flows from several factories to several distribution sites. Multi-commodity max flow (MCMF) - numerous source-sink pairs (each a “commodity”) are simultaneously trying to maximize flow through common set of finite edge capacities > Closely related to later “path restorable mesh” problem. (a) pure max sum version (b) maximize smallest proportion of a requirement

15 Classical min-cost “transportation problem”
Routing costs A 7 B 4 C stores 8 E 10 All one “commodity” 7 2 4 12 F factories G Z 6 9 Question is: what assignment of flows to edges supplies all stores from available factories at minimum cost?

16 Communications version: min-cost multi-commodity flow
Routing costs City A (sink ~store) A 7 B 4 C stores 8 Each city pair is a “commodity” only one factory and one store for each commodity E 10 7 2 4 12 F City Z (source ~factory) G Z 6 9 A-Z commodity C-G commodity Question is: what assignment of flows to each edge for each commodity meets all requirements at minimum routing cost?

17 Communications version: min-cost multi-commodity flow
Two cases of MCMF: A. no limits on capacities of edges…. B. finite capacities on edges. ---> shortest path (least cost) routing for each commodity is optimal (trivial problem) ---> shortest path (least cost) routing for each commodity is not optimal becomes “NP- hard” problem the difficulty is the “mutual capacity” issue will be at the heart of our later study of the path-restoration problem

18 Quick guide to computational complexity

19 Why theoretical complexity matters
Integer programming (IP) is NP-hard.. and exhibits this behaviour in practise Linear programming (LP) (by simplex algorithm) is theoretically NP-hard but polynomial time in most cases. Some newer LP algorithms are provably polynomial time. Some Integer Programming problems are “uni-modular” - solve as an LP without losing integrality Other IP s or combinatorial optimization problems in general require heuristic (or meta-heuristic) solutions.


Download ppt "TRLabs & University of Alberta © Wayne D. Grover 2002, 2003, 2004"

Similar presentations


Ads by Google