Annals of Operations Research

, Volume 150, Issue 1, pp 205–230 | Cite as

A fast swap-based local search procedure for location problems

  • Mauricio G. C. Resende
  • Renato F. Werneck


We present a new implementation of a widely used swap-based local search procedure for the p-median problem, proposed in 1968 by Teitz and Bart. Our method produces the same output as the best alternatives described in the literature and, even though its worst-case complexity is similar, it can be significantly faster in practice: speedups of up to three orders of magnitude were observed. We also show that our method can be easily adapted to handle the facility location problem and to implement related procedures, such as path-relinking and tabu search.


Local search p-Median Facility location Experimental analysis Reordering problem 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Arya, V., N. Garg, R. Khandekar, A. Mayerson, K. Munagala, and V. Pandit. (2001). “Local Search Heuristics for k-Median and Facility Location Problems.” In Proc. 33rd ACM Symposium on the Theory of Computing.Google Scholar
  2. Avella, P., A. Sassano, and I. Vasil’ev. (2003). “Computational Study of Large-Scale p-Median Problems.” Technical Report 08-03, DIS—Università di Roma ”La Sapienza”.Google Scholar
  3. Avella, P., A. Sassano, and I. Vasil’ev. (2003). “A Heuristic for Large-Scale p-Median Instances.” Electronic Notes in Discrete Mathematics, 13, 1–4.Google Scholar
  4. Beasley, J.E. (1985). “A Note on Solving Large p-Median Problems.” European Journal of Operational Research, 21, 270–273.CrossRefGoogle Scholar
  5. Briant, O. and D. Naddef. (2004). “The Optimal Diversity Management Problem.” Operations Research, 52(4), 515–526.CrossRefGoogle Scholar
  6. Cormen, T., C. Leiserson, R. Rivest, and C. Stein. (2001). Introduction to Algorithms, 2nd edn. MIT Press.Google Scholar
  7. Cornuéjols, G., M.L. Fisher, and G.L. Nemhauser. (1977). “Location of Bank Accounts to Optimize Float: An Analytical Study of Exact and Approximate Algorithms.” Management Science, 23, 789–810.Google Scholar
  8. du Merle, O., D. Villeneuve, J. Desrosiers, and P. Hansen. (1999). “Stabilized Column Generation.” Discrete Mathematics, 194, 229–237.CrossRefGoogle Scholar
  9. Galvão, R.D. (1980). “A Dual-Bounded Algorithm for the p-Median Problem.” Operations Research, 28, 1112–1121.Google Scholar
  10. García-López, F., B. Melián-Batista, J.A. Moreno-Pérez, and J.M. Moreno-Vega. (2003). “Parallelization of the Scatter Search for the p-Median Problem.” Parallel Computing, 29(5), 575–589.CrossRefGoogle Scholar
  11. Glover, F. (1996). “Tabu Search and Adaptive Memory Programming: Advances, Applications and Challenges.” In R.S. Barr, R.V. Helgason, and J.L. Kennington (eds.), Interfaces in Computer Science and Operations Research, Kluwer, pp. 1–75.Google Scholar
  12. Glover, F., M. Laguna, and R. Martí. (2000). “Fundamentals of Scatter Search and Path Relinking.” Control and Cybernetics, 39, 653–684.Google Scholar
  13. Goodchild, M.F. and V. Noronha. (1983). “Location-Allocation for Small Computers.” Monograph 8, Department of Geography, University of Iowa.Google Scholar
  14. Hansen, P. and N. Mladenović. (1997). “Variable Neighborhood Search for the p-Median.” Location Science, 5, 207–226.CrossRefGoogle Scholar
  15. Hansen, P., N. Mladenović, and D. Perez-Brito. (2001). “Variable Neighborhood Decomposition Search.” Journal of Heuristics, 7(3), 335–350.CrossRefGoogle Scholar
  16. Hodgson, M.J. (1978). “Toward More Realistic Allocation in Location-Allocation Models: An Interaction Approach.” Environment and Planning A, 10, 1273–1285.CrossRefGoogle Scholar
  17. Kariv, O. and L. Hakimi. (1979). “An Algorithmic Approach to Nework Location Problems, Part II: The p-Medians.” SIAM Journal of Applied Mathematics, 37(3), 539–560.CrossRefGoogle Scholar
  18. Kuehn, A.A. and M.J. Hamburger. (1963). “A Heuristic Program for Locating Warehouses.” Management Science, 9(4), 643–666.Google Scholar
  19. Laguna, M. and R. Martí. (1999). “GRASP and Path Relinking for 2-Layer Straight Line Crossing Minimization.” INFORMS Journal on Computing, 11, 44–52.Google Scholar
  20. Maranzana, F.E. (1964). “On the Location of Supply Points to Minimize Transportation Costs.” Operations Research Quarterly, 15(3), 261–270.CrossRefGoogle Scholar
  21. Matsumoto, M. and T. Nishimura. (1998). “Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudorandom Number Generator.” ACM Transactions on Modeling and Computer Simulation, 8(1), 3–30.CrossRefGoogle Scholar
  22. Reinelt, G. (1991). “TSPLIB: A Traveling Salesman Problem Library.” ORSA Journal on Computing, 3, 376–384.
  23. Resende, M.G.C. and C.C. Ribeiro. (2005). “GRASP with Path-Relinking: Recent Advances and Applications.” In T. Ibaraki, K. Nonobe, and M. Yagiura (eds.), Metaheuristics: Progress as Real Problem Solvers, Kluwer. In press.Google Scholar
  24. Resende, M.G.C. and R.F. Werneck. (2003). “On the Implementation of a Swap-Based Local Search Procedure for the p-Median Problem.” In R.E. Ladner (ed.), Proceedings of the Fifth Workshop on Algorithm Engineering and Experiments (ALENEX’03), SIAM, pp. 119–127.Google Scholar
  25. Resende, M.G.C. and R.F. Werneck. (2004). “A Hybrid Heuristic for the p-Median Problem.” Journal of Heuristics, 10(1), 59–88.CrossRefGoogle Scholar
  26. Rolland. E., D.A. Schilling, and J.R. Current. (1996). “An Efficient Tabu Search Procedure for the p-Median Problem.” European Journal of Operational Research, 96, 329–342.CrossRefGoogle Scholar
  27. Rosing, K.E. (1997). “An Empirical Investigation of the Effectiveness of a Vertex Substitution Heuristic.” Environment and Planning B, 24, 59–67.CrossRefGoogle Scholar
  28. Rosing, K.E. and C.S. ReVelle. (1997). “Heuristic Concentration: Two Stage Solution Construction.” European Journal of Operational Research, 97, 75–86.CrossRefGoogle Scholar
  29. Rosing, K.E., C.S. ReVelle, and H. Rosing-Vogelaar. (1979). “The p-Median and its Linear Programming Relaxation: An Approach to Large Problems.” Journal of the Operational Research Society, 30(9), 815–823.CrossRefGoogle Scholar
  30. Senne, E.L.F. and L.A.N. Lorena. (2000). “Langrangean/Surrogate Heuristics for p-Median Problems.” In M. Laguna and J.L. González-Velarde (eds.), Computing Tools for Modeling, Optimization and Simulation: Interfaces in Computer Science and Operations Research, Kluwer, pp. 115–130.Google Scholar
  31. Senne, E.L.F. and L.A.N. Lorena. (2002). “Stabilizing Column Generation using Lagrangean/Surrogate Relaxation: An Application to p-Median Location Problems.” European Journal of Operational Research. To appear.Google Scholar
  32. Senne, E.L.F., L.A.N. Lorena, and M.A. Pereira. (2005). “A Branch-and-Price Approach to p-Median Location Problems.” Computers and Operations Research, 32, 1655–1664.CrossRefGoogle Scholar
  33. Taillard, E.D. (2003). “Heuristic Methods for Large Centroid Clustering Problems.” Journal of Heuristics, 9(1), 51–74.CrossRefGoogle Scholar
  34. Teitz, M.B. and P. Bart. (1968). “Heuristic Methods for Estimating the Generalized Vertex Median of a Weighted Graph.” Operations Research, 16(5), 955–961.CrossRefGoogle Scholar
  35. Thorup M. (2001). “Quick k-Median, k-Center, and Facility Location for Sparse Graphs.” In Proceedings of the 28th International Colloquium on Automata, Languages and Programming (ICALP 2001), Volume 2076 of Lecture Notes in Computer Science, Springer, pp. 249–260.Google Scholar
  36. Voß, S. (1996). “A Reverse Elimination Approach for the p-Median Problem.” Studies in Locational Analysis, 8, 49–58.Google Scholar
  37. Whitaker, R. (1983). “A Fast Algorithm for the Greedy Interchange of Large-Scale Clustering and Median Location Prolems.” INFOR, 21, 95–108.Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2006

Authors and Affiliations

  1. 1.AT&T Labs ResearchFlorham ParkUSA
  2. 2.Department of Computer SciencePrinceton UniversityPrincetonUSA

Personalised recommendations