Implementation of iterative local search for the quadratic assignment problem (C++). The QAP is a strongly NP-hard problem, and solving instances with more than 20 variables is considered intractable. The implementation uses a population of individuals and performs local improvement on them. Local improvement accepts worse solutions with a probability of 0.0. The parameters of the algorithm can be adjusted by changing the global variables. The algorithm can be used to find approximate solutions for large QAP instances for which exact methods are not suitable. (The code finds optimal solutions to nug21, nug22 and nug30 instances in a few seconds). The nug instances were first described in [1].
Instances are available at QAPLIB. (The code includes a parser for the QAPLIB format).Cite this code:
@misc{shah2014ilsqap, title={Implementation of iterative local search (ILS) for the quadratic assignment problem}, author={Shah, Shalin}, year={2014}, DOI={10.5281/zenodo.3818585} }
Usage:
- Compile the code using g++ - e.g. g++ cILSAssignment.cpp - Run ./a.out filename iterations - e.g. ./a.out instances/nug30.dat 10000 - Typical value for iterations is 10000Results:
Results on some instances (from the instances directory and at QAPLIB). The algorithm is quite fast and takes only a few seconds for 10000 iterations). The code is able to find optimum solutions for all nug instances.
Instance | Best Known Solution | This Algorithm's Solution |
nug12 | 578 | 578 |
nug14 | 1014 | 1014 |
nug15 | 1150 | 1150 |
nug16a | 1610 | 1610 |
nug16b | 1240 | 1240 |
nug17 | 1732 | 1732 |
nug18 | 1930 | 1930 |
nug20 | 2570 | 2570 |
nug21 | 2438 | 2438 |
nug22 | 3596 | 3596 |
nug24 | 3488 | 3488 |
nug25 | 3744 | 3744 |
nug27 | 5234 | 5234 |
nug30 | 6124 | 6124 |
Cited By:
- Kanduc, T. “Optimisation of factory floor layout in a complex manufacturing process.” (2014).
- Kanduc, T., and B. Rodic. "Optimisation of machine layout using a force generated graph algorithm and simulated annealing." International Journal of Simulation Modelling 15.2 (2016): 275-287.
- Rodic, B., and T. Kanduc. "Optimisation of a complex manufacturing process using discrete event simulation and a novel heuristic algorithm." International Journal of Mathematical Models and Methods in Applied Sciences 9 (2015): 320-329.
- Truetsch, Uwe. A semidefinite programming based branch-and-bound framework for the quadratic assignment problem. CentER, Tilburg University, 2014.
- Manufacturing processes optimisation in a furniture factory (ITIS 2014)
References
[1] C.E. NUGENT, T.E. VOLLMAN, and J. RUML. An experimental comparison of techniques for the assignment of facilities to locations. Operations Research, 16:150-173, 1968.