[pgrouting-users] pgrouting and road traffic congestion
Stephen Woodbridge
woodbri at swoodbridge.com
Fri Mar 1 05:40:40 PST 2013
Daniel's suggestion is good.
Here is how you want to think about the problem:
1. you have a bunch of segments
2. you have average speed based on traffic at different times of the day
for various segments
3. when you request a route, you specify a time
4. then when you select your segments and costs you factor in the
average times
You might not have average times for all segments based on traffic info
so consider this query or one like it:
select coalesce(b.speed, a.speed), a.the_geom
from streets a left outer join traffic b on a.gid=b.gid
where mytime between b.time1 and b.time2
So this query assume you have a segments table with a column "speed" and
the "traffic" something like:
id, gid, time1, time2, speed
If you have a speed in the traffic table it will get used otherwise you
will use the default time associated with the segment. If you have
historical average speed data then the traffic table can be static, or
if you want some that routes based on current information and you have
access to real-time traffic sensor speed data that can be feed
dynamically into the traffic data and the system works either way.
I have done both of these for different clients in the past.
-Steve W
On 3/1/2013 2:34 AM, Daniel Kastl wrote:
> Time-dependent shortest path might be what you're looking for:
> https://github.com/pgRouting/pgrouting/wiki/Time-dependent---Dynamic-Shortest-Path
>
> Daniel
>
>
> On Fri, Mar 1, 2013 at 12:27 PM, Muhammad Iqnaul Haq
> <iqnaulhaq at gmail.com <mailto:iqnaulhaq at gmail.com>> wrote:
>
> Hello all
>
> I'm working on my project proposal, I want to make an alternative
> route where there was an traffic congestion/traffic jam in several
> road at different time. For example at 7 am the traffic congestion
> in Road A is very high(bad), the drivers may choose their
> destination and the application built with pgrouting will show
> another faster/shortest route to avoid the traffic.
>
> Is there any suggestion or any kind of application that has been
> made similar with my idea?
>
> thanks for your attention
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org <mailto:Pgrouting-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>
>
>
> --
> Georepublic UG & Georepublic Japan
> eMail: daniel.kastl at georepublic.de <mailto:daniel.kastl at georepublic.de>
> Web: http://georepublic.de <http://georepublic.de/>
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
More information about the Pgrouting-users
mailing list