[pgrouting-users] Alternate routes (but same cost mechanism)

Daniel Kastl 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.
>

Hi Charles,

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):
http://www.pgrouting.org/rfc/rfc-04.html
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
routes.
Different routing algorithms shouldn't give you a different result ... then
something might be wrong with them ;-)

Daniel




>
> 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.
>
> TIA,
> charles
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20110907/3b0eccda/attachment.html


More information about the Pgrouting-users mailing list