Hi,<br><br>Weekly Report #8<br>Date - 22nd July 2011<br><br>Current Progress<br>--------------------------------------------------------------------------------------------------------------------------------------------<br>
Last week we discussed what data wrappers will be needed for retrieving time dependent data into format expected by the tdsp function. The tdsp function expects time dependent data with start time as 0 and everything offset from start time. So, for different data formats wrapper functionality will be needed which will convert the data into above format taking care of cyclic nature of data etc [1].<br>
<br>We finally decided that wrapper functions in form of plsql arguments will be best way to implement the above functionality. So, I have learned and written corresponding plsql function for the time dependent data format which was used for testing the core tdsp function. The code is updated in the gsoc-tdsp branch [2].<br>
<br>I have also modified the tdsp.h, tdsp.c and weight_map.hpp files so that the end_times are also taken care of, which I had missed in earlier code.<br><br>Next Weeks Goals<br>---------------------------------------------------------------------------------------------------------------------------------------------<br>
Discuss the most common data formats that may be used with the community and write plsql wrapper functions for them.<br>Keep testing the core algorithm with more varied data.<br>Start looking at the documentation that must be done.<br>
<br>[1] <a href="http://lists.osgeo.org/pipermail/pgrouting-dev/2011-July/000371.html">http://lists.osgeo.org/pipermail/pgrouting-dev/2011-July/000371.html</a><br>[2] <a href="https://github.com/pgRouting/pgrouting/blob/gsoc-tdsp/extra/tdsp/sql/tdsp_data_wrappers.sql">https://github.com/pgRouting/pgrouting/blob/gsoc-tdsp/extra/tdsp/sql/tdsp_data_wrappers.sql</a><br>
<br><div class="gmail_quote">On Fri, Jul 15, 2011 at 5:55 PM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com">jai.mahadeokar@gmail.com</a>&gt;</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,<br><br>Weekly Report #7<br>Date - 15th July 2011<br><br>Current Progress<br>------------------------------------------------------------------------------------------------------------------------------------------<br>

Last week I analysed the tasks done and things that need to be done. Discussed the same with my mentor.<br>Also polished the code and documentation already done.<br><br>Next weeks goals<br>------------------------------------------------------------------------------------------------------------------------------------------<br>

Come up with more relevant data and test cases that will test the algorithm implementation thoroughly.<br><br>Regards,<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Jul 8, 2011 at 8:00 PM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>&gt;</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,<br><br>Weekly Report #6<br>Date - 8th July 2011<br><br>According to project plan<br>----------------------------------------------------------------------------------------------------------------------------------------<br>


July 7th<br>Implement the basic tdsp query and test it using test data.<br><br>Current Progress:<br>----------------------------------------------------------------------------------------------------------------------------------------<br>


<br>I have coded the functions to retrieve data from time_dep_costs 
table and it is presented to the core tdsp algorithm along with the data
 from ways table. The query seems to be working nicely for now.<br><br>
I have documented the design details [1] and written an example tutorial
 [2] to try out the time_dependent_shortest_path algorithm. I guess this
 is enough to show the functionality, although, the data and examples 
along with the wrapper functions need to be worked on in next few weeks.
 <br><br>Any feedback/corrections are welcome.<br><br><br>[1] <a href="https://github.com/pgRouting/pgrouting/wiki/TDSP-Details" target="_blank">https://github.com/pgRouting/pgrouting/wiki/TDSP-Details</a><br>[2] <a href="https://github.com/pgRouting/pgrouting/wiki/TDSP-Tutorial-and-Example" target="_blank">https://github.com/pgRouting/pgrouting/wiki/TDSP-Tutorial-and-Example</a><div>

<div></div><div><br>
<br><br><div class="gmail_quote">On Fri, Jul 1, 2011 at 2:28 PM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>&gt;</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,<div><br></div><div>Weekly Report #5</div><div>Date - 1st July 2011</div><div><br></div><div>According to project plan [1]</div><div>----------------------------------------------------------------------------------------------------------------------------------</div>


<div>
<div>July 5th<br>Implement queries needed for edge data and time dependent data from database.<br>Integrate the core algorithm and all components with CMAKE scripts.<br><br></div></div><div>Current progress</div><div>----------------------------------------------------------------------------------------------------------------------------------</div>



<div>The core time dependent function was ready, and the postgresql query with static time data was working last week,</div><div><br></div><div>I wrote c functions that will extract the attributes of the time dependent cost table, and then accordingly extract the corresponding tuples into array of weightMap elements. These are then presented to the core tdsp function along with edges array. The tuples are correctly extracted as of now. But, there is some problem when the core function is called. I will try and resolve the issues next week.</div>



<div><br></div><div>[1] <a href="https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan" target="_blank">https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan</a></div><div><div><div></div>


<div><br><div class="gmail_quote">
On Fri, Jun 24, 2011 at 6:47 AM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>&gt;</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,<br><br>Weekly Report #5:<br>Date - 24th June 2011<div><br><br>According to project plan [2]<br>-----------------------------------------------------------------------------------------------------------------------------------------<br>






