<font size="2"><font face="tahoma,sans-serif">Steve,</font></font><div><font size="2"><font face="tahoma,sans-serif"><br></font></font></div><div><font size="2"><font face="tahoma,sans-serif">To trick the algorithm can&#39;t we switch reverse_cost and cost values in driving directions ? I think that if driving directions can output a connected road network that will both cover your 5 min roads to </font></font>store and fire-station reachability. Am I wrong about this ?</div>

<div><font size="2"><font face="tahoma,sans-serif"><br clear="all"></font></font>/emre<br>
<br><br><div class="gmail_quote">On Fri, Jan 14, 2011 at 8:01 AM, Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On 1/13/2011 10:15 PM, Daniel Kastl wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
2011/1/14 Stephen Woodbridge &lt;<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a><br></div>
&lt;mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>&gt;&gt;<div><div></div><div class="h5"><br>
<br>
    On 1/13/2011 3:18 AM, Emre Koc wrote:<br>
<br>
        Hello,<br>
<br>
        I am intereted in using TSP functions of pgRouting but I<br>
        couldn&#39;t find<br>
        any tutorial or documentation on it. Does anyone have a<br>
        documentation<br>
        for TSP functions ? I am using Dijkstra with a custom query. Is it<br>
        possible to use TSP with custom query?<br>
<br>
        Also I want to extend pgRouting functionality by calculating a<br>
        distance<br>
        network from a point or towards a point. How can I integrate my<br>
        source<br>
        to pgRouting ?<br>
<br>
<br>
    Yes, I asked for this functionality also. I did a little research<br>
    into how to do this. I seems that in boost you need to reverse the<br>
    graph. We already build the graph but would need to then add a step<br>
    to reverse it to change the sense of direction. I think this is the<br>
    function that is needed:<br>
    <a href="http://www.systomath.com/include/Boost-1_35/libs/graph/doc/reverse_graph.html" target="_blank">http://www.systomath.com/include/Boost-1_35/libs/graph/doc/reverse_graph.html</a><br>
<br>
<br>
Maybe someone wants to add an RFC for that<br>
(<a href="http://www.pgrouting.org/rfc/index.html" target="_blank">http://www.pgrouting.org/rfc/index.html</a>).<br>
Soon there will be GSoC and students will be looking for project ideas.<br>
<br>
Recently &quot;SRC&quot; (don&#39;t know the real name) wrote some bidirectional patch<br>
for pgRouting. I applied the patch to my fork at GitHub called &quot;Two-Way<br>
A-Star&quot;: <a href="https://github.com/dkastl/pgrouting" target="_blank">https://github.com/dkastl/pgrouting</a><br>
Is this somehow related?<br>
</div></div></blockquote>
<br>
Daniel,<br>
<br>
This might apply to this problem, but I have not looked at what he did or how it is implemented. On an undirected graph routing from A-&gt;B is the same as B-&gt;A, on a directed graph this does not have to be the case.<br>


<br>
For bi-directional routing on a directed graph, you need to reverse the graph or otherwise trick the algorithm when it is routing FROM the destination toward the start. At the destination you need to ask what node could I have come FROM to get here, but at the start you have to ask what nodes can I go TO from here. So you need a graph and a reverse graph or you need to maintain enough a list of outgoing nodes AND a separate list of incoming nodes.<br>


<br>
For drive time analysis, you might want to compute what is the area covered by consumers that are willing to drive 20 min to get to my store located &quot;here&quot;. So &quot;here&quot; is the destination. But if you are a municipal planner, you might want to know what coverage area do my fire-stations have with a drive time of 5 mins or 10 mins. In this case the fire-station is the start point.<br>


<br>
For undirected graphs, there is no difference.<br>
<br>
-Steve<div><div></div><div class="h5"><br>
_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
</div></div></blockquote></div><br></div>