{"id":16274744,"url":"https://github.com/mlopez-ibanez/acotspqap","last_synced_at":"2026-07-14T03:31:28.606Z","repository":{"id":122907518,"uuid":"266142984","full_name":"MLopez-Ibanez/ACOTSPQAP","owner":"MLopez-Ibanez","description":"ACOTSPQAP: Ant Colony Optimization Algorithms for the Travelling Salesman Problem and the Quadratic Assignment Problem","archived":false,"fork":false,"pushed_at":"2023-03-09T14:15:24.000Z","size":1751,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T16:33:03.518Z","etag":null,"topics":["metaheuristic","optimization","qaplib","tsp-solver"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MLopez-Ibanez.png","metadata":{"files":{"readme":"README-ACOTSP.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-22T15:22:02.000Z","updated_at":"2025-09-12T10:14:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"df75ffd0-3831-44b7-90e3-e43ee84d7650","html_url":"https://github.com/MLopez-Ibanez/ACOTSPQAP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MLopez-Ibanez/ACOTSPQAP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2FACOTSPQAP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2FACOTSPQAP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2FACOTSPQAP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2FACOTSPQAP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MLopez-Ibanez","download_url":"https://codeload.github.com/MLopez-Ibanez/ACOTSPQAP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLopez-Ibanez%2FACOTSPQAP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35445233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metaheuristic","optimization","qaplib","tsp-solver"],"created_at":"2024-10-10T18:29:53.765Z","updated_at":"2026-07-14T03:31:28.578Z","avatar_url":"https://github.com/MLopez-Ibanez.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"       AAAA    CCCC   OOOO   TTTTTT   SSSSS  PPPPP\n      AA  AA  CC     OO  OO    TT    SS      PP  PP\n      AAAAAA  CC     OO  OO    TT     SSSS   PPPPP\n      AA  AA  CC     OO  OO    TT        SS  PP\n      AA  AA   CCCC   OOOO     TT    SSSSS   PP\n\n######################################################\n##########    ACO algorithms for the TSP    ##########\n######################################################\n\n      Version: 1.05\n      Author:  Thomas Stuetzle\n      Copyright (c) Thomas Stuetzle, 2002\n\n\nThis is the README file to the software package ACOTSP.\n\nThis software package was developed by Thomas Stuetzle in connection\nwith the Book \n\n[DorStu04] Marco Dorigo and Thomas Stuetzle, \"Ant Colony\nOptimization\", MIT Press, Cambridge, MA, USA, 2004.\n\nThe software package is freely available subject to the \nGNU General Public Licence, which is included in file gpl.txt.\n\nIf you use ACOTSP in your research, I would appreciate a citation in\nyour publication(s). Please cite it as\n\nThomas Stuetzle. ACOTSP, Version 1.0. Available from\nhttp://www.aco-metaheuristic.org/aco-code, 2004.\n\nThis software package provides an implementation of various Ant Colony\nOptimization (ACO) algorithms for the symmetric Traveling\nSalesman Problem (TSP). The ACO algorithms implemented are Ant System,\nElitist Ant System, MAX-MIN Ant System, Rank-based version of Ant\nSystem, Best-Worst Ant System, and Ant Colony System. This is Version\n1.0 of ACOTSP; it is in large part identical to the software used to\nproduce the results in [DorStu04], but it has been slightly adapted to\nmake the code more readable, more comments were added, and a new\ncommand line parser was generated with opag.\n\nAIMS OF THE SOFTWARE: This software was developed to have one common\ncode for the various known ACO algorithms that were at some point\napplied to the TSP in the literature. The software tries to provide a\nreasonably efficient implementation of these ACO algorithms while at\nthe same time aiming for readability and understandability of the\ncode.\n\n=========\nCONTENTS\n=========\n\n\nThe GNU General Public Licence:\ngpl.txt\n\nThe main control routines, main:\nacotsp.c\n\nProcedures to implement the ants behaviour:\nants.c\nants.h\n\nInput / output / statistics routines:\nInOut.c\nInOut.h\n\nProcedures specific to the TSP:\nTSP.c\nTSP.h\n\nLocal search procedures:\nls.c\nls.h\n\nAdditional useful / helping procedure:\nutilities.c\nutilities.h\n\nCommand line parser:\nparse.c\nparse.h\n\nTime measurement:\ntimer.h \ndos_timer.c  : default timer implementation based on clock()\nunix_timer.c : in case you want to use rusage() instead, edit the\n               Makefile to use this one or compile with 'make TIMER=unix'\n\nMakefile\n\nInstances: Some problem instances from TSPLIB: eil51.tsp kroA100.tsp\n  d198.tsp lin318.tsp pcb442.tsp att532.tsp rat783.tsp pcb1173.tsp\n  d1291.tsp pr2392.tsp. Other TSP instances are available from TSPLIB\n  (http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/index.html),\n  the webpage for the 8th DIMACS Implementation Challenge on the TSP\n  (http://dimacs.rutgers.edu/Challenges/TSP/) or the webpage on \"The\n  Traveling Salesman Problem\"\n  (http://www.math.uwaterloo.ca/tsp/index.html)\n\n\n=====\nCode\n=====\n\n\nThe software was developed in ANSI C under Linux, using the GNU 2.95.3\ngcc compiler and extensively tested in this environment. The software\nis distributed as a gzipped tar file.\n\nTo install the code, first obtain the file ACOTSP.V1.0.tar.gz. Unzip\nthe file by typing\n\ngunzip ACOTSP.V1.0.tar.gz\n\nand then unpack it by typing \n\ntar -xvf ACOTSP.V1.0.tar\n\nThe software will unpack in a new folder ACOTSP.V1.0 \n\nTo compile it under Linux just type 'make' and the executable 'acotsp'\nis produced.\n\nNote: The code is written in ANSI C. Hence, the code should be\nreasonable portable to other Operating Systems than Linux or Unix.\n\n\n======\nUSAGE\n======\n\n\nGiven the large number of ACO algorithms, also the number of command\nline options is relatively large.\n\nThe default parameter settings are such, that MAX-MIN Ant System will\nbe run using a 3-opt local search, using alpha = 1, beta = 2, rho =\n0.5 for a maximum of 10 seconds per each trial for 10 independent\ntrials. (guess who developed MAX-MIN Ant System ;-)\n\nThe executable 'acotsp' provides the following command line options\n(given are the short and the long options):\n\n-r, --tries          # number of independent trials\n-s, --tours          # number of steps in each trial\n-t, --time           # maximum time for each trial\n    --seed           # seed for the random number generator \n-i, --tsplibfile     f inputfile (TSPLIB format necessary)\n-o, --optimum        # stop if tour better or equal optimum is found\n-m, --ants           # number of ants\n-g, --nnants         # nearest neighbours in tour construction\n-a, --alpha          # alpha (influence of pheromone trails)\n-b, --beta           # beta (influence of heuristic information)\n-e, --rho            # rho: pheromone trail evaporation\n-q, --q0             # q_0: prob. of best choice in tour construction\n-c, --elitistants    # number of elitist ants\n-f, --rasranks       # number of ranks in rank-based Ant System\n-k, --nnls           # No. of nearest neighbors for local search\n-l, --localsearch    0: no local search   1: 2-opt   2: 2.5-opt   3: 3-opt\n-d, --dlb            1 use don't look bits in local search\n-u, --as               apply basic Ant System\n-v, --eas              apply elitist Ant System\n-w, --ras              apply rank-based version of Ant System\n-x, --mmas             apply MAX-MIN ant system\n-y, --bwas             apply best-worst ant system\n-z, --acs              apply ant colony system\n-h, --help             display the help text and exit\n\nOptions -u --as, -v --eas, -w --ras, -x --mmas, -y --bwas, -z --acs,\n-h, --help don't need arguments, while all the others do.  \n\nA Mandatory option is only the option \"-i, --tsplibfile\". Here, mandatory\nmeans that without specifying this option, the program won't work,\nsince there is no input file. \n\nAll the other options take some default values. The default values for\nthese are:\n\n-r, --tries       : 10\n-s, --tours       : 100\n-t, --time        : 10 /* seconds */\n-o, --optimum     : 1\n-m, --ants        : 25\n-g, --nnants      : 20\n-a, --alpha       : 1\n-b, --beta        : 2\n-e, --rho         : 0.5\n-q, --q0          : 0.0\n-c, --elitistants : 100\n-f, --rasranks    : 6\n-k, --nnls        : 20\n-l, --localsearch : 3 /* use 3-opt */\n-d, --dlb         : 1 \n-u, --as          : 0\n-v, --eas         : 0\n-w, --ras         : 0 \n-x, --mmas        : 1 /* apply MAX-MIN Ant System */\n-y, --bwas        : 0\n-z, --acs         : 0\n\n\nThe default settings imply that as default MAX-MIN Ant System is run\nusing a 3-opt local search procedure. Please note that these default\nvalues do not really make sense for some of the algorithms (e.g.,\ntypically an evaporation of 0.2 is recommended vor MAX-MIN Ant\nSystem); that is, for some of the algorithms the default parameter\nsettings lead to poor performance (an example is ACS). Hence, when you\nuse any of the ACO algorithms, make sure you set the appropriate\nparameter values. Typically, one may want to adjust the parameters\n\n-t, --time\n-o, --optimum\n-m, --ants\n-b, --beta\n-e, --rho \n-q, --q0\n-l, --localsearch\n\nNote that only one option among -u --as, -v --eas, -w --ras,\n-x --mmas, -y --bwas, -z --acs, is to be specified.\n\nExamples for running an experiments are:\n\n./acotsp -i lin318.tsp -v -t 60. -o 42029 -m 50 -b 5\n\nor\n\n./acotsp --tsplibfile lin318.tsp --acs --rho 0.1 --q0 0.95 --time 60. --optimum 42029 --ants 10\n\n\n=======\nOUTPUT\n=======\n\n\nEvery experiment produces three files. These files are \n\nbest.tsplibfilename\ncmp.tsplibfilename\nstat.tsplibfilename\n\nwhere tsplibfilename is the instance identifier of the instance under\nsolution. \n\nThe most important of these is the file \"cmp.tsplibfilename\". This\nfile starts with a specification of the parameter settings used to run\nthe experiment. The section with the comprehensive experimental data\nstarts with\n\nbegin problem tsplibfilename\n\nNext the random number seed for the next trial is given\n\nThen, for each trial statistical information on the development of the\nbest-so-far solution is given. Each section for a trial starts with\n\nbegin try \u003ctrial_number\u003e\n\nThen, each time the algorithm finds a new best solution a line \n\nbest \u003cnumber\u003e\t iteration \u003cnumber\u003e\t tours \u003cnumber\u003e\t time \u003cnumber\u003e\n\nis added, where \"best\" is the tour length of the best-so-far solution;\niteration is the iteration number in which this solution is found;\ntours is the number of solutions constructed so far (typically this is\nsimple iteration X n_ants); and time is the time at which a new\nbest-so-far solution is found\n\nEach trial is ended by \n\nend try \u003ctrial_number\u003e\n\nOnce all trials are run the line \n\nend problem tsplibfilename\n\nis added to end the file. \n\nThe file  best.tsplibfilename\n\ncollects the information about parameter settings, the best solution\nfound in each trial, and some additional statistical information.\n\nThe file stat.tsplibfilename \n\nmay be used for the output of statistical information on a trial as\ngenerated by the procedure population_statistics(); in InOut.c;\nhowever, it is not heavily used in ACOTSP V1.0. \n\nHave fun, and if you have any comments please write to \n\nstuetzle no@spam ulb.ac.be\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlopez-ibanez%2Facotspqap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlopez-ibanez%2Facotspqap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlopez-ibanez%2Facotspqap/lists"}