<br><br><div class="gmail_quote">On Fri, Jun 17, 2011 at 10:23 AM, Daniel Kastl <span dir="ltr"><<a href="mailto:daniel@georepublic.de">daniel@georepublic.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Jay,<div><br></div><div>I think your proposed idea is good.</div><div>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.</div>
<div><br></div><div>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. </div>
<div>For demonstration purpose this has some stronger impact because it makes sure, that such a road will not be selected.</div><div>So in your example you could set some speed to "0%" if I understand you right.</div>
</blockquote><div><br>Hi Daniel,<br><br>Thanks for the input. I will keep this in mind while generating the test data.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><br></div><div>Daniel</div><div><br></div><div><div><div></div><div class="h5"><br><div class="gmail_quote">2011/6/17 Jay Mahadeokar <span dir="ltr"><<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br><br>Here is an interesting look into the data in ways table:<br><br>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;<br>
<br> avg | min | max | count | class_id <br>------+------+-------+-------+----------<br> 5320 | 250 | 12163 | 21 | 101<br> 2135 | 1885 | 2385 | 2 | 111<br> 1970 | 396 | 5168 | 17 | 102<br>
1343 | 10 | 27485 | 234 | 106<br> 1115 | 33 | 7964 | 221 | 108<br> 1037 | 14 | 20020 | 248 | 109<br> 938 | 9 | 23142 | 2761 | 110<br> 837 | 21 | 2212 | 43 | 100<br> 626 | 8 | 3327 | 90 | 112<br>
619 | 26 | 9089 | 252 | 119<br> 486 | 123 | 1618 | 11 | 117<br> 473 | 7 | 16582 | 1259 | 114<br> 364 | 97 | 1578 | 45 | 122<br> 260 | 4 | 718 | 109 | 401<br>(14 rows)<br>
<br>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.<br><br>class_id = (106,108,109,110,100) as Type II (minor_highways) which be comparatively less populated.<br>
<br>class_id = (112,119,117,114,122,401) as Type III (streets) which will have least traffic.<br><br>We want to have model such that during traffic hours the shortest path should go through streets.<br><br>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.<br>
<br><br>
        
        
        
        
        
        
<table rules="NONE" cols="4" frame="VOID" border="0" cellspacing="0">
        <colgroup><col width="98"><col width="108"><col width="113"><col width="115"></colgroup>
        <tbody>
                <tr>
                        <td width="98" height="19" align="JUSTIFY">Time Interval</td>
                        <td width="108" align="CENTER">Speed for Type I</td>
                        <td width="113" align="CENTER">Speed for Type II</td>
                        <td width="115" align="CENTER">Speed for Type III</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY"><br></td>
                        <td align="CENTER"><br></td>
                        <td align="CENTER"><br></td>
                        <td align="CENTER"><br></td>
                </tr>
                <tr>
                        <td height="36" align="JUSTIFY">10 PM 6 AM</td>
                        <td align="CENTER">100</td>
                        <td align="CENTER">100</td>
                        <td align="CENTER">100</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY">6 AM 7 AM</td>
                        <td align="CENTER">95</td>
                        <td align="CENTER">90</td>
                        <td align="CENTER">100</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY">7 AM 8 AM</td>
                        <td align="CENTER">80</td>
                        <td align="CENTER">75</td>
                        <td align="CENTER">90</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY">8 AM 9 AM</td>
                        <td align="CENTER">50</td>
                        <td align="CENTER">45</td>
                        <td align="CENTER">85</td>
                </tr>
                <tr>
                        <td height="36" align="JUSTIFY">9 AM 10 AM</td>
                        <td align="CENTER">60</td>
                        <td align="CENTER">55</td>
                        <td align="CENTER">85</td>
                </tr>
                <tr>
                        <td height="36" align="JUSTIFY">10 AM 11 AM</td>
                        <td align="CENTER">90</td>
                        <td align="CENTER">85</td>
                        <td align="CENTER">95</td>
                </tr>
                <tr>
                        <td height="36" align="JUSTIFY">11 AM 5 PM</td>
                        <td align="CENTER">100</td>
                        <td align="CENTER">100</td>
                        <td align="CENTER">100</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY">5 PM 6 PM</td>
                        <td align="CENTER">90</td>
                        <td align="CENTER">85</td>
                        <td align="CENTER">95</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY">6 PM 7 PM</td>
                        <td align="CENTER">75</td>
                        <td align="CENTER">70</td>
                        <td align="CENTER">90</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY">7 PM 8 PM</td>
                        <td align="CENTER">50</td>
                        <td align="CENTER">45</td>
                        <td align="CENTER">85</td>
                </tr>
                <tr>
                        <td height="19" align="JUSTIFY">8 PM 9 PM</td>
                        <td align="CENTER">60</td>
                        <td align="CENTER">55</td>
                        <td align="CENTER">85</td>
                </tr>
                <tr>
                        <td height="36" align="JUSTIFY">9 PM 10 PM<br></td>
                        <td align="CENTER">95</td>
                        <td align="CENTER">90</td>
                        <td align="CENTER">95</td>
                </tr>
        </tbody>
</table>
<br><br>Any feedback is welcome.<br><br>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.<br><br></blockquote></div><br></div></div>-- <br><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@georepublic.de</a><br>
Web: <a href="http://georepublic.de/" style="color: rgb(66, 99, 171);" target="_blank">http://georepublic.de</a></span><br>
</div>
<br>_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>-Jay Mahadeokar<br><br>