Skip to content

CheesyChocolate/TSP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSP

simple and module TSP project written in python

Usage

move to the project directory and run the following command:

python core.py
  • config file

The configuration of project can be done using a config.yaml file. The first found config.yaml file in the project directory will be used.

All the configuration, even the Input file is stored in the config.yaml file.

Currently, all the fields in the config.yaml file are required.

  • Input file format

the input file should be a text file with the following format:

...
NODE_COORD_SECTION
<node_id> <x> <y>
...
EOF

Example output

The following image is the output of the project for the berlin52 dataset.

Without random subset 2-opt

With random subset 2-opt

Credits

  • Ali Daghighi for Cycle Crossover implementation
  • Ali Daghighi for plot tsp cities dynamic
  • Mahyar Teymournezhad for the idea of storing city distances in a matrix

About

simple and module TSP project written in python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages