{"id":22188991,"url":"https://github.com/mikoweb/symfony-tsp-application","last_synced_at":"2026-05-13T07:04:08.693Z","repository":{"id":237029449,"uuid":"793649719","full_name":"mikoweb/symfony-tsp-application","owner":"mikoweb","description":"An application that uses the ant algorithm to solve the traveling salesman problem (TSP), written in PHP 8.3, Symfony 7.0 and Angular.","archived":false,"fork":false,"pushed_at":"2024-05-14T10:49:21.000Z","size":2536,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T00:41:18.556Z","etag":null,"topics":["algorithms","angular","php","symfony","tsp-problem"],"latest_commit_sha":null,"homepage":"https://tsp.mikoweb.usermd.net/","language":"PHP","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/mikoweb.png","metadata":{"files":{"readme":"README.md","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":"2024-04-29T16:03:27.000Z","updated_at":"2024-05-22T12:25:29.000Z","dependencies_parsed_at":"2024-05-11T12:28:11.492Z","dependency_job_id":"1ab69b77-4b2b-4351-9bbd-303376b003a9","html_url":"https://github.com/mikoweb/symfony-tsp-application","commit_stats":null,"previous_names":["mikoweb/symfony-tsp-application"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikoweb%2Fsymfony-tsp-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikoweb%2Fsymfony-tsp-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikoweb%2Fsymfony-tsp-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikoweb%2Fsymfony-tsp-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikoweb","download_url":"https://codeload.github.com/mikoweb/symfony-tsp-application/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245343981,"owners_count":20599867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["algorithms","angular","php","symfony","tsp-problem"],"created_at":"2024-12-02T11:14:12.453Z","updated_at":"2026-05-13T07:04:08.614Z","avatar_url":"https://github.com/mikoweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# symfony-tsp-application\n\nAn application that uses the ant algorithm to solve the traveling salesman problem (TSP).\n\nThe application is designed to find the optimal route by visiting all cities exactly once and returning to the starting city, minimizing the total distance traveled during the trip.\n\n## Most important classes\n\n* [GeoDistance](./src/Module/Distance/Application/Math/GeoDistance.php)\n* [DistanceMapFactory](./src/Module/Distance/Application/Factory/DistanceMapFactory.php)\n* [PheromoneMatrix](./src/Module/TSP/Application/Problem/PheromoneMatrix.php)\n* [SalesmanAnt](./src/Module/TSP/Application/Problem/SalesmanAnt.php)\n* [AntColonyOptimization](./src/Module/TSP/Application/Problem/AntColonyOptimization.php)\n\n## Example of usage in code\n\nFor a complete usage example, see the class:\n\n* [AskForProblemSolutionHandler](./src/Module/TSP/Application/Interaction/AskForProblemSolutionQuery/Handler/AskForProblemSolutionHandler.php)\n\n## API usage example\n\nTo resolve the TSP problem, use the following method:\n\n`POST {{ baseUrl }}/api/tsp/solve`\n\nJSON Body:\n\n```json\n{\n    \"iterations\": 100,\n    \"initialLocationIndex\": 0,\n    \"alpha\": 1.0,\n    \"beta\": 2.0,\n    \"distanceCoefficient\": 103,\n    \"evaporation\": 0.3858,\n    \"antFactor\": 0.8917,\n    \"c\": 0.7967,\n    \"locations\": [\n        {\n            \"lat\": 52.228335194897305,\n            \"lng\": 21.024282381375762,\n            \"name\": \"Warszawa\"\n        },\n        {\n            \"lat\": 50.07441120406187,\n            \"lng\": 19.918273393012594,\n            \"name\": \"Kraków\"\n        },\n        {\n            \"lat\": 51.12409338222792,\n            \"lng\": 17.028842839711565,\n            \"name\": \"Wrocław\"\n        },\n        {\n            \"lat\": 53.77693249670846,\n            \"lng\": 20.480296608541163,\n            \"name\": \"Olsztyn\"\n        },\n        {\n            \"lat\": 53.42671867480122,\n            \"lng\": 14.536716299792118,\n            \"name\": \"Szczecin\"\n        },\n        {\n            \"lat\": 53.130865428178524,\n            \"lng\": 23.16610165182039,\n            \"name\": \"Białystok\"\n        },\n        {\n            \"lat\": 50.811012584653966,\n            \"lng\": 19.11830141901638,\n            \"name\": \"Częstochowa\"\n        },\n        {\n            \"lat\": 54.36451994638047,\n            \"lng\": 18.64580473617786,\n            \"name\": \"Gdańsk\"\n        },\n        {\n            \"lat\": 52.41391635101633,\n            \"lng\": 16.931845710832814,\n            \"name\": \"Poznań\"\n        },\n        {\n            \"lat\": 53.016850513186284,\n            \"lng\": 18.604181525471216,\n            \"name\": \"Toruń\"\n        },\n        {\n            \"lat\": 54.541025621722184,\n            \"lng\": 18.524949921520708,\n            \"name\": \"Gdynia\"\n        },\n        {\n            \"lat\": 51.315313230026035,\n            \"lng\": 22.606483789824047,\n            \"name\": \"Lublin\"\n        },\n        {\n            \"lat\": 53.835969079031415,\n            \"lng\": 20.475017464328243,\n            \"name\": \"Dywity\"\n        },\n        {\n            \"lat\": 53.986715221744525,\n            \"lng\": 20.39720594995499,\n            \"name\": \"Dobre Miasto\"\n        },\n        {\n            \"lat\": 54.01076187804673,\n            \"lng\": 20.081378370435193,\n            \"name\": \"Miłakowo\"\n        }\n    ]\n}\n```\n\n## Screenshot\n\n![Screenshot](./images/Implementacja-Algorytmu-Mrówkowego-w-Problemie-Komiwojażera.png)\n\n## Copyrights\n\nCopyright © Rafał Mikołajun 2024.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikoweb%2Fsymfony-tsp-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikoweb%2Fsymfony-tsp-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikoweb%2Fsymfony-tsp-application/lists"}