Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Kotbenek/TSP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moved to Codeberg

This repository was moved to Codeberg: https://codeberg.org/Kotbenek/TSP

TSP

C++ TSP solver

What is a TSP?

Travelling Salesman Problem can be defined by the following question:

"Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?"

Implemented algorithms

  • Greedy
  • Repetitive greedy
  • Brute force
  • Simulated annealing
  • Genetic

Instance loading

Instance to solve can be loaded in two ways:

  • As matrix (faster, but needs more memory)
  • As coords (slower, but needs very little memory) (not available for explicit-type instances)

Loading instance as coords enables loading big instances (e.g. pla85900.tsp or bigger), as matrix representation of such instances could exhaust available memory.

Technical details

Instance file must be in TSPLIB format.

Images

About

C++ TSP solver

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published