[pgrouting-dev] Support for Time Constraints

Jay Mahadeokar jai.mahadeokar at gmail.com
Fri Jun 17 06:01:30 EDT 2011


On Fri, Jun 17, 2011 at 10:23 AM, Daniel Kastl <daniel at georepublic.de>wrote:

> Hi Jay,
>
> I think your proposed idea is good.
> It usually happens that later modifications are required, but as long as
> you document what you did and it's possible to recreate such a sample data
> in the same manner, it's fine.
>
> It's probably more difficult to see the influence of time dependent cost,
> when you just increase or decrease the cost for a certain time interval. So
> I would also block some road class completely during a certain time, so that
> it will not be allowed to travel on those road segments at that time
> interval.
> For demonstration purpose this has some stronger impact because it makes
> sure, that such a road will not be selected.
> So in your example you could set some speed to "0%" if I understand you
> right.
>

Hi Daniel,

Thanks for the input. I will keep this in mind while generating the test
data.


>
> Daniel
>
>
> 2011/6/17 Jay Mahadeokar <jai.mahadeokar at gmail.com>
>
>> Hi,
>>
>> Here is an interesting look into the data in ways table:
>>
>> pgrouting-workshop=# select round(avg(length)*10000) as avg,
>> round(min(length)*10000) as min, round(max(length)*10000) as max,count(*) as
>> count, class_id from ways group by class_id order by avg desc;
>>
>>  avg  | min  |  max  | count | class_id
>> ------+------+-------+-------+----------
>>  5320 |  250 | 12163 |    21 |      101
>>  2135 | 1885 |  2385 |     2 |      111
>>  1970 |  396 |  5168 |    17 |      102
>>  1343 |   10 | 27485 |   234 |      106
>>  1115 |   33 |  7964 |   221 |      108
>>  1037 |   14 | 20020 |   248 |      109
>>   938 |    9 | 23142 |  2761 |      110
>>   837 |   21 |  2212 |    43 |      100
>>   626 |    8 |  3327 |    90 |      112
>>   619 |   26 |  9089 |   252 |      119
>>   486 |  123 |  1618 |    11 |      117
>>   473 |    7 | 16582 |  1259 |      114
>>   364 |   97 |  1578 |    45 |      122
>>   260 |    4 |   718 |   109 |      401
>> (14 rows)
>>
>> So, I am going by the average length figure and considering class_id =
>> (1001,111,102) as Type I (major_highways), which will be affected most by
>> the traffic.
>>
>> class_id = (106,108,109,110,100) as Type II (minor_highways) which be
>> comparatively less populated.
>>
>> class_id = (112,119,117,114,122,401) as Type III (streets) which will have
>> least traffic.
>>
>> We want to have model such that during traffic hours the shortest path
>> should go through streets.
>>
>> So, I am dividing day into following intervals, hope it sounds reasonable.
>> I will write the corresponding plsql function that will generate the data
>> accordingly. Note that the speed is in percentage of average speed. Since,
>> we want to deal with time, we can effectively increase the lengths of the
>> edges by same factor and assume speed as constant.
>>
>>
>>   Time Interval Speed for Type I Speed for Type II Speed for Type III
>>
>>
>>
>>  10 PM – 6 AM 100 100 100  6 AM – 7 AM 95 90 100  7 AM – 8 AM 80 75 90  8
>> AM – 9 AM 50 45 85  9 AM – 10 AM 60 55 85  10 AM – 11 AM 90 85 95  11 AM
>> – 5 PM 100 100 100  5 PM – 6 PM 90 85 95  6 PM – 7 PM 75 70 90  7 PM – 8
>> PM 50 45 85  8 PM – 9 PM 60 55 85  9 PM – 10 PM
>> 95 90 95
>>
>> Any feedback is welcome.
>>
>> I am currently stuck with a bug in the core time-dependent function, there
>> seems to be a problem with non-integer data. Will try and fix that soon.
>>
>>
> --
> Georepublic UG & Georepublic Japan
> eMail: daniel.kastl at georepublic.de
> Web: http://georepublic.de
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
>


-- 
Regards,
-Jay Mahadeokar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20110617/f86b9e13/attachment.html


More information about the pgrouting-dev mailing list