traveling-salesman

Travelling Salesman with Google Maps API or any other

只愿长相守 提交于 2019-12-03 16:05:11
I have a list of addresses and need to find the best route that reaches every address and goes back to the start With Google Maps API it is possible to calculate this with 8 waypoints I think but 8 isn't enough for my purposes. Is there someone out there who offers route optimization with more than 8 waypoints? I mean there must be, right? This is a problem that many organisations need a solution to. It is no problem at all if it costs a lot of money, the calculations are very heavy so I wouldn't expect any free service. Does maybe google have a paid service for that (for SMEs)? I'll take any

Solving the Travelling Salesman Problem in ruby (50+ locations)

我是研究僧i 提交于 2019-12-03 09:51:39
问题 I am working in a delivery company. We currently solve 50+ locations routes by "hand". I have been thinking about using Google Maps API to solve this problem, but I have read that there is a 24 points limit. Currently we are using rails in our server so I am thinking about using a ruby script that would get the coordinates of the 50+ locations and output a reasonable solution. What algorithm would you use to approach this problem? Is Ruby a good programming language to solve this type of

traveling salesman problem, 2-opt algorithm c# implementation

牧云@^-^@ 提交于 2019-12-03 03:25:34
问题 Can someone give me a code sample of 2-opt algorithm for traveling salesman problem. For now im using nearest neighbour to find the path but this method is far from perfect, and after some research i found 2-opt algorithm that would correct that path to the acceptable level. I found some sample apps but without source code. 回答1: So I got bored and wrote it. It looks like it works, but I haven't tested it very thoroughly. It assumes triangle inequality, all edges exist, that sort of thing. It

Brute force algorithm for the Traveling Salesman Problem in Java

℡╲_俬逩灬. 提交于 2019-12-03 00:40:43
I'm working on a project for a math class at school, and I chose to do mine on the Traveling Salesman Problem, something I've always wanted to investigate more. However, I'm having problems with my brute force solving algorithm. * Please go to the update at the bottom to view the most recent version of the code SKIP THIS PARAGRAPH IF YOU KNOW WHAT THE TRAVELING SALESMAN PROBLEM IS: To summarize as much as possible, the TSP goes like this: You are a salesman who wants to visit each city in a region (a city is essentially a point on a map). There are 'n' cities in the bounded x and y region, and

Optimal map routing with Google Maps

南笙酒味 提交于 2019-12-02 18:47:39
Is there a way using the Google Maps API to get back an "optimized" route given a set of waypoints (in other words, a "good-enough" solution to the traveling salesman problem), or does it always return the route with the points in the specified order? There is an option in Google Maps API DirectionsRequest called optimizeWaypoints, which should do what you want. This can only handle up to 8 waypoints, though. Alternatively, there is an open source (MIT license) library that you can use with the Google Maps API to get an optimal (up to 15 locations) or pretty close to optimal (up to 100

traveling salesman without return and with given start and end cities

梦想的初衷 提交于 2019-12-01 14:34:05
I am looking for the name of the following problem: traveling salesman problem (visit each city exactly once) but without returning to the start city and with visiting a given city at the end. In other words, I would like to specify the start and end cities, and I don't want to go back to the start city. Thanks!!! I doubt this has its own name, as it's trivially isomorphic to the normal TSP. From standard TSP to this: Given a directed weighted graph for TSP, with a start/end node, split the start/end node into a start node and an end node, with all the outgoing edges on the start node and all

Non-cycle path to all nodes

感情迁移 提交于 2019-12-01 02:45:19
问题 Is there an algorithm or set of algorithms that would let you find the shortest walking distance from an arbitrary start node so that every node gets visited in a weight, undirected graph? It's not quite Traveling Salesman, because I don't care if a node is visited more than once. (It doesn't even matter if you make it back to the start -- the walker can end up in some far-off node as long as it was the last one needed to visit all nodes.) It's not quite minimum spanning tree, because it may

What is a practical solution to the Travelling Salesman prblem, using Google Maps?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 14:11:19
What is a practical solution to the Travelling Salesman problem, using Google Maps / geolocation / route finding? I don't need the best solution, within 5% would be fine. For example, I have 20 locations in the UK to visit, in any order. This may need to scale to hundreds of locations. What sort of algorithm can I use, given that I can lookup distances (but don't want to lookup hundreds of distances)? I you are looking for a polynomial approximation for the Euclidean TSP, several algorithms have been suggested. Have a look here . There is this TSP project implemented in JS http://code.google

TSP (Traveling Salesman Problem) solver Using GoogleMap

落爺英雄遲暮 提交于 2019-11-29 20:17:27
问题 We are developing an application, in which we will show some available houses for sale in google map. User can select any houses from the map and can find the shortest driving route between all the houses he/she selected. Can any one please tell me how we can find the shortest route and can show that on the map? Is there any PHP based TSP library, that can help us to achieve what we are trying? 回答1: A Google search shows many results. http://scrivna.com/blog/travelling-salesman-problem/ -

Simulated Annealing TSP

六月ゝ 毕业季﹏ 提交于 2019-11-29 11:27:30
I'm looking to implement the simulated annealing algorithm in Java to find an optimal route for the Travelling Salesman Problem , so far I have implemented brute force and am looking to modify that code in order to use simulated annealing. Obviously brute-force and simulated annealing are very different and use very different functions. I understand simulated annealing uses a variable known as the temperature which then cools as the algorithm runs; with the temperature starting high and it gradually cooling throughout. Whilst the temperature is high the algorithm is more likely to choose