[pgrouting-users] Least cost path

As any thought ever being put in to creating a function to return the least cost path?

If I have a network which for example represents he amount of effort it takes to get from one places to another and the distances between places, what I would like to do is calculate the path across the network that is going to reflect the lowest cost.

If I use one of the many dykstra calls on the distance metric it will generate a path that follows the shortest route. What I actually one to get is the shortest path that also requires the least effort to navigate. Any suggestions ?

Dave/.

Hi Dave!

These algorithms are working with any kind of costs. It doesn’t have to be the distance. You can take the column with the amount of effort as cost.
This should return the route that takes the least effort to navigate.

Best wishes,
Sibylle

_______________________________________________________________________

Die Bundesanstalt Statistik Österreich sowie alle Mitwirkenden an den
beigefügten Unterlagen haben deren Inhalte sorgfältig recherchiert
und erstellt. Fehler können dennoch nicht gänzlich ausgeschlossen
werden. Die Genannten übernehmen daher keine Haftung für die
Richtigkeit, Vollständigkeit und Aktualität der Inhalte, insbesondere
übernehmen sie keinerlei Haftung für eventuelle unmittelbare oder
mittelbare Schäden, die durch die direkte oder indirekte Nutzung der
angebotenen Inhalte entstehen.

Korrekturhinweise übermitteln Sie bitte an die absendende Stelle.

Diese Nachricht ist ausschließlich für die in der Anschrift genannte
Person bestimmt. Sollten Sie dieses E-Mail irrtümlich erhalten haben,
verständigen Sie bitte die absendende Stelle und vernichten Sie
die Nachricht inklusive aller Anhänge. Danke.

Bundesanstalt Statistik Österreich, 1110 Wien, Guglgasse 13

Tel. +43 (1) 71128-0, Fax +43 (1) 71128-7728
E-Mail: office@statistik.gv.at, Internet: www.statistik.at

Firmenbuch: FN 191155k, Firmenbuchgericht: Handelsgericht Wien
Firmensitz: Wien, Gerichtsstand: Wien, UID: ATU37869909, DVR 0000043

_______________________________________________________________________

Hello Dave,

According to my understanding you would like to compute a path which is the shortest and also takes the least effort to navigate. According to the description of "edges_sql" query [1] which is given as an input to the dijkstra function[2], the "cost" column in "edges_sql" query [1] represents the weight of the edge. In your case this weight can a metric which is a combination of both the distance and the effort of travelling across the edge. You can create your own weight metric, for example "distance + effort" or "distance * effort" or any other such function which tries to capture the entity you want to minimize. This metric and now be used as the "cost" column in the "edges_sql" query [1] to get a path which minimizes both the distance and the effort.

Regards,
Rohith Reddy.

[1] http://docs.pgrouting.org/latest/en/pgr_dijkstra.html#description-of-the-edges-sql-query-for-dijkstra-like-functions
[2] http://docs.pgrouting.org/latest/en/pgr_dijkstra.html#minimal-signature

----- Original Message -----
From: "Dave Potts" <mrdapotts@gmail.com>
To: "pgrouting-users" <pgrouting-users@lists.osgeo.org>
Sent: Tuesday, April 10, 2018 12:03:43 PM
Subject: [pgrouting-users] Least cost path

As any thought ever being put in to creating a function to return the least cost path?

If I have a network which for example represents he amount of effort it takes to get from one places to another and the distances between places, what I would like to do is calculate the path across the network that is going to reflect the lowest cost.

If I use one of the many dykstra calls on the distance metric it will generate a path that follows the shortest route. What I actually one to get is the shortest path that also requires the least effort to navigate. Any suggestions ?

Dave/.

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/pgrouting-users

hi Sibylle,

Yes I seen now.
D.

···

2018-04-10 8:15 GMT+01:00 SAUL Sibylle <Sibylle.Saul@statistik.gv.at>:

Hi Dave!

These algorithms are working with any kind of costs. It doesn’t have to be the distance. You can take the column with the amount of effort as cost.

This should return the route that takes the least effort to navigate.

Best wishes,

Sibylle




Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/pgrouting-users