Skip to content

Visualising the travelling salesman problem in the context of local pubs. Developed for Warwick AI society.

License

Notifications You must be signed in to change notification settings

abhyuday10/TSM-Visualisation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSM-Visualisation

Visualising the TSM problem in the context of local pubs.

Genetic_algorithm

Call this function to run the code

Installing dependencies

git clone https://github.com/abhyuday10/TSM-Visualisation
pip install -r requirements.txt

Usage Details

  1. Create a list of locations
    from map import *
    NamesOfLocations = ['Oculus', 'Tesco']

You may want to restrict the search area by changing the value of maps.RESTRICTEDTO

  1. Create a map generator object, and pass in the list

    generator = MapGenerator(NamesOfLocations)
  2. Decode them into a list of Location objects

    locations = generator.decodeLocations()

    You may do all calculations using these objects

    Location Object

    Attribute Meaning
    name Location Name
    latitude Latitude
    longitude Longitude
    distanceTo() Distance to another location object in metres
  3. To render them on a map, specify the location objects to render, in the order required

    generator.renderLocations(locationObjectsToRender)

About

Visualising the travelling salesman problem in the context of local pubs. Developed for Warwick AI society.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages