[pgrouting-users] TRSP - Bug with rules referring to the starting edge.

Fabien Ancelin fabien.ancelin at gmail.com
Wed Feb 26 07:42:36 PST 2014

Hello all,

There is I suspect another bug in TRSP algorithm that occurs in the file
GraphDefinition.cpp, at line 299.

The issue appears when the start location for routing passed from
PostgreSQL is a position on a segment, and this position is different from
0 or 1 (For example Edge 200, Position 0.5). In that case, the starting
edge gets split. Because of that all the elements in the rule table
referencing to the starting segment need to be updated.

There are several things that caught my attention :

   - The code in order to update the rule and replace the reference to the
   starting segment is activated only if there 1 one segment in the precedence
   list (line 299). The rule could very well have a reference to the starting
   segment and a precedence list with more than 1 element.
   - The logic to update the rule assumes that the starting segment will
   always be the last element in the precedence list. That is not a right
   - Even when we do attempt to update the rule, the code logic seems
   puzzling (line 301). The reference to the starting segment is removed, and
   we insert the edges created from the split into the precedence list,
   without checking the connection with the previous segment in the precedent

Is that issues that you are aware of or planning to fix? Would you need
help to fix those bugs?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20140226/94da101d/attachment.html>

More information about the Pgrouting-users mailing list