leejacobson / googlemaps-tsp-ga

Solving the Traveling Salesman Problem using Google Maps and Genetic Algorithms
136 stars 73 forks source link

help wanted #1

Open didix16 opened 8 years ago

didix16 commented 8 years ago

Hi! I saw your work about TSP. I'm working in a project made in nodejs which works with geolocation points ( a object like {latitude:x, longitude: y} andsearching a lot on how to make a optimal route starting from one point and return back , crossing some points, I saw your code.

I need a method that passing a start point {latitude:x, longitude:y} and array of points, returns a new point array ordered representing the route to travel with.

It's hard for me to understand the algorithm, so I'm wondering if you could write the method using your lib or help me to write it.

Thank you so much :)

hussein-khamis commented 4 years ago

Hi, Have you found a solution for your problem after 3-4 years?

didix16 commented 4 years ago

Hi @hussein-khamis . I had to left the project i which I was working but I founded the algorithm that solves that problem. Is the https://en.wikipedia.org/wiki/Travelling_salesman_problem. I found a repository which uses javascript to solve the problem: https://github.com/lovasoa/salesman.js/ But there are a lot of implementations over Internet.

Hope this help you :)

hussein-khamis commented 4 years ago

The thing is I am using Angular haha, and though this would be perfect I only I could use latitude and longitude, since I have my own markers. Any idea how we could do that? It's super important haha.

didix16 commented 4 years ago

Sorry I never used Angular. Anyway you can take the TSP algorithm and adapt it to angular :)