Skip to main content
Log in

Distance-guided local search

  • Published:
Journal of Heuristics Aims and scope Submit manuscript

Abstract

We present several techniques that use distances between candidate solutions to achieve intensification in Local Search (LS) algorithms. An important drawback of classical LS is that after visiting a very high-quality solution the search process can “forget about it” and continue towards very different areas. We propose a method that works on top of a given LS to equip it with a form of memory so as to record the highest-quality visited areas (spheres). More exactly, this new method uses distances between candidate solutions to perform a coarse–grained recording of the LS trajectory, i.e., it records a number of discovered spheres. The (centers of the) spheres are kept sorted in a priority queue in which new centers are continually inserted as in insertion-sort algorithms. After thoroughly investigating a sphere, the proposed method resumes the search from the first best sphere center in the priority queue. The resulting LS trajectory is no longer a continuous path, but a tree-like structure, with closed branches (already investigated spheres) and open branches (as-yet-unexplored spheres). We also explore several other techniques relying on distances, e.g., in Section 2.3, we show how to use distance information to prevent the search from looping indefinitely on large (quasi-)plateaus. Experiments on three problems based on different encodings (partitions, vectors and permutations) confirm the intensification potential of the proposed ideas.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Notes

  1. For instance, in practical cases for graph coloring, one can have \(\texttt {maxRadius} =100\) and if \(d(c,s)=20\) at some iteration, then the distance calculation can be skipped 80 iterations!

  2. Colorings available on line at www.cedric.cnam.fr/~porumbed/graphs/tsdivint/.

  3. We used the tool MDSJ “Java Library for Multidimensional Scaling (Version 0.2)” from University of Konstanz, available on-line at http://algo.uni-konstanz.de/software/mdsj/.

  4. We chose to consider two objective values \(obj_1\) and \(obj_2\) to be very close if and only \(|obj_1-obj_2|\le \Delta \), where \(\Delta \) is the difference between the best and the third best objective value ever discovered by the current run.

  5. We uses \(\Delta _{s,c}=\frac{1}{d(s,c)+3}\). For example, if the search revisits 30 times the center c, then we obtain a total repulsion force of \(30\cdot \frac{1}{3}=10\). As such, the currently selected vertices that do not belong to the center stay Tabu 10 iterations more. This encourages DGLS to deselect vertices that do belong to the center, thus repulsing the search away from it.

  6. These two instances are publicly available on-line, along with the LS/DGLS source code in C++ at http://cedric.cnam.fr/~porumbed/dgls/.

  7. For the k-coloring and k-clique problems, the evaluation of each neighbor requires O(1) time, i.e., strong streamlining routines are used. In CARP, the evaluation of each neighbor is linear in the number \(|E_R|\) edges (clients), in the number of vehicles and in the size of the longest route.

  8. See http://mat.gsia.cmu.edu/COLOR03/ or more exactly the benchmark in the tar archive available for download at www.mat.gsia.cmu.edu/COLOR03/BENCHMARK/benchmark.tar.