<br></div>June 25th<br><div>Implement modules needed for retrieving the time-dependent costs.<br>July 5th<br>Implement queries needed for edge data and time dependent data from database.<br>Integrate the core algorithm and all components with CMAKE scripts.<br>





</div><br>Current Progress<br>-----------------------------------------------------------------------------------------------------------------------------------------<br>I have corrected the bug which was resulting in wrong results for non-integer data in core tdsp algorithm. Apparently there was a problem in the binary_heap implementation, but now it seems to be working fine.<br>





<br> I have juggled the ordering of the tasks a bit. I implemented the queries for retrieving the edge data from database, and also wrote the postgres C procedure that extracts the data from ways table, generates the boost graph and presents it to the time dependent algorithm. The weight map is generated such that cost is same for all times, which is the case for static data and that is also fed to the core algorithm. The query returns set of path results and the results are exactly matching with the pgRouting shortest_path() query.  Please find the updated code in gsoc-tdsp branch of pgRouting github repository [1].<br>





<br>Next weeks goals:<br>-----------------------------------------------------------------------------------------------------------------------------------------<br>The next step will now be to implement modules for retrieving the data 
from time_dep_costs table and generate the time dependent weight map 
which will be fed to the core algo instead of the static one. <br><br>[1] <a href="https://github.com/pgRouting/pgrouting/tree/gsoc-tdsp" target="_blank">https://github.com/pgRouting/pgrouting/tree/gsoc-tdsp</a><div>
<br>[2] <a href="https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan" target="_blank">https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan</a><br>

<br></div><div><div></div><div><div class="gmail_quote">On Sat, Jun 18, 2011 at 7:48 AM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>&gt;</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,<br><br>Weekly Report #4:<br>Date - 18th June 2011<div><br><br>According to project plan [2]<br>-----------------------------------------------------------------------------------------------------------------------------------------<br>






</div><div><div>
Finish the design of project, and the core-time dependent shortest path 
implementation and test the code with dummy data till 15 June.<br></div>Implement modules needed for retrieving the time-dependent costs till June 25th. <br></div></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">





<div></div><br><br>------------------------------------------------------------------------------------------------------------------------------------------<br>
Current Progress:<br><br>Implementation of core-time dependent dijkstra has been done. <br>I have run across a bug when dealing with non-integer time-dependent data, I am working on it.<br>I discussed ways of generating the time-dependent data in pgrouting dev list [1].<br>






Accordingly  have written plpgsql function that generates test data [3].<br>Many modifications and test instances can be generated as discussed in [1].<br><br>------------------------------------------------------------------------------------------------------------------------------------<br>






Next week goals:<br>Fix the bug in dealing with non-integer data.<br>Start working on writing function that will retrieve time-dependent data from database.<br>Also start working main tdsp-plsql function(the actual query that will be exposed).<br>






<br>[1] <a href="http://lists.osgeo.org/pipermail/pgrouting-dev/2011-June/000300.html" target="_blank">http://lists.osgeo.org/pipermail/pgrouting-dev/2011-June/000300.html</a><div><br>[2] <a href="https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan" target="_blank">https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan</a><br>





</div>
[3] <a href="https://github.com/pgRouting/pgrouting/blob/gsoc-tdsp/extra/tdsp/sql/data_generate_tdsp.sql" target="_blank">https://github.com/pgRouting/pgrouting/blob/gsoc-tdsp/extra/tdsp/sql/data_generate_tdsp.sql</a><div>





<div></div><div><br><br><br><div class="gmail_quote">
On Fri, Jun 10, 2011 at 10:58 PM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>&gt;</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,<br><br>Weekly Report #3:  (Also available at [1])<br>Date - 10th June 2011<br><br>According to project plan [2]:<div><br>-----------------------------------------------------------------------------------------------------------------------------------------<br>







Finish the design of project, and the core-time dependent shortest path implementation and test the code with dummy data till 15 June.<br><br><br>Current Progress:<br>------------------------------------------------------------------------------------------------------------------------------------------<br>






</div>
I had coded and tested the core-tdsp algorithm such that it returns the distance-map and predecessor-map for given source.<br>This week I wrote a wrapper function which does the following task:<br>- Takes edges, weight_map_elements, source and target vertices as parameters.<br>







- Generates boost adjacency graph, weight_map and passes it to the tdsp_core function.<br>- tdsp_core returns the distance_map and predecessor_map corresponding to source.<br>- The wrapper function now generates the path from source to destination, and returns path_elements as result.<br>







<br><br>I tested this for different source-destination pairs and it seems to be working for now. Bugs need to be discovered with more<br>rigorous testing and fixed in coming weeks.<br><br><br>------------------------------------------------------------------------------------------------------------------------------------<br>







Next week goals:<br>Finalize the prototype for the postgreSQL query for tdsp. <br>How to formulate the query for retrieving data from the timeDependentCost table (used to generate the weight_map) is still under debate<br>







on pgRouting mailing list. We are considering various options like letting the user provide the query, or form the query ourselves<br>and the pros and cons of both approaches.<br><br>We hope to find a viable solution for the same asap and start working towards implementing the same.<br>







