• No results found

The extended Clarke and Wright algorithm (ECWA)

Literature review - distribution network problems

1. Granular tabu search

3.3 The location-routing problem (LRP)

3.3.6 Solution approaches for the CLRP

3.3.6.1 The extended Clarke and Wright algorithm (ECWA)

Prins et al. (2006) adapted the savings based method by testing the merging of routes to be assigned to all m depots. Instead of four possible mergers per pair of routes, 4m possible mergers per pair must now be evaluated. They continue to state that the method can be reduced to O(mn2log n) time by using a preliminary heapsort method. The heapsort method is explained by Cormen et al. (2009, Ch. 6).

Figure 3.9 illustrates the ECWA, as provided by Prins et al. (2006). There are two routes with endpoints i, j and k, l respectively, assigned to depots r and s. The saving σ of the merger of points j and k and assignment to depot t can be calculated as:

σ= F + cri+ cjr+ csk + cls− cjk− cti− clt+ frλr+ fsλs− ft(1 − yt) (3.97)

where F is the cost saving of removing a vehicle. The cost of the edges to the current two depots r and s for each of the two routes is cri+ cjr+ csk + cls. The cost to connect the two routes is cjk. The cost to connect the new route to its new depot is cti− clt. The possible cost savings if a depot can be closed from either of the two routes is frλr+ fsλs. The extra cost incurred if the new depot has not been opened before is ft(1 − yt).

3.3 The location-routing problem (LRP)

Figure 3.9: The ECWA method as illustrated by Prins et al. (2006).

In Eq. (3.97), λs is a boolean value to indicate if depot s has no more routes assigned to it and yt is a boolean value to indicate whether depot t was already open beforehand.

3.3.6.2 GRASP

The greedy randomised adaptive search procedure (GRASP) metaheuristic is de-scribed by Blum and Roli (2003). It is an iterative process that consists of three steps:

1. Construct a greedy randomised solution 2. Perform a local search to better the solution

3. Compare the solution to the best found solution and update if needed.

In the first step, a greedy algorithm is used to construct the solution. An example of a greedy algorithm used to solve the FLP is explained in Section 3.1.2.2. Instead of only selecting the next best step to construct the solution, the GRASP method creates a restricted candidate list consisting of the best α choices that can be made.

One of the choices is then selected randomly. It is clear that the choice of α is critical to the success of the method.

3.3 The location-routing problem (LRP)

In the GRASP method suggested by Prins et al. (2006) for the CLRP, the ECWA is used to construct an initial solution. When deciding which routes should be merged next, a restricted candidate list (RCL) of the α best possible mergers is calculated.

A merger is then selected randomly and the routes are combined. This is referred to as the randomised extended Clarke and Wright algorithm (RECWA). The authors also suggest using the RECWA method to solve the MDVRP.

Since the value of α is critical, Prins et al. (2006) suggest selecting an α value ran-domly between 1 and a predefined maximum value each time. Once the routes have been constructed, the solution is improved with the use of a local search heuristic.

This includes three possible moves:

• Move: a customer is moved to another route or a different place in the same route.

• Swap: two customers exchange their positions in the same or two different routes.

• 2–opt: two non-consecutive edges on the same or two different routes are removed and the routes are reconstructed. If the two new customer endpoints of a route do not end at the same depot, the routes are changed to end at the same depot. It is assumed that the depot that will incur the minimum route cost is selected.

The local search stops when no more moves can be made and the best found solution is updated if needed.

Prins et al. (2006) continue to enhance their GRASP heuristic with an extra element, which they call a learning process. The process divides the construction step into two modes. In the first mode, called the diversification mode, the method tries to vary the set of opening depots throughout the solution search space. In the second mode, the intensification mode, the method restricts the solutions to the set of opening depots from the best solution found in the diversification mode. The modes are explained below.

In the first iteration, each customer is placed on its own route assigned to its closest depot. All depots with customers closest to them are opened. During the rest of the diversification mode, only two depots are opened at the start. One depot is chosen randomly and the other iteratively to ensure that all depots are opened at least once.

If it becomes clear that a customer cannot be assigned to one of the two depots because of capacity constraints, the depot closest to this customer is also opened.

Once an initial solution has been created, the process continues as described above.

3.3 The location-routing problem (LRP)

The routes are merged in the usual way and all depots are checked when deciding which depot a merged route should be assigned to.

After a fixed number of iterations, the method switches to intensification mode.

The best found solution from the diversification mode is copied and also saved in the variable named BSolInDiv. Solutions constructed in the intensification mode are restricted to the subset of depots used in BSolInDiv. The merging of routes only considers the open depots from BSolInDiv. If, during the initial assignment of customers to depots, customers cannot be assigned because of capacity constraints, additional depots can be opened and included.

After every iteration, the solution is compared to the best solution found so far in both the diversification and intensification modes, but the solution kept in BSolInDiv will only depend on the diversification mode.

A post-optimisation step, named path relinking, is also proposed by Prins et al.

(2006). For this step, a group of elite solutions that are not only the best found, but also the most distant from each other, are compared. The objective is to try to find a better solution by changing some attributes from a good solution with that of another solution distant enough from the first.

To calculate the distance between two solutions T and U, for each pair of consecutive customers i and j in T , Prins et al. (2006) provide the following rules:

• If i and j are next to each other on a route in U, then add 0 to the distance.

• If i and j are on the same route, but not consecutive, add 1.

• If i and j are not on the same route, but both assigned to the same depot in U, add 3.

• If i and j are assigned to two different depots in U, add 10.

• For customers at the beginning of a route in T that are assigned to a different depot in U, add 10.

The best solutions from the diversification mode are placed in a set, named NBestSet.

To determine the set of solutions, named DistSet for the path relinking, add the best solution from NBestSet. Calculate the distances from the best solution to all other solutions in NBestSet and add the solution with the maximum distance. Each time the solution furthest from all the other solutions in DistSet is added until a predefined maximum number is reached.

To change a solution U to the guiding solution T , identify all the pairs (i, j) of customers that are consecutive in T but not in U. The routes in U are broken after

3.3 The location-routing problem (LRP)

each i and shifted in the route sequence until all pairs (i, j) are also consecutive in U. If a capacity constraint for a vehicle or depot is broken, chains of customers are moved to repair the constraint as above, while keeping i and j in the order they were in solution U. After path relinking, the solution is refined with a local search and if a better solution is found, the best found solution is updated.