[pgrouting-users] Alternate routes (but same cost mechanism)
daniel at georepublic.de
Tue Sep 6 11:15:06 EDT 2011
On Tue, Sep 6, 2011 at 11:52 PM, Charles Galpin <cgalpin at lhsw.com> wrote:
> I have what I consider a bit of a crazy requirement for routing. In
> addition to being able to influence the route with rules like shortest path,
> or fastest, etc. I need to also be able to offer alternative routes within a
> specific mode. So say they want to favor or avoid highways, I need to be
> able to give them a few alternatives as well.
If you're looking for something like the second shortest or third shortest
path, etc., this is called k-shortest path.
But it's not implemented in pgRouting (yet):
Maybe someone wants to do this or want to sponsor the development.
> Does anyone have any thoughts on this? I'm pretty sure even google is
> doing something like showing you fastest versus shortest, or some other
> weighting between the options they give in their alternate routes.
I guess that, as you say, they use different weights for their alternative
Different routing algorithms shouldn't give you a different result ... then
something might be wrong with them ;-)
> I have not played with any of the routing algorithms other than Dijkstra
> (for some reason I could never get A* to work for me when I first looked at
> pgRouting but will revisit it) so I am not sure if I can expect them to give
> different results (or with shooting star even), given the same weighting.
> The only think I can think of is to throw "blocks" or penalty wieghts in at
> random locations (or somehow come up with a clever way to pick them) and
> re-route and take the new paths, but I suspect this will be very crude, and
> not useful anyway.
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pgrouting-users