traveling-salesman

Bicycle messenger / TSPPD with OptaPlanner

泪湿孤枕 提交于 2019-11-29 02:34:52
Dear OptaPlanner experts! I would like to use OptaPlanner (or a similar Open Source Java Framework) to optimize routes for a bicycle messenger service. Let's assume 5 messengers have to pick up 30 envelopes FROM a certain origin and deliver them TO a certain destination: X(FROM) Y(FROM) X(TO) Y(TO) envelope 1 13745 55419 13883 55756 envelope 2 8406 53246 13937 55854 envelope 3 15738 57396 35996 79499 envelope 4 12045 60418 19349 57118 envelope 5 13750 56416 35733 78403 envelope 6 13190 57068 11860 59749 envelope 7 15021 55768 14098 57379 envelope 8 11513 58543 11501 59683 envelope 9 12013

Using A* to solve Travelling Salesman

天涯浪子 提交于 2019-11-28 18:48:20
I've been tasked to write an implementation of the A* algorithm (heuristics provided) that will solve the travelling salesman problem. I understand the algorithm, it's simple enough, but I just can't see the code that implements it. I mean, I get it. Priority queue for the nodes, sorted by distance + heuristic(node), add the closest node on to the path. The question is, like, what happens if the closest node can't be reached from the previous closest node? How does one actually take a "graph" as a function argument? I just can't see how the algorithm actually functions, as code. I read the

Minimum distance between start and end by going through must visit points in a maze

旧街凉风 提交于 2019-11-28 11:39:06
问题 So, suppose i have a maze, which has a start point and an end point, marked with Orange and red respectively and my goal is to find the minimum distance between them. The blocked path is represented by black colour and the open path is represented by white colour . However there are two modification done in this. There are some cells which are must visit, marked in grey colour. Any cell can be visited any number of times(even the start, finish and must visit points) for ex- B=Black, W=white,

TSP - Branch and bound

夙愿已清 提交于 2019-11-28 01:07:49
I'm trying to solve the TSP with Branch and bound algorithm. I must build a matrix with costs but I have this problem: I have city with coordinates x and y. The cost of traveling is ceil(ceil(sqrt((x1-x2)^2+(y1-y2)^2))/v) + days spent in the city. V is speed. Days spent in the city depends from day when w comes to the city. For example if we arrived on Monday(t1) to city 1, we stay for 9 days but if we arrived on Tuesday, then we stay in the city for 4 days. x y t1 . t7 city 1. 79 -36 9 4 8 5 5 7 8 city 2. 8 67 6 9 2 1 9 9 1 city 3. 29 57 7 5 10 8 10 9 4 How can I solve this problem using

Variation of TSP which visits multiple cities

一曲冷凌霜 提交于 2019-11-28 00:28:28
I am looking to discuss branch and bound solution for TSP with multiple visits.(that is every city needs to be visited atleast once , instead of just once) Edit: Removed the doubt as it was not relevant as pointed by Jitse. Now the question is more clear. Simply augment the graph by adding, for each pair of nodes A and B, an edge representing the shortest path from A to B. The Floyd-Warshall algorithm allows you to do this in O(n^3), which is much faster than any TSP algorithm. Once you've done this, use a standard TSP branch and bound technique. This site has some information from Applegate's

What is the problem name for Traveling salesman problem(TSP) without considering going back to starting point?

拜拜、爱过 提交于 2019-11-27 19:20:09
I would like to know what is the problem name for TSP w/o considering the way of going back to starting point and what is the algorithm to solve this. I looked into Shortest path problem but that is not what I am looking for, the problem only find the shortest path from 2 assigned points. But what I am looking for is the problem which we give n points and inputting only 1 starting point. Then, find the shortest path traveling all points exactly once. (end point can be any point.) I also looked into Hamiltonian path problem but it seems not to solve my defined problem but rather find whether

How can the A* algorithm be applied to the traveling salesman problem? [duplicate]

旧时模样 提交于 2019-11-27 18:19:29
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Using A* to solve Travelling Salesman Problem I have recently learned that the A* algorithm can be applied to the travelling salesman problem. Bot how exactly do we define the start and the goal here, and how do we apply weights to nodes (what is the heuristic)? Would someone explain to me how A* can be applied here? 回答1: A* is a derivative of Dijsktra, which I don't think can be used in this fashion. First, the

Bicycle messenger / TSPPD with OptaPlanner

隐身守侯 提交于 2019-11-27 16:58:44
问题 Dear OptaPlanner experts! I would like to use OptaPlanner (or a similar Open Source Java Framework) to optimize routes for a bicycle messenger service. Let's assume 5 messengers have to pick up 30 envelopes FROM a certain origin and deliver them TO a certain destination: X(FROM) Y(FROM) X(TO) Y(TO) envelope 1 13745 55419 13883 55756 envelope 2 8406 53246 13937 55854 envelope 3 15738 57396 35996 79499 envelope 4 12045 60418 19349 57118 envelope 5 13750 56416 35733 78403 envelope 6 13190 57068

Crossover operation in genetic algorithm for TSP

杀马特。学长 韩版系。学妹 提交于 2019-11-27 14:53:29
问题 I'm trying to solve the Travelling Salesman Problem (TSP) with Genetic algorithm. My genome is a permutation of a vertex in graph (path for salesman). How should I perform the crossover operation over my genomes? Where can I find implementations of my problem in C#? 回答1: You should check "Genetic Algorithm Solution of the TSP Avoiding Special Crossover and Mutation" by Gokturk Ucoluk. It gives an overview of the special crossover operators for permutations and proposes a clever representation

Travelling Salesman with multiple salesmen?

风格不统一 提交于 2019-11-27 12:41:52
I have a problem that has been effectively reduced to a Travelling Salesman Problem with multiple salesmen. I have a list of cities to visit from an initial location, and have to visit all cities with a limited number of salesmen. I am trying to come up with a heuristic and was wondering if anyone could give a hand. For example, if I have 20 cities with 2 salesmen, the approach that I thought of taking is a 2 step approach. First, divide the 20 cities up randomly into 10 cities for 2 salesman each, and I'd find the tour for each as if it were independent for a few iterations. Afterwards, I'd