<br>[1]<a href="https://github.com/jay-mahadeokar/GSoc-2011-Project-Docs/blob/master/weekly-reports/10-Jun-2011" target="_blank">https://github.com/jay-mahadeokar/GSoc-2011-Project-Docs/blob/master/weekly-reports/10-Jun-2011</a><br>






[2]<a href="https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan" target="_blank">https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan</a><br>
<br>Regards,<div><div></div><div><br><br><div class="gmail_quote">On Fri, Jun 3, 2011 at 10:40 PM, Jay Mahadeokar <span dir="ltr">&lt;<a href="mailto:jai.mahadeokar@gmail.com" target="_blank">jai.mahadeokar@gmail.com</a>&gt;</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,<br><br>Here is my weekly report #2. Also available at [1].<br>Date - 3rd June 2011<br><br>According to tentative project plan [3]:<br>-----------------------------------------------------------------------------------------------------------------------------------------<br>








Finish the design of project, and the core-time dependent shortest path implementation and test the code with dummy data till 15 June.<br><br><br>Current Progress:<br>------------------------------------------------------------------------------------------------------------------------------------------<br>








I had implemented initial draft of the core time-dependent algorithm in 1st week. I fixed a few bugs that were there in the initial draft.<br><br>Organised the code into different header files - binary_heap.h, weight_map.h, edge_wrapper.h.<br>








<br>Added a boost - dijkstra test function which calls boost::dijkstra_shortest_paths() so as to verify the result.<br>Also, wrote a graph generator which can generate random graphs according to the parameters specified:<br>








- number of vertices<br>- maximum outdegree of a vertex (I keep this 6 or 8 , since 6 is degree limit for planar graphs)<br>- Number of time windows and the range of time windows.<br><br>So, to see if the result returned by tdsp-dijkstra function is correct,  I generated random graphs with time window 1, which starts from 0, meaning that the same travel time will be there for any given start time. This is basically static dijkstra.<br>








<br>I compared the results returned by tdsp-dijkstra and boost-dijkstra and I am getting same output. Tried for graphs with 20,100,500,1000 nodes with max outdegree 8. (generating graphs with nodes more than that was taking too much time and my CPU was getting overworked!)<br>








<br>Only difference in boost-output and tdsp-output comes when there are more than one shortest paths of same length. The there might be difference of predecessors. I guess that is because of different implementations of priority queue (binary_heap in my case).<br>








<br>I have updated the code in gsoc-tdsp branch: [2]. Please review, any comments are welcome.<br><br>Also, the actual time-dependent functionality i.e multiple time windows needs to be tested for real world large graphs. To do this, we are planning to generate time dependent data ourselves corresponding to the static data available in pgRouting-workshop database, since such data is not freely available as far as our knowledge.<br>








<br>Some of the options for this data generation (according to discussions in pgrouting-dev list)are:<br><br>- Generate random data (That would take most extreme test cases into account)<br>- If we think about &quot;rush hour&quot; around a major city, the highways (based on road class) flowing into the city in the morning would get reduced average speeds you could apply curve like average speed*percent based on 6am (90%), 7am(75%), 8am(45%), 9am(50%), 10am(85%) and do something similar in the evening rush. It might be too hard to figure on direction of flow in/out bound so apply the curve to all traffic. The assumption is that the highways are congested which will force traffic onto side streets. We can also reduce the lower class speeds by say a constant 80% during rush hour.<br>








<br><br><br>------------------------------------------------------------------------------------------------------------------------------------<br>Next week goals:<br><br>* Generate the time-dependent data corresponding to the data in pgRouting-workshop as planned above.<br>








* Start working on writing postgreSQL C function that will call the core-time dependent function.<br>* Keep testing the core function, find bugs if any, and fix them.<br clear="all"><br>[1] <a href="https://github.com/pgRouting/pgrouting/wiki/Time-dependent---Dynamic-Shortest-Path" target="_blank">https://github.com/pgRouting/pgrouting/wiki/Time-dependent---Dynamic-Shortest-Path</a><br>








[2] <a href="https://github.com/pgRouting/pgrouting/tree/gsoc-tdsp" target="_blank">https://github.com/pgRouting/pgrouting/tree/gsoc-tdsp</a><br>[3] <a href="https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan" target="_blank">https://github.com/pgRouting/pgrouting/wiki/TDSP-Tentative-Project-Plan</a><br>








-- <br>Regards,<br><font color="#888888">-Jay Mahadeokar<br><br>
</font></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>Regards,<br>-Jay Mahadeokar<br>II Year, MTech,<br>CSE, IIT Kanpur.<br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>Regards,<br><font color="#888888">-Jay Mahadeokar<br><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>Regards,<br><font color="#888888">-Jay Mahadeokar<br><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>Regards,<br>-Jay Mahadeokar<br><br>
</div>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>Regards,<br><font color="#888888">-Jay Mahadeokar<br><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>Regards,<br><font color="#888888">-Jay Mahadeokar<br><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>-Jay Mahadeokar<br><br>