What is a good algorithm or class of algorithms that can be used to create a bus route?
I was thinking something along the lines of algorithms that are used to solve Traveling Salesman tasks or Hamiltonian paths, but, in truth, the question of how to move between two stops is not really considered.
I would like the algorithm to have at least the following characteristics:
- creates a relatively optimized path (I understand the problem is probably completed by NP, so a good heuristic is fine)
- It can handle parts of the path that have different weights (for example, time to move along this part of the path).
- It can be forced to use a given start and end point (I don't think this problem will be like this)
Code that can do this, or something like this will be appreciated (especially in C #), but a good algorithm by itself will be fine.
Note. . Although there are many algorithms that can find the shortest path between two points, I do not know the order in which I want to stop. Thus, if I do not use a combination of two algorithms (which I doubt is true), these algorithms do not do what I want (if you think that they do, explain).
Edit: Suppose I know all the stops that need to be made.
source share