[pgrouting-users] dijkstra for MANY sources

Vicky Vergara vicky at georepublic.de
Mon Nov 14 20:42:26 PST 2016


Hello,

> Does the many to many flavor of dijkstra scale up to these numbers?

as long as you dont go like trying to load a big graph, I think you are ok.

> Is there a better way to solve this?

If your data (students location & school location) is not a vertex in the
routing graph, you can use these:
http://docs.pgrouting.org/latest/en/src/withPoints/doc/pgr_withPoints.html#pgr-withpoints
http://docs.pgrouting.org/latest/en/src/withPoints/doc/pgr_withPointsDD.html#pgr-withpointsdd
You would need to calculate the nearest edge and the fraction that
corresponds to it.
There is this function, not part of the release, bacuse it has some issues)
but it gives reasonable results.
https://github.com/pgRouting/pgrouting/blob/master/src/common/sql/findClosestEdge.sql
sorry, no documentation on that one

I think its a many to many in the dijkstra/withPoints and a many start
points on the driving distance.

regards
Vicky



On Mon, Nov 14, 2016 at 6:05 PM, Daniel Kastl <daniel at georepublic.de> wrote:

> Hi Brian,
>
> I would use the pgr_drivingDistance function starting from your 11 schools
> (containing the area of your 15.000 students):
> http://docs.pgrouting.org/latest/en/src/driving_distance/doc/pgr_
> drivingDistance.html#pgr-drivingdistance
>
> 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.
>
> Best regards,
> Daniel
>
>
> On Tue, Nov 15, 2016 at 7:08 AM, Stephen Woodbridge <
> woodbri at swoodbridge.com> wrote:
>
>> On 11/14/2016 2:12 AM, Brian DeRocher wrote:
>>
>>> Hey there,
>>>
>>> Can someone give me some guidance.  I'm looking for the right
>>> algorithm to use when solving this problem.  I want to find the
>>> distance and shortest path to 11 schools for about 15,000 students.
>>> Does the many to many flavor of dijkstra scale up to these numbers?
>>> Is there a better way to solve this?
>>>
>>
>> Hi Brian,
>>
>> Checkout
>>
>> http://docs.pgrouting.org/2.2/en/src/dijkstra/doc/pgr_dijkstraCost.html
>>
>> It has a many to one function.
>>
>> 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.
>>
>> 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.
>>
>> you will need to map the locations to the node ids in the network, then
>> pass the node ids to the function.
>>
>> Ask if you need more explicit help.
>>
>> -Steve W
>>
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> https://www.avast.com/antivirus
>>
>> _______________________________________________
>> 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: https://georepublic.info
>
>
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>



-- 

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44,
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky at georepublic.de
Web: https://georepublic.info

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

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20161114/e1ff64f6/attachment.html>


More information about the Pgrouting-users mailing list