References

  • Campos, V., Laguna, M., Martí, R.: Context-independent scatter and tabu search for permutation problems. INFORMS J. Comput. 17(1), 111–122 (2005)

    Article  MathSciNet  Google Scholar 

  • Cedeño, W., Vemuri, V.R.: Analysis of speciation and niching in the multi-niche crowding GA. Theor. Comput. Sci. 229(1), 177 (1999)

    Article  MathSciNet  Google Scholar 

  • De Jong, K.A.: An analysis of the behavior of a class of genetic adaptive systems. PhD thesis, University of Michigan Ann Arbor, MI, USA, (1975)

  • Deb, K., Pratap, A., Agarwal, S., Meyarivan, T.: A fast and elitist multiobjective genetic algorithm NSGA-II. IEEE Trans. Evolut. Comput. 6(2), 182–197 (2002)

    Article  Google Scholar 

  • Drezner, Z.: A new heuristic for the quadratic assignment problem. Adv. Decis. Sci. 6(3), 143–153 (2002)

    MathSciNet  MATH  Google Scholar 

  • Dror, M.: Arc Routing: Theory, Solutions and Applications. Springer Science & Business Media, Berlin (2012)

    Google Scholar 

  • Glover, F., Laguna, M., Martí, R.: Fundamentals of scatter search and path relinking. Control cybern. 29(3), 653–684 (2000)

    MathSciNet  MATH  Google Scholar 

  • Gusfield, D.: Partition-distance: a problem and class of perfect graphs arising in clustering. Inf. Process. Lett. 82(3), 159–164 (2002)

    Article  MathSciNet  Google Scholar 

  • Joncour, C., Michel, S., Sadykov, R., Sverdlov, D., Vanderbeck, F.: Column generation based primal heuristics. Electron. Notes Discrete Math. 36, 695–702 (2010)

    Article  Google Scholar 

  • Kendall, M.G.: A new measure of rank correlation. Biometrika 30(1/2), 81–93 (1938)

    Article  Google Scholar 

  • Miller, B.L., Shaw, M.J.: Genetic algorithms with dynamic niche sharing for multimodalfunction optimization. In: Proceedings of the IEEE International Conference on Evolutionary Computation, pp. 786–791, (1996)

  • Moraglio, A., Poli, R.: Topological interpretation of crossover. In: Deb, K. (ed.) Genetic and Evolutionary Computation Conference, pp. 1377–1388. Springer, Berlin (2004)

    Google Scholar 

  • Porumbel, D., Goncalves, G., Allaoui, H., Hsu, T.: Iterated local search and column generation to solve arc-routing as a permutation set-covering problem. Eur. J. Oper. Res. 256(2), 349–367 (2017)

    Article  MathSciNet  Google Scholar 

  • Porumbel, D.C., Hao, J.-K., Kuntz, P.: A search space cartography for guiding graph coloring heuristics. Comput. Oper. Res. 37(4), 769–778 (2010)

    Article  MathSciNet  Google Scholar 

  • Porumbel, D.C., Hao, J.-K., Kuntz, P.: An efficient algorithm for computing the distance between close partitions. Discrete Appl. Math. 159(1), 53–59 (2011)

    Article  MathSciNet  Google Scholar 

  • Porumbel, D.C., Hao, J.-K., Kuntz, P.: Spacing memetic algorithms. In: Proceedings of the 13th Annual Conference on Genetic and Evolutionary Computation (GA track), pp. 1061–1068. ACM, (2011)

  • Qinghua, W., Hao, J.-K.: An adaptive multistart tabu search approach to solve the maximum clique problem. J. Comb. Optim. 26(1), 86–108 (2013)

    Article  MathSciNet  Google Scholar 

  • Smith, R.E., Forrest, S., Perelson, A.S.: Searching for diverse, cooperative populations with genetic algorithms. Evolut. Comput. 1(2), 127–149 (1993)

    Article  Google Scholar 

Download references

Acknowledgements

We are grateful to the reviewers for their valuable comments which helped us to improve the paper. The idea of using MDS to represent intuitively the trajectory of an LS was originally proposed by Pascale Kuntz during the PhD thesis of the first author and this contribution is acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel Porumbel.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

A The underlying local searches and their streamlined calculations

1.1 A.1 Graph k-coloring

