• Keine Ergebnisse gefunden

3.4 Path-based local search 57 the fixed costs. This technique yields a highly efficient approach suited for solving even the largest occurring instances in a very small amount of time.

In each iteration, the algorithm chooses a commodity and finds a shortest path from a source to a sink with respect to arc weightsw∈QA+. Whenever the algorithm encounters an arc during the shortest path computation, the residual capacity for the chosen com-modity on this arc is computed and the fixed cost for that arc is divided by this capacity to obtain a linear cost rate. To make this more precise, letk∈Kbe the commodity that is currently being routed and(x, y) be the current (partial) solution of the capacitated network design formulation [TTPCND] consisting of the flow x∈ QK+×A and the design choicesy∈ZA+. Using the notation introduced inSection 3.2.4, we compute theresidual capacity of arca∈Afor commoditykprovided by they(a)containers currently installed on the arc. This capacity is defined by

ρ(a) := min

jP

βj(a)y(a)−αj(x(a))

αkj .

If there is a positive residual capacityρ(a)>0, we set the capacityr(a) :=ρ(a) and the weightw(a) :=ck(a), only considering the linear cost for shipping commoditykalonga. If no residual capacity is left, i.e.,ρ(a) = 0, then an additional container can be installed onaif y(a)< u(a). In this case, we set

r(a) := min

jP

βj(a)

αkj and w(a) :=ck(a) + c(a) r(a). Otherwise, ify(a) =u(a), we set r(a) := 0and w(a) :=∞.

Once a shortest path P from a source to a sink of commodity k with respect to the weightswis found, thebottleneck capacity r:= mina∈P r(e) is determined andr units of commodityk are sent along the path. Note that all computations above can be carried out very efficiently and of course, instead of updating weights and capacities of all arcs in each step, these values are calculated on-demand and only updated when necessary.

Technically, we flag those variablesr(a)andw(a)as ‘invalid’ that have to be recomputed at the next encounter of arca. A listing of SPLC is given asAlgorithm 3.2.

The linearization procedure assumes optimal utilization of container capacities in the resulting flow pattern and thus favors large containers with low per unit cost rates. Since this high utilization is not always attained, the linearization often leads to suboptimal tariff choices on transport relations. The effect can be compensated by optimizing the tariff selection on each transport relation a posteriori with a tariff selection method described inSection 3.3.

Consolidation by forbidding direct connections (SPLC-F). The SPLC heuristic favors large containers with low per unit cost rates and prefers direct connections from source to sink over paths along intermediate hubs—note that the latter can only yield shorter paths with respect to the weightsw, when some container with residual capacity is already installed on an intermediate arc. A simple approach for encouraging consolidation when costs are linearized is to forbid all direct connections between sources and sinks of the same commodity during the construction of the initial solution. By doing so, the heuristic is forced to route flow along intermediate hubs, and the paths intersect automatically.

Unnecessary detours can be easily identified and corrected by improving moves of the local search procedure.

Algorithm 3.2: Successive shortest path algorithm with linearized costs (SPLC) Initializex= 0,y = 0.

foreach commodity i∈K do

Invalidater(a) andw(a)for all a∈A.

whilethere is a source sof i with remaining supply do Find pathP inGfromsto a sink twithP

a∈Pw(a) minimum, updating the values ofr(a)and w(a) on-demand when the previous value has been invalidated.

Augmentx alongP byminaPr(a) units of commodityi, adjusty accordingly.

Invalidater(a) andw(a)for all a∈P.

3.4.2 Shortest paths with tariff selection (SPTS)

The rather imprecise estimation of the actual transportation cost achieved by the lin-earization approach presented above might lead to weak choices of paths for optimizing the cost of the final solution. We thus propose a second strategy that employs tariff selection algorithms already during the shortest path search. Although this more sophis-ticated approach requires more computational effort, it still turns out to be very efficient while at the same time providing several possibilities for adjustments.

Since tariff selection methods require as input the amount of flow to be routed, these flow values ∆∈QK+ have to be determinedbefore the shortest paths computation. We implement this a priori flow computation efficiently by identifying source-sink-pairs such that the possible transport volume from source to sink is maximum (with respect to a weighted combination of the property extents). To make this more formal, let x be the current flow in the network and recall the definition of the excess of this flow at node v as

ex(xk, v) :=X

a∈δ(v)

xk(a)−X

a∈δ+(v)

xk(a)

fork∈K. Using the supply/demand valuesb∈QK×V given in the input, define for each ordered pair of nodes (s, t) in the pattern-expanded network the value ∆(s, t, x) ∈QK+ by

k(s, t, x) := min{bk(s) + ex(x, s), −(bk(t) + ex(x, t))}+

for k ∈ K. Then source s and sink t are chosen such that P

jPwjαj(∆(s, t, x)) is maximum, where α are the aggregated properties of the flow as defined in Section 3.2.2 and w ∈QP+ is a weight function, which is an adjustable parameter of the heuristic. A listing of SPTS is given as Algorithm 3.3.

During the shortest path computation, arc weights have to be evaluated too often to solve the tariff selection problem to optimality every time. In fact, it is sufficient to only estimate the cost using the estimator presented in Section 3.3, while the actual tariff assignment can be determined at the end of the solution process from the flow values on the transport relations in the pattern-expanded network using an exact method.

Consolidation by partial cost linearization (SPTS-L). Cost computation based on tariff selection allows for a more sophisticated approach to encourage consolidation by

3.4 Path-based local search 59

Algorithm 3.3: Successive shortest path algorithm with tariff selection (SPTS) Initializex= 0.

whilenot all demand has been satisfied do Lets, t∈ V such thatP

jP wjαj(∆(s, t, x))is maximum.

Let∆ = ∆(s, t, x).

Compute shortest pathP inD fromsto t w.r.t.˜c, where

˜

c(R) = TS(R, x+ ∆)−TS(R, x) withTS(R,x)˜ being the estimated cost of sending flow x˜∈QK+ along transport relationR∈ R.

Augmentx along P by∆.

Compute a tariff assignment on each transport relation for the given flowx using a tariff selection method.

taking into account the remaining, still unrouted demand. We linearize costs at inter-hub connections and also at source-hub connections (if there are fewer sources) or hub-sink connections (if there are fewer sinks) in the following way: LetR0 be the set of transport relations just described, and let ∆ be the amount of flow to be routed in the current iteration. Let∆+∈QK+ be the sum of all supply not yet routed in the current solution, and define

M := min

αj(∆+)

αj(∆) : j∈P, αj(∆)>0

. Now, ifR∈ R0 we compute

˜

c(R) := min

TS(R, x+ ∆)−TS(R, x), TS(R,∆+) M

in Algorithm 3.3, where TS(R, x) denotes the estimated cost needed to transport the flow x along transport relation R, computed by one of the algorithms from Section 3.3.

If the minimum is attained by the second argument, the arc cost˜c(R)anticipates future consolidation on this transport relation by assuming all remaining demand will be send alongRand scaling the cost down according to the proportion of∆+ represented by∆. IfR /∈ R0, we computec(R)˜ as described originally inAlgorithm 3.3. Our computational results inSection 3.6show that this mixture of linearization at presumably strongly uti-lized transport relations and precise cost estimation for weakly utiuti-lized transport relations yields significant improvements in solution quality.

3.4.3 Path-based local search

In the following we introduce a local search algorithm that re-routes flow along paths with the aim of improving feasible solutions. The algorithm maintains a path decomposition of the flow of the current solution in the pattern-expanded network. It moves from one solution to another by replacing one or multiple paths of the decomposition with paths of lower cost.

The general outline of an improving move is the following: When removing a pathP in D with flow value x(P) ∈ QK+ from the solution, for each transport relation R of the path, the flow x(R) is decreased by x(P) and the tariff selection of R is adapted accordingly, using the greedy tariff selection heuristic presented in Section 3.3. After removing a set of paths, the resulting partial solution is completed again by computing

new paths using the SPTS heuristic introduced in Section 3.4.2. The move is accepted if the total cost of the solution decreases, and reverted otherwise.

The procedure uses two variants of improving moves: Type Amoves simply remove a single path at a time. This way, only small amounts of flow are re-routed in one move and the assignment of sources to sinks is left unaffected. In contrast,Type B moves consider groups of paths sharing the same transport relation. All flow passing this transport relation is removed and routed anew, which means that multiple paths can be replaced at once and the assignment of sources to sinks might be altered.

The local search procedure performs improving moves in alternating phases of Type A and B. This allows us to re-compute the path decomposition at the beginning of each phase, adapted to the type of movement. In both cases the paths of the decomposition are constructed in a depth-first search (DFS) manner: At a node in the DFS tree for each incident arc R we compute the maximal flow vector ∆(R) that could be assigned to a path proceeding on that arc and choose an arc greedily so as to maximize a suitably defined weight function of that flow vector. For Type A phases, the DFS starts at a source and continues along the arc that maximizes a weighted combination of the properties of

∆(R). In contrast, the decomposition for Type B phases facilitates a bidirectional DFS starting at heavily used transport relations and chooses arcs that maximize the savings resulting from reducing their flow. In both cases, due to flow conservation we either close cycles (which can immediately be removed from the solution) or find a source-sink path, which we add to the path decomposition.

The two phases are repeated alternatingly until the relative improvement achieved by both of them falls below a specified threshold or the time limit is reached. At the end of the procedure, a final improvement phase is conducted by identifying and eliminat-ing weakly utilized containers in the tariff-expanded network and again re-routeliminat-ing the corresponding flow using a variation of Type B moves.