<p dir="ltr">Hi Steve, </p>
<p dir="ltr">I'm following those experiments you are working on... :-) </p>
<p dir="ltr">Regarding APSP I think currently it's not clear on what circumstances these functions can be used. I found some explicit reference on develop-vrp or gsoc-vrp branch and after that I realized no one seems to be using those algorithms, apart from the fact that Johnson's implementation seems to not handle at all negative costs which I think that may defeat it theoretical purpose (but this is not the reason of this e-mail as I'm still studying that subject). </p>
<p dir="ltr">Maybe this help to understand my doubts... </p>
<p dir="ltr">Thanks! </p>
<p dir="ltr">----<br>
Helder Alves</p>
<div class="gmail_quote">On Jan 5, 2014 2:54 AM, "Stephen Woodbridge" <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 1/4/2014 8:58 PM, Helder Alves wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi List,<br>
<br>
I've search the Internet for an example of a practical appliance of<br>
pgr_apspjohnson function using OSM data.<br>
<br>
If this algorithm is supposed to feed VRP using a VRP distance table,<br>
from the found documentation I suppose it must generate the equivalent<br>
to TSP distance matrix but in a record format pair by pair of all the<br>
vertices instead of the multi-dimensional array used by pgr_TSP, please<br>
correct me if I'm wrong.<br>
<br>
Problem is, what data is supposed to feed pgr_apspjohnson?<br>
source/target/cost ways (table) data for the vids I want to order using<br>
pgr_pointtovids function, for example? If not, I would like someone to<br>
elaborate a bit on this...<br>
<br>
What about pgr_apspwarshall? Is it the same or not?<br>
<br>
Thanks in advance for your help!<br>
</blockquote>
<br>
Helder,<br>
<br>
I'm not sure that either of these are very useful as they in theory generate ALL pairs for all nodes in the graph and VRP and TSP want a matrix of some defined locations in the graph and not ALL locations in the graph.<br>
<br>
I had the same problem and my solution to this was to create<br>
<br>
<a href="https://github.com/woodbri/osrm-tools" target="_blank">https://github.com/woodbri/<u></u>osrm-tools</a><br>
<br>
which provides some postgresql wrapper functions that call to a local instance of OSRM and creates the distances or tables needed to feed into VRP or TSP. This is much faster than pgrouting path generation, but does not allow for all the flexibility of pgRouting. Also you have the added headache of setting up ORSM.<br>
<br>
The other option that I created was to create a function pgr_vidsToDMatrix()<br>
<br>
This creates and array vetrex ids into a distance matrix.<br>
<br>
<a href="https://github.com/pgRouting/pgrouting/tree/develop/src/common/doc/convenience" target="_blank">https://github.com/pgRouting/<u></u>pgrouting/tree/develop/src/<u></u>common/doc/convenience</a><br>
<br>
-Steve<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</blockquote></div>