I'm attempting to create an 'optimum' route that starts/ends at the same point and is (close to) X distance long, as opposed to just the absolute optimal route. For example, assuming my cost is a score of how scenic a road is; find the 'most scenic' drive possible from this location that is 25km long, or 50km long. Essentially I want to optimize the cost over the given distance, not find the overall optimal cost. This is perhaps a two part question:
What algorithm should I use? pgr_ksp will allow me to find the 'K' best routes, which I can then use to select the one closest to X length. However, in some cases this takes a very long time to run as it requires K to be a very large value to get a long enough path.
How can I use the same point as the start/end? Right now I am just using the two closest nodes as start/end nodes for testing purposes, but ideally the solution would start/end at the same node. Is this possible without inserting a new node and running pgr_createTopology again?