The underlying LS for graph k-coloring is the Tabu Search (TS) from Porumbel et al. (2010). A solution s is represented as an array of length n such that \(s_v\) is the color of vertex v. A neighboring solution can be obtained by simply changing the color \(s_v\) of any conflicting vertex v to some \(s'_v\). By focusing on conflicting vertices, this neighborhood helps the search process to concentrate on influential moves and to avoid irrelevant ones, because changing the color of a non-conflicting vertex would not directly improve the objective function.

After executing a move and assigning a new color to a vertex v, v can not receive again the lost color for the next \(T_\ell \) iterations. The value of \(T_\ell \) is set at \(\texttt {random}(10)+0.6\cdot obj(s)+ \Big \lfloor \frac{iters_{\texttt {plat}}}{1000}\Big \rfloor \), where \(iters_{\texttt {plat}}\) is the number of last moves with no objective function variation. The last term is only introduced to change \(T_\ell \) when the algorithm is blocked looping on a plateau and the objective value does not change for 1000 moves. Each series of consecutive 1000 moves with no objective function variation triggers the increment of all subsequent tabu list lengths, which encourages TS to choose more and more moves that have not been executed in the past, until the objective changes again and TS leaves the plateau. This additional term prevents the search process from getting blocked looping on a plateau while not affecting its behavior outside plateaus.

To rapidly choose the best neighbor of s, this TS uses a \(n \times k\) table \(\Gamma \) such that \(\Gamma _{v,s'_v}\) indicates the number of conflicts of v if v received color \(s'_v\). As such, \(\Gamma _{v,s'_v}-\Gamma _{v,s_v}\) represents the objective function variation associated to the move that changes the color of v from \(s_v\) into \(s'_v\). After performing a move, \(\Gamma \) can be updated in O(n) time (because only columns \(s_v\) and \(s'_v\) might require updating).

1.2 A.2 k-cluster: incremental calculations of objective value and distance

The main ideas of the k-clique Tabu Search (TS) algorithm were presented in the first paragraphs of Sect. 4.2. We here describe how it uses incremental calculations to rapidly find the best swap of vertices at each iteration. For this, the TS uses a table that associates to each non-selected vertex \(v^{\text {out}}\) the number of edges that it can bring to the current solution. For a selected vertex \(v^{\text {in}}\), this table records the number of edges linked to \(v^{\text {in}}\) in the current solution. To find the best swap, it is enough to consider each selected vertex \(v^{\text {in}}\) and each non-selected one \(v^{\text {out}}\) and to calculate (in constant time using the above table!) the objective function variation of swapping \(v^{\text {in}}\) with \(v^{\text {out}}\). After executing the move, the table values of \(v^{\text {in}}\) and \(v^{\text {out}}\) are quite easily updated, by scanning their neighbors modified by the last move. For a more complex and faster calculation streamlining scheme, we refer the reader to Qinghua and Hao (2013). However, using a slower (and more pedagogical) algorithm poses no problem for the empirical evaluations needed in this paper.

The calculation of the distance from the current solution s to the current center c is also incremental. If \(s'\) is obtained from s by swapping a and b, then

$$\begin{aligned} d(s',c)= & {} d(s,c)- \underbrace{\Big ([s_a\ne c_a] + [s_b\ne c_b]\Big )}_{ old \,contribution \,to \,the \,Hamming \,distance} \\&+ \underbrace{\Big ([s_b\ne c_a]+[s_a\ne c_b]\Big )}_{new\, contribution \,to \,the \,Hamming \,distance\, }, \end{aligned}$$

where [S] is the Iverson bracket, i.e., [S] is 1 when the statement S is true and 0 otherwise. If the move consists of deselecting a selected vertex \(a=v^{\text {in}}\) and of selecting a non-selected vertex \(b=v^{\text {out}}\), the above formula becomes

$$\begin{aligned} d(s',c)= d(s,c)- \Big ([1 \ne c_a] + [0\ne c_b]\Big ) + \Big ([0\ne c_a] +[1\ne c_b]\Big ). \end{aligned}$$

One can check all possible cases of \(c_a\) and \(c_b\) to see this leads to the following simpler formula:

$$\begin{aligned} d(s',c)=d(s,c)+2\cdot c_a-2\cdot c_b. \end{aligned}$$

1.3 A.3 Capacitated arc-routing (CARP)

The underlying LS for CARP is based on a simplification of the Iterated Local Search (ILS) from Porumbel et al. (2017). The original ILS considers a search space of permutations that are decoded into explicit routes using a decoder (see below). The main simplifications are the following. First, all Column Generation (CG) components of the algorithm from Porumbel et al. (2017) are removed, allowing one to more easily compare LS with DGLS, using less external components. Secondly, the neighborhood is restricted to only use adjacent transpositions (swaps), i.e., a neighbor permutation is constructed by swapping consecutive elements of the current permutation. This allows one to achieve a correlation between a distance \(d(s_a, s_b)\) and the number of LS moves needed to reach \(s_a\) from \(s_b\). We do not use any post-decoder as in Porumbel et al. (2017).

The perturbation operator of this ILS consists of inserting in the current solution a route (sequence) discovered earlier during the search (Porumbel et al. 2017, §2.1). More exactly, to perturb the current permutation s, we extract a route r from a pool, we inject r at the beginning of s and we remove from s any duplicate element of r. The pool is continually updated throughout the search, by adding routes discovered by the ILS at different moments of the search.

Finally, the decoder consists of a dynamic programming routine of linear complexity in terms of the number of clients \(|E_R|\), i.e., the complexity is \(O(|E_R|)\). More precisely, given input permutation \(s = (s_1 , s_2 , \dots s_m )\), the decoder determines a set of routes of minimum total cost that service all required edges in the order \(s_1,~s_2,\dots s_m\). Since the decoder is relatively computationally intensive, the distance calculations do not introduce an important slowdown in the search.

B MDS plots of other DGLS trajectories for graph k-coloring

figure b
figure c
figure d

C The success rate of DGLS for different values of runsPerSphere and maxRadius

Here, we analyze the effectiveness of DGLS over several values of runsPerSphere and maxRadius on the graph coloring and the k-clique problem (in Table 7 and resp. Table 8). The caption of Tables 7 and 8 is self explanatory.

Table 7 The success rate of DGLS for different value of \(\texttt {maxRadius} \) (above table) or \(\texttt {runsPerSphere} \) (below table) on graph coloring
Table 8 The success rate of DGLS for different value of \(\texttt {maxRadius} \) (above table) or \(\texttt {runsPerSphere} \) (below table) on the k-clique problem

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Porumbel, D., Hao, JK. Distance-guided local search. J Heuristics 26, 711–741 (2020). https://doi.org/10.1007/s10732-020-09446-w

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10732-020-09446-w

Keywords

Navigation