Hi,<br><br>Weekly Report #3: (Also available at [1])<br>Date - 10th June 2011<br><br>According to project plan [2]:<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 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">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,<br><br><div class="gmail_quote">On Fri, Jun 3, 2011 at 10:40 PM, Jay Mahadeokar <span dir="ltr"><<a href="mailto:jai.mahadeokar@gmail.com">jai.mahadeokar@gmail.com</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,<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 "rush hour" 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>-- <br>Regards,<br>-Jay Mahadeokar<br>II Year, MTech,<br>CSE, IIT Kanpur.<br>