This is a framework in C++ to solve the p-median problem.
You can use the make file
$ cd project_path
$ makeOr use command line compilation
$ g++ -static -std=c++11 -static-libgcc -static-libstdc++ -O3 *.cpp -o runIt is also recomended the use of the flags: -Wall -Werror -Wextra -pedantic
After compile the project in the run file, you can use as follows:
$ run P N F FLAG_LISTwhere:
- P the parameter p of the p-median problem.
- N the number of customers.
- F the number of facilities.
- FLAG_LIST the rest of the parameters to configurate the instance. The parameter options are:
--inputthe inputs files.--outputpath to the output files.--no-outputif it is necessary to write output files. Default value is TRUE.--debugprint the logs. Default value is FALSE.--seedNUMBERseed to the random number generator.--algoOPTalgorithm to execute, the implemented algorithms are:VNS,GA.--popSIZEpopulation size.--itermaximum number of iterations--neighborhoodOPTneighbourhood strategy.--kSIZEneighbourhood size.--genOPTprocess to generate the initial population.--kmaxNUMBERparameter of the VNS.--KmayusNUMBERparameter of the VNS.--lambdaNUMBERparameter of the GA.--mNUMBERparameter of the VNS.--acceptOPT NUMBERparameter of the VNS.--nextOPT NUMBERparameter of the VNS.--changeOPTparameter of the VNS.--shakeOPTparameter of the VNS.--ls1OPT PARAMlocal search 1.--ls2OPT PARAMlocal search 2.--ga-selOPTselection operator of the GA.--ga-crossOPTcrossover operator of the GA.--ga-mutOPT PROBmutation operator of the GA.--ga-replOPTreplacement operator of the GA.
Cintrano C., Chicano F., Stützle T., Alba E. (2018) Studying Solutions of the p-Median Problem for the Location of Public Bike Stations. Advances in Artificial Intelligence. CAEPIA 2018. Lecture Notes in Computer Science, vol 11160. Springer, Cham. DOI: https://doi.org/10.1007/978-3-030-00374-6_19
- @mbcrawfo for the MakeFile example.