<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><span style="font-family:arial,helvetica,sans-serif">Hello,<br></span></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br><span style="font-family:arial,helvetica,sans-serif">> Does the many to many flavor of dijkstra scale up to these numbers?<br><span style="font-family:arial,helvetica,sans-serif"><br></span>as long as you dont go like trying to load a big graph, I think you are ok.<br></span><span style="font-family:arial,helvetica,sans-serif"></span><br><span style="font-family:arial,helvetica,sans-serif"><span style="font-family:arial,helvetica,sans-serif">> Is there a better way to solve this?<span style="font-family:arial,helvetica,sans-serif"><br><br></span></span>If your data (students location & school location) is not a vertex in the routing graph, you can use these:<br><a href="http://docs.pgrouting.org/latest/en/src/withPoints/doc/pgr_withPoints.html#pgr-withpoints">http://docs.pgrouting.org/latest/en/src/withPoints/doc/pgr_withPoints.html#pgr-withpoints</a><br><a href="http://docs.pgrouting.org/latest/en/src/withPoints/doc/pgr_withPointsDD.html#pgr-withpointsdd">http://docs.pgrouting.org/latest/en/src/withPoints/doc/pgr_withPointsDD.html#pgr-withpointsdd</a></span><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><font face="arial,helvetica,sans-serif">You would need to calculate the nearest edge and the fraction that corresponds to it.<br></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><font face="arial,helvetica,sans-serif">There is this function, not part of the release, bacuse it has some issues) but it gives reasonable results.<br><a href="https://github.com/pgRouting/pgrouting/blob/master/src/common/sql/findClosestEdge.sql">https://github.com/pgRouting/pgrouting/blob/master/src/common/sql/findClosestEdge.sql</a><br></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><font face="arial,helvetica,sans-serif">sorry, no documentation on that one<br><br></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><font face="arial,helvetica,sans-serif">I think its a many to many in the dijkstra/withPoints and a many start points on the driving distance.<br></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><font face="arial,helvetica,sans-serif"><br></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><font face="arial,helvetica,sans-serif">regards<br>Vicky<br></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><font face="arial,helvetica,sans-serif"><br></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 14, 2016 at 6:05 PM, Daniel Kastl <span dir="ltr"><<a href="mailto:daniel@georepublic.de" target="_blank">daniel@georepublic.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Brian,<div><br></div><div>I would use the pgr_drivingDistance function starting from your 11 schools (containing the area of your 15.000 students):</div><div><a href="http://docs.pgrouting.org/latest/en/src/driving_distance/doc/pgr_drivingDistance.html#pgr-drivingdistance" target="_blank">http://docs.pgrouting.org/<wbr>latest/en/src/driving_<wbr>distance/doc/pgr_<wbr>drivingDistance.html#pgr-<wbr>drivingdistance</a><br></div><div><br></div><div>Then you get the distance for each point in your network area to each school, and you jut need to select the school with the minimum distance.</div><div><br></div><div>Best regards,</div><div>Daniel</div><div><br></div></div><div class="gmail_extra"><div><div class="gmail-h5"><br><div class="gmail_quote">On Tue, Nov 15, 2016 at 7:08 AM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/14/2016 2:12 AM, Brian DeRocher wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hey there,<br>
<br>
Can someone give me some guidance.  I'm looking for the right<br>
algorithm to use when solving this problem.  I want to find the<br>
distance and shortest path to 11 schools for about 15,000 students.<br>
Does the many to many flavor of dijkstra scale up to these numbers?<br>
Is there a better way to solve this?<br>
</blockquote>
<br>
Hi Brian,<br>
<br>
Checkout<br>
<br>
<a href="http://docs.pgrouting.org/2.2/en/src/dijkstra/doc/pgr_dijkstraCost.html" rel="noreferrer" target="_blank">http://docs.pgrouting.org/2.2/<wbr>en/src/dijkstra/doc/pgr_dijkst<wbr>raCost.html</a><br>
<br>
It has a many to one function.<br>
<br>
Regarding performance, that depends on a lot of issues but I would think if your limiting your edge table to the roads in the school district that you should get reason able performance.<br>
<br>
You might want to try running it with 10, 100, 1,000, 15,000 so you have some idea of the performance at various numbers of nodes.<br>
<br>
you will need to map the locations to the node ids in the network, then pass the node ids to the function.<br>
<br>
Ask if you need more explicit help.<br>
<br>
-Steve W<br>
<br>
---<br>
This email has been checked for viruses by Avast antivirus software.<br>
<a href="https://www.avast.com/antivirus" rel="noreferrer" target="_blank">https://www.avast.com/antiviru<wbr>s</a><br>
<br>
______________________________<wbr>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.or<wbr>g</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman<wbr>/listinfo/pgrouting-users</a></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="gmail-HOEnZb"><font color="#888888">-- <br><div class="gmail-m_4090058159665616541gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@<wbr>georepublic.de</a><br>Web: <a href="https://georepublic.info" target="_blank">https://georepublic.info</a></span><div><br></div><div><br></div><div><br></div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.<wbr>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/pgrouting-<wbr>users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><pre>Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@<a href="http://georepublic.de" target="_blank">georepublic.de</a>
Web: <a href="https://georepublic.info" target="_blank">https://georepublic.info</a>

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

<span></span></pre></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>