An Exact Algorithm for the Capacitated Shortest Spanning

19 downloads 0 Views 177KB Size Report
out-degree of vertex r equal to a given value D ⇒ D branches (NP-Hard). Paolo Toth, Daniele ... Branch and Bound algorithm with a Lagrangian lower bound.
An Exact Algorithm for the Capacitated Shortest Spanning Arborescence

Paolo Toth, Daniele Vigo D.E.I.S. - Universit`a di Bologna

EURO XIII - Glasgow

Capacitated Shortest Spanning Arborescence

1

• complete and loop-free directed graph G = (V, A); • V = {1, . . . , n}; • root vertex r ∈ V ; • vertex demand, qi ≥ 0, i ∈ V (qr = 0); • A = {(i, j), i, j ∈ V, i 6= j, j 6= r}; • w.l.o.g. we assume arc cost, cij ≥ 0 (cij = +∞ if (i, j) 6∈ A); • branch capacity, Q; • Shortest Spanning Arborescence rooted at r (SSAr ) f f minimum cost partial digraph G = (V, A), such that:

i) each j 6= r has exactly one entering arc (n − 1 arcs); f ii) G is r-connected

SSAr ∈ P (O(n2)): Edmonds (JRNBS, 1967), Tarjan (Netw., 1977), Camerini et al. (Netw., 1979), Fischetti, Toth (ORSA J.C., 1993). • Capacitated SSAr (CSSAr ): minimum cost partial digraph G∗ = (V, A∗), such that: i) G∗ is a SSAr ; ii) the total demand of each branch leaving r does not exceed Q. CSSAr is NP-Hard: Papadimitriou (Netwoks, 1978) • Degree Constrained CSSAr (D-CSSAr ): out-degree of vertex r equal to a given value D ⇒ D branches (NP-Hard) Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

'

2

$ ( ((((  j j kQ Q  ' $ *  Q   j j $ ' 6 j 6 j I @ y X XXX @ j @ j j j 6 &6 %  o S S j & % 3   j   i P j PP  )  PP  PP  & %

K=3

Total demand ≤ Q

r

Previous work on CSSAr Directed case: – B. Gavish (Journ. of ACM, 1983): special case with qj = 1, ∀j ∈ V , lower bounds based on D-W decomposition, heuristic algorithm. – Chandy and Lo (Networks, 1973), Kershenbaum (Networks, 1974), Elias and Ferguson (IEEE T. Comm., 1974), etc ⇒ Heuristic algoritms.

Undirected case (Capacitated Shortest Spanning Tree, CSST): – Malik and Yu (Networks, 1993): Branch and Bound algorithm with a Lagrangian lower bound. To our knowledge, no exact approach for D-CSSAr has been proposed

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

3

Integer Linear Programming Model • directed graph G(V, A); • V 0 = V \ {r}; • F set of all proper subsets of V 0; • σ(S) min. number of branches needed to serve vertex set S ∈ F ∪ V 0 P (BP P , σ(S) ≥ d j∈S qj /Qe), K = σ(V 0).   

xij :=  

1 if (i, j) is in the optimal solution, 0 otherwise

v(CSSAr ) = min

n X n X

cij xij

(1)

for each j ∈ V 0,

(2)

i=1 j=1

subject to n X i=1 n X j=1 X

X

xij

= 1,

xrj

≥ K,

xij

≥ σ(S)

(3) for all S ∈ F,

(4)

i∈V \S j∈S

xij ≥ 0, integer for i, j = 1, . . . , n.

(D-CSSAr )

n X j=1

xrj = D,

(5)

(3’)

⇒ All the relaxations proposed in the following can be easily extended to D-CSSAr problem Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

4

Relaxation L1 capacity-cut constraints ⇒ cut constraints (K-SSAr )

v(K-SSAr ) = min

n X n X

cij xij

(1’)

xij = 1, for each j ∈ V 0,

(2)

xrj ≥ K,

(3)

i=1 j=1

subject to n X i=1 n X j=1

X

X

xij ≥ σ(S) → 1 for all S ∈ F,

(4’)

i∈V \S j∈S

xij

≥ 0,

for i, j = 1, . . . , n.

(5’)

• SSAr with out-degree at least K at vertex r (K-SSAr ). • K-SSAr ∈ P : requires O(n2) time by adapting the Gabow and Tarjan (J. of Al., 1984) algorithm for D-SSAr . Alternative solution method: Lagrangian relaxation of (3): λ ≥ 0

v(L1(λ)) = min min

n X n X i=1 j=1 n X n X i=1 j=1

cij xij − λ(

n X j=1

xrj − K) =

c0ij xij + λ · K

subject to (2), (4’), and (5’).   

c0ij :=   Paolo Toth, Daniele Vigo

cij for i 6= r, and j = 1, . . . , n; cij − λ for i = r, and j = 1, . . . , n. D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

5

• for each λ ≥ 0: v(L1(λ)) is a valid lower bound for CSSAr ; • L1(λ) ∈ P (is a SSAr ) ⇒ O(n2) time Lagrangian dual problem: v(L1(λ∗)) = max

v(L1(λ)).

λ≥0

Proposition 1. If the solution of the SSAr corresponding to L1(0) satisfies the out-degree constraint (3) then λ∗ = 0; otherwise λ∗ is any λ value such that the out-degree of the optimal solution of L1(λ) is exactly equal to K.

v(L1 (λ))

δ(λ) = K 6

δ(λ) = K − 1 B  BN    

δ(λ) = K + 1 ?

, , , , , ,     

0

 aa aa a l l l l J δ(λ) = n − 1 J  J  JJ  B  B B  B B B B B AK B λmax B B

λ

v(L1(λ)) is a concave function of λ: ⇒ λ∗ can be determined through binary search (on average better than Gabow and Tarjan if “well initialized”)

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

6

Relaxation L2 L1(λ) + Lagrangian relaxation of some capacity-cut constraints (family F = {S1, . . . , St} ⊆ F) (µh ≥ 0)

X

xij ≥ σ(Sh)

X

for all Sh ∈ F

(4”)

i∈V \Sh j∈Sh

v(L1 (λ)) z n X n X

v(L2(λ, µ)) = min

i=1 j=1 n X n X i=1 j=1

}|

{

c0ij xij c00ij xij

+ λK −

t X

µh (

h=1

+λ·K +

t X

X

X

xij − σ(Sh)) =

i∈V \Sh j∈Sh

µh · σ(Sh)

(1”)

h=1

subject to n X i=1

X

xij = 1, for each j ∈ V 0,

(2)

xij ≥ 1 for all S ∈ F,

(4’)

xij ≥ 0 for i, j = 1, . . . , n.

(5’)

X

i∈V \S j∈S

where c00ij

      

:=      

crj − λ −

X

µh

for i = r, and j = 1, . . . , n;

h:j∈Sh

cij −

X

µh for i 6= r, and j = 1, . . . , n.

h:i∈V \Sh ,j∈Sh

• L2(λ, µ) ∈ P : (is a SSAr ) ⇒ O(n2) time.

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

7

Subgradient optimization procedure Lagrangian dual problem: v(L2(λ∗, µ∗)) = max {v(L2(λ, µ))} . λ,µ≥0

⇒ Procedure analogous to Cutting-plane approach: (Fisher (symmetric V RP ), Malik and Yu (CSST ), Toth and Vigo (V RP B)) iterative strengthening of the Lagrangian problem by “separating” new violated capacity-cut constraints, and adding them to set F (set F is initially empty). • Separation starting from the optimal solution of the current Lagrangian problem; • Optimization of the current set of Lagrangian multipliers through a subgradient optimization procedure; • iterate until the solution is feasible or after a given number of iterations has been performed. Two level subgradient optimization procedure: given the set F • We separately optimize the multipliers µ, and λ – outer level: updating of multipliers µ; – inner level: subgradient optimization only for λ (with µ fixed) using relaxation L1.

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

8

Separation of violated capacity-cuts x ⇒ optimal solution of the current Lagrangian problem Exact separation procedure: for each j ∈ V 0, • Xj : subset of all the vertices belonging to the sub-arborescence in x rooted at j, • wj : total demand of subset Xj . • if wj > Q ⇒ the capacity-cut for S = Xj is violated (σ(Xj ) > 1 and only one arc in x enters subset Xj ) ⇒ add subset Xj to family F. $ $

' '

4

l 6

Xj (wj = 19)

: l   l

l5 oS S S S

5



2

3 jl

l J ] J J

l

&

6

%

 l2 : 4  l  h    Z &  Z   Z  Z   Z  Z  Z h h Z l  r

l } Z Z

Q = 17

%

X (w = 25)

• The computation of all wj , j ∈ V 0, can be performed in O(n) time Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

9

Min-cost flow relaxation Let {S1, . . . , Sm} be a given proper partition of V 0.   

A := A1 ∪ A2 ⇒  

A1 arcs “internal” to the given subsets, A2 arcs connecting vertices of different subsets

• lower bound based on projection δ := θ1 + θ2, X (θi, i = 1, 2, lower bound on (cij : (i, j) ∈ A∗ ∩ Ai) for every (optimal) CSSAr solution A∗ ⊂ A). • cij ≥ 0 for all (i, j) ∈ A, ⇒ θ1 = 0. (F R)

θ2 = min

X

cij xij

(6)

(i,j)∈A2

subject to xij ≤ 1, for each j ∈ V 0,

X

(2’)

i:(i,j)∈A2 n X j=1

X

X

xrj ≥ K,

(3)

xij ≥ σ(Sh) for h = 1, . . . , m,

(4”)

i∈V \Sh j∈Sh

xij ≥ 0, (integer) for all (i, j) ∈ A2

Paolo Toth, Daniele Vigo

(7)

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

10

F R can solved efficiently (O(n3)), since it can be viewed as an instance of a min-cost flow problem on the following auxiliary layered network:

0,|S1 | − σ(S1 ) @ @  @ @ *   HH @       R @ HH  j - b1 a1 0, +∞  0,1    3 Q  S ... ...  C Q    S QQ   C s S  C S   C S ... ...  C S  0,|Sh | − σ(Sh )C @ S  C @   S  C @ S C 0,|S1 | 0, +∞  @ S  C *    HH @  S     C   R @ H  j H S  C w i− S - i+ - bh ah  C 0, +∞ 0,1      Q  C 3 A . . . . . . J    Q

    C QQ   A J

s  C  A J cij ,1

    A C J

  C J

0,|Sh |A C   0, +∞ A J

  A C J

  C A J

  AU CW J

... ... −(n − 1) t s (n − K − 1) J

  J

  7  AS J

 0,|S | m A S 0, +∞ J

cji ,1 Q  3    AS Q J 

  Q    A S  s J ^ 0, +∞

0,1 Q  w A S - j+ - bm am j− A      Q ... ... 7  A  3 @ Q   A  @ QQ s  A  @   A  @ A  @ 0, +∞ @ A  0,|Sm | − σ(Sm ) A  A crj , 1 A  A  A  A  AU r  

(K)

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

11

Additive bounding procedure • According to the additive approach (Fischetti and Toth, 1989), different bounding procedures can be combined together into an overall additive bound. • The additive approach has been succesfully applied to several graph theory problems (AT SP , M D-V SP , asymmetric CV RP ...) ⇒ The additive bounding procedure is used at the beginning of the subradient optimization procedure. 1. solve the initial relaxation L1(λ∗) (set F is empty) and compute the associated residual costs; 2. determine the violated subsets; 3. apply relaxation F R using as vertex partition a selection of disjoint minimal subsets from the determined infeasible ones; 4. if the current lower bound is smaller than the best incumbent solution, apply the subgradient optimization procedure. The additive lower bound often produces good lower bound values with limited computational effort compared with the overall subgradient procedure.

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

12

Branch and Bound Algorithm 1. Bounding • At each node of the branching tree the Additive LB is computed. • The number of iterations decreases at lower levels of the tree. 2. Branching • Adaptation of the subtour elimination scheme for T SP . • At each non-fathomed node, an infeasible subset is detected in the solution produced by the lower bound; • the problems associated with the descending nodes are generated by excluding the infeasible subset from their feasible solutions space.

• Best-Bound-First search strategy.

Performances are improved by using at each node: • several reduction and dominance procedures; • Lagrangian Heuristic for the updating of the incumbent solution.

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

13

Computational Results • Branch and Bound algorithm coded in FORTRAN and run on DIGITAL DECstation 5000/240. • We considered D-CSSAr problem (with D = σ(V 0)) which, according to our computational experience, is generally harder than the equivalent CSSAr . • Test problems obtained from ACV RP instances from the literature. • Class I (Laporte, Mercure, Nobert, 1986): • qj , cij uniformly random in [0, 100] (rounded to the nearest integer); • Q := (1 − α) maxj∈V {qj } + α

X

qj , where α ∈ [0, 1];

j∈V 

• K :=

 X   j∈V



qj /Q . 

n α 20 0.25 0.50 0.75 40 0.25 0.50 0.75 60 0.25 0.50 0.75 80 0.50 0.75 100 0.50 0.75 120 0.50 0.75 140 0.50 0.75 Paolo Toth, Daniele Vigo

K 4 2 2 4 2 2 4 2 2 2 2 2 2 2 2 2 2

%ld 77 91 64 87 95 65 91 96 65 97 66 98 66 98 66 98 66

% L1 % LB % H time nodes 93.1 97.9 100.0 1.1 1 96.0 99.7 100.0 0.3 1 97.3 99.5 100.0 0.1 1 90.0 96.6 100.7 802.4 1326 94.2 96.6 104.1 374.5 649 95.8 98.1 100.0 3.1 310 92.6 94.0 102.4 465.8 304 96.6 97.9 100.3 25.8 7 98.0 98.8 100.2 122.9 117 97.9 98.1 107.8 1270.2 516 98.2 98.9 101.0 40.2 9 97.2 97.2 104.4 487.3 87 97.4 97.9 100.1 137.6 17 97.3 97.3 104.7 965.3 203 98.8 98.8 100.5 34.8 5 96.9 96.9 100.8 333.4 28 (7) 95.1 95.2 100.1 447.2 68 D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

14

• Class II (Fischetti, Toth, Vigo, 1993): • real-world instances from pharmaceutical and herbalist’s product delivery in downtown Bologna; • 8 instances, involving 33 to 70 vertices, and requiring 3 branches.

Problem n K %ld % L1 % LB % H time nodes FTV33 33 2 97 95.4 98.6 100.8 3.8 18 FTV35 35 3 81 97.9 99.1 100.0 3.7 20 FTV38 38 3 93 97.5 100.0 100.0 4.2 1 FTV44 44 3 89 96.4 99.5 100.0 20.9 1 FTV47 47 3 76 95.1 98.7 100.0 11.8 3 FTV55 55 3 82 94.9 97.8 100.3 133.4 29 FTV64 64 3 94 94.5 99.8 101.0 70.7 19 FTV70 70 3 80 96.1 98.6 100.0 89.7 1

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Capacitated Shortest Spanning Arborescence

15

• Class III: symmetric (Euclidean) instances • vertex coordinates uniformly random in [0, 100] (with r = (50, 50)); • the cost cij is the Euclidean distance between i and j, rounded to the nearest integer; • qj (j = 1, . . . , n), Q, K as in Class I. n α K %ld % L1 % LB % H time nodes 20 0.25 3 80 94.9 99.6 101.1 2.9 7 0.50 2 91 96.3 99.7 100.0 0.2 4 0.75 2 64 99.3 99.8 100.0 0.3 17 40 0.25 4 87 94.5 98.7 100.5 91.7 81 0.50 2 95 98.1 99.6 100.2 3.0 7 0.75 2 65 99.4 99.7 100.5 103.8 956 60 0.25 4 90 97.1 99.5 100.7 293.1 159 0.50 2 96 99.2 99.8 100.3 20.4 16 0.75 2 65 100.0 100.0 100.3 1.6 5 80 0.25 4 92 97.4 99.4 101.1 1506.3 303 0.50 2 97 99.0 99.6 100.2 47.3 13 0.75 2 66 99.9 99.9 100.5 307.4 1038 100 0.50 2 98 99.1 99.7 100.4 214.7 59 0.75 2 66 99.9 99.9 100.3 1156.0 3354 120 0.50 2 98 99.2 99.6 100.1 667.8 79 0.75 2 66 99.4 99.8 100.3 58.2 74 140 0.50 2 98 99.3 99.6 100.0 830.9 107 0.75 2 66 99.7 99.7 100.3 138.7 167 160 0.50 2 98 99.6 99.9 100.3 444.1 25 0.75 2 66 99.4 99.5 100.6 218.7 478 180 0.50 2 98 99.7 99.9 100.0 754.8 58 0.75 2 66 99.8 99.9 100.2 164.2 19 200 0.50 2 98 99.7 99.9 100.2 414.4 16 (6) 0.75 2 66 99.9 100.0 100.0 192.4 88

Paolo Toth, Daniele Vigo

D.E.I.S. - Universit`a di Bologna

Suggest Documents