• Keine Ergebnisse gefunden

Kruskal-Based Construction Heuristic

A general problem of the Prim-based heuristic by Salama et al. [166], summarized in Section 3.2, especially on Euclidian instances is the fact that the nodes in the close surrounding of the root node are typically connected rather cheaply, but at the same time delay is “wasted”, and many distant nodes can later only be linked by rather expensive edges, see Fig. 3.2. The stricter the delay-bound the more this drawback will affect the costs negatively. This fact led us to a more de-centralized approach by applying the basic concept of Kruskal’s minimum spanning tree algorithm [107] to the RDCMST problem, see Algorithm 3.1.

3.4.1 Stage 1: Merging components

In the beginning of stage one of the construction heuristic all edges are sorted by ascending costs and then iteratively added to the solution preventing cycles until a feasible spanning tree is

formed. In other words, components initially consisting of single nodes are merged by adding edges to result in one connected tree. The challenge is to maintain the feasibility of the partial solutions, i.e. to satisfy the delay-constraint to the root node throughout the whole merging process. In the Prim-based approach in [166] checking the feasibility of adding an edge to the existing tree naturally runs in constant time whereas our de-centralized algorithm needs more effort to achieve this. We have to store and update additional information for each nodev∈V:

• the delayδvon the path fromstov

• the maximum delayδvmaxto any other node in the same component

• the predecessorpv on the pathP(s, v), initialized with nodev

To initializeδv Dijkstra’s algorithm [41] calculates the pathP(s, v), ∀v ∈V, with the shortest path delay. The paths themselves are not added to the solution, we just keep them stored as a backup to always have a possible feasible connection to the root node available. These fallback paths will become essential for stage two of the heuristic.

Initially we have a set of componentsC ={C1, ..., Ck}, k = |V|. Every time we add an edge to the solution two components are merged and therebykis decreased by 1 until setConly contains one component. For each componentCi, i = 1, ..., k, we specify one nodevCi which is assumed to be nearest to the root node – it can be seen as the local root node of the subtree Ci. As mentioned above the path P(s, vCi), vCi 6= s,is not part of the tree, we just use it for testing the feasibility of a partial solution.

Now we start iterating over the sorted edge-list. Lete={u, v} ∈Ebe the next edge on the list andCu 3 u, Cv 3 vbe the components incident toe, respectively. Clearly, ifCu = Cv, edgeewould create a cycle and thus can be skipped. IfCu 6=Cv, the decision of addingeto the tree and thereby merging the two componentsCu andCv is based upon fulfilling at least one of the following two conditions:

δu+duvvmax≤B (3.13)

δv+dvuumax≤B (3.14)

So if it is allowed to add edgeeto the solution in this sense, the node information of all nodes in the newly created componentCu+v =Cu∪Cvhas to be updated. First of all we have to specify the newvCu+v. There are many possibilities of choosing this node with the only constraint that δvCu+v plus the delay of pathP(vCu+v, w)has to satisfy the delay-bound for allw ∈Cu+v. A very simple and fast method turned out to be the most successful one: if only condition (3.13) is met thenvCu+v =vCu, when only condition (3.14) holds, we choosevCv, and if both conditions are satisfied we prefer thevCiwhere the corresponding inequality has a larger gap to the delay-bound.

Beginning from this chosen local root node for component Cu+v we perform a depth-first search to update pw andδw, ∀ w ∈ Cu+v, usingδvCu+v as the starting delay. The maximal extentsδmaxw can be determined in linear time profiting from the tree structure of the component:

Basically we perform a depth-first-search from an arbitrary node in the subtree to obtain the delay-heights of all nodes. In a second depth-first-search we use these heights to finally calculate the maximal extents.

The iterations stop if the solution only consists of one component, which at the same time means that it is feasible, or there are more than one components but no more edges left in the list. The latter case is handled in stage two.

To conclude, stage one consists of sorting all edges of the graph in O(|E|log|E|) time, testing each one for feasibility in constant time and updating the node information in O(|V|) time if an edge is added which can happen at most|V| −1times due to the properties of a tree.

So the total runtime is inO(|E|log|E|+|V|2).

3.4.2 Stage 2: Extension to a feasible solution

At the end of stage one the graph is not necessarily connected, so in stage two the remaining subtrees are attached to the component which contains the root node by adding the shortest-delay-pathP(s, vCi), ∀Ci ∈C, Ci 6=Cs. At least one of the edges of a pathP(s, vCi)creates a cycle when adding it to the solution, otherwise all edges ofP(s, vCi)would have been included in stage one. Consequently, the main task in this stage is to dissolve resulting cycles to form a tree without violating the delay-constraint.

Paths are added by backtracking the shortest-delay-path starting from nodevCi until a node u with minimal delayδu is reached. We can be sure that pathP(s, u)is already the shortest-delay-path and do not have to go further – in the worst case, however, we end up at the root node. Now we add the missing edges along pathP(u, vCi)until we are back atvCi. Cycles can occur if edgee = {v, w}is added andpw 6= w, v, indicating that two different pathsP(s, w) exist. Removing edge{pw, w} dissolves this cycle and at the same time maintains feasibility because the delayδ of any node in componentCw can only get smaller or stay equal sinceδw now is the smallest possible delay and all other nodes depend on that. In Cpw no delays are affected by the removal of edge{pw, w}since all nodes are connected to the root node through pathP(s, vCpw).

Since the dissolving of cycles can be done in constant time and each node is examined at most once, stage two runs inO(|V|).

3.4.3 Example

Figure 3.3 shows a detailed example of applying the Kruskal-based heuristic, see Algorithm 3.1, on instance graph G from Fig. 3.3a. Edges included in the solution and the components’

representatives vCi, ∀Ci ∈ C, are colored blue. The shortest delays to nodes v ∈ V are:

dmins = 0, dmin1 = 2, dmin2 = 2, dmin3 = 1, dmin4 = 4, dmin5 = 2. Only relevant changes in variable values will be mentioned in this example description. After sorting the edge set firstly by ascending costs, secondly by ascending delays, and thirdly by ascending node indices, stage one examines the edges in the following order:

1. {2,3} (Fig. 3.3b): ∆2 = 1, ∆3 = 2 ⇒ E0 = {{2,3}}, vC2+3 = 3, δ2 = 2, δ3 = 1, p2=p3 = 3, δmax2max3 = 1.

2. {3,5}(Fig. 3.3c): ∆3 = 2, ∆5 = 0 ⇒ E0 = {{2,3},{3,5}}, vC3+5 = 3, δ25 = 2, δ3 = 1, p2=p3=p5 = 3, δmax2max5 = 2, δ3max= 1.

(4,2)

Figure 3.3: Application of Kruskal-based heuristic on input graph in (a) withB = 4: Stage one in (b)–(e) and stage 2 in (f)–(g).

3. {s,2}(Fig. 3.3d): ∆s = 0, ∆2 = 0 ⇒E0 ={{2,3},{3,5},{s,2}}, vCs+2 = s, δs = 0, δ2 = 2, δ3 = 3, δ5 = 4, ps = s, p2 = s, p3 = 2, p5 = 3, δsmax = 4, δmax2 = 2, δmax3 = 3, δmax5 = 4.

4. {2,5}: creates a cycle⇒skip.

5. {1,3}:∆1 =−3, ∆3 =−1⇒skip.

6. {2,4}:∆2 =−1, ∆4 =−5⇒skip.

7. {s,1}: (Fig. 3.3e):∆s = 2, ∆1 =−4⇒ E0 ={{2,3},{3,5},{s,2},{s,1}}, vCs+1 = s, δs= 0, δ12 = 2, δ3 = 3, δ5 = 4, ps=p1 =p2 =s, p3 = 2, p5 = 3, δsmax= δ2max= 4, δ1max5max= 6, δmax3 = 5.

8. {4,5}:∆4 =−8, ∆5 =−2⇒skip.

9. {s,3}: creates a cycle⇒skip.

We can clearly see in Fig. 3.3e that after stage one there are still two components left, so we need to apply stage 2 to repair our partial solution. The shortest-delay-path to node 4 is defined by P(s,4) = {{s,3},{3,5},{5,4}}. Adding edge {s,3} creates a cycle which is dissolved by removing edge{p3,3} = {2,3}. The next edge{3,5}can be skipped since it is already contained in our solution. Due to the decrease of the delays of nodes 3 and 5 to values δ3 = 1, δ5 = 2, it is now feasible to add edge {5,3} finally resulting in a feasible tree T with costscT = 19. For comparison, an optimal solutionT has costscT = 18and edge set E0 ={{s,2},{s,3},{1,3},{3,5},{4,5}}.

3.4.4 Modifications

Two modifications in stage one usually lead to better results when applying a subsequent im-provement method, such as those described in Section 3.8:

1. A delay-factorFd≥1is introduced and multiplied with the left side of inequalities (3.13) and (3.14) when checking the feasibility of adding an edge. In other words, the delay-bound is lowered by the factor F1

d.

2. If stage one has added a predefined number of edges less than|V| −1it is aborted and stage two uses shortest-delay-paths to attach the left components.

Both modifications provide a solution where the gap between the node-delaysdv and the delay-bound is usually larger than in the spanning tree of the standard implementation. This higher

“residual delay” leads to more possibilities in a following improvement phase and therefore often results in final solutions with less total cost.

(7,2)

Figure 3.4: A small example graph (a) with delay-boundB = 5. The edge description is read (ce, de). Adding the cheapest edges to the solution in (b) forces the use of an expensive edge in (c). By also considering the delay a better solution (d) can be created.