4.3 Multi-Start Variable Neighborhood Search
4.3.2 Parallel Multi-Start Variable Neighborhood Descent
A general VND, as explained in section 3.3.1, has been implemented embedding CP and LR methods. The VND method starts from an initial solution x0, obtained by means of the RCWS heuristic, which is afterwards improved by a local search process. Figure 4.3 shows the ow chart corresponding to this hybrid VND approach.
In the proposed approach, outlined in Algorithm 4.5, four moves, described in section 4.2.2, are selected to be used in local search neighborhoods: relocate, swapping, chain, and ejection chain.
In the exploration of each neighborhood Nk, starting from the solution x0, the kth move is applied and the new solution's feasibility is checked using CP. Whenever it is proved feasible, LR is used to recalculate only modified routes. As mentioned for the hybrid VNS methodology, this approach permits to consider only two routes per solution, reducing the computation time when
k ← 1
k ≤ kmax
EXIT
x' ← x'' k ← 1
k ← k + 1 LastModified ← V f( x'' ) < f( x' )
Exploration: find all neighbors x'' of x' in
Nk(x',LastModified) Y
Y N
N Find an initial solution x' using RCWS
LastModified ← V
Apply the best compatible moves to
get x''
Update LastModified
Figure 4.3: Flow chart of the hybrid VND approach. The process that uses the described CP and LR methods is highlighted.
compared to other routing post-optimization methods [155]. Improvements are stored in a sorted list until no more feasible solutions are left in the kth neighborhood. Then, all those which are independent, i.e. affect different route pairs, are applied in descending order on xto get a better solution, x. This way, solution improvement is faster than applying a single change at each iteration.
Algorithm 4.5 Hybrid VND algorithm with improved local search e ciency Initialization:
- Select the set of neighborhood structures Nk, for k = 1, ..., kmax, that will be used in the local search;
- Let x0 be the initial solution, obtained by means of the RCWS algorithm;
- Initialize the set LastModi ed ← V ; - Choose a stopping condition;
- Set k ← 1.
Repeat the following steps until k = kmax: 1. Exploration of neighborhood:
- Find all neighbors x00 of x0 (x00 ∈ Nk(x0, LastModi ed ));
- Check feasibility of capacity constraints using CP;
- Calculate the cost of modified routes using LR;
- If the solution x00 is better than x0 (f (x00) < f (x0)), include it in a list of improving changes.
2. Choose the best compatible neighbors:
- Set LastModi ed ← ∅;
- Sort the list of improving changes;
- Apply the first improving change;
- Add in descending order the next compatible improvements;
- Add the modified routes identifiers to LastModi ed.
3. If the list is empty, set k ← k + 1 and LastModi ed ← V ; otherwise, set x0 ← x00 and k ← 1.
After the first exhaustive exploration of each neighborhood, only those changes affecting routes modified by previous movements are explored in order to reduce the computation time. The modified routes are stored in the set LastM odif ied.
If the obtained neighbor x00 is better than the incumbent (f (x00) < f (x0)), the current solution x0 is updated and neighborhoods' exploration is restarted.
Otherwise, the algorithm keeps x0 as the best solution found so far and con-tinues exploring the next neighborhood. When the VND process reaches a local optimum, no solution improvement may be found according to defined neighborhoods, and x0 is returned as the best solution found.
Algorithm 4.6 Parallel Multi-Start VND algorithm Initialization:
- Let x be the best solution;
- Create a thread pool with Ntotal threads.
Repeat the following steps until Ntotal threads end or until tmax time is con-sumed:
1. Execute Nmax simultaneous threads:
(a) Generate an initial feasible solution x0 using RCWS.
(b) Improve x0 to obtain x00 by using the hybrid VND.
(c) If x00 is better than x (f (x00) < f (x)), set x ← x00.
As mentioned, the VND-based local search process requires some type of diversification in order to overcome local optimality. As more constraints are introduced in the problem, it usually becomes more e cient in terms of com-putational time employed to generate new feasible solutions from scratch than to apply complex shaking processes that might end in non-feasible solu-tions. This is especially certain if we consider that the Randomized version of the CWS introduced in section 4.3.1 is a really fast method for generating different feasible and good solutions that can serve as initial solutions in a multi-start approach.
Thus, a Multi-Start strategy provides an appropriate framework which achieves diversification by re-starting the search from a new solution once a region has been extensively explored. Moreover, this approach is likely to be parallelized as long as the best solution found so far is correctly updated.
A simplified schema of the Parallel Multi-Start strategy is presented in Algorithm 4.6 and depicted in Figure 4.4. The RCWS algorithm is used to find a good initial solution. Then, the VND method helps to reach a local minimum in the neighborhood of the solution. The Parallel Multi-Start VND generates Ntotal tasks within a thread pool. If a thread is not available for the task, they wait in a queue for an active task to end. The algorithm stops when all tasks have been completed, or the maximum execution time tmax is reached, whichever happens first. Each task executes two phases: a first one in which a new feasible solution is constructed, and a second one in which the
...
...
Best solution x
Executing tasks
Waiting queue (Thread pool)
Figure 4.4: Parallel Multi-Start VND schema. A set of waiting tasks is gen-erated within a thread pool. Anytime an executing task finds an improving solution, it updates the best solution found so far.
initial solution is improved through a VND local search process. Starting from a different initial solution ensures certain diversification, overcoming local optimality. Finally, anytime a task finds a feasible solution xbetter than the incumbent (f (x) < f (x)), the current solution x is updated.