Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.35 KB

README.md

File metadata and controls

48 lines (36 loc) · 1.35 KB

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)