-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Discussion on coding turn restrictions using Boost #610
Comments
I like the term "turn-penalties". I prefer to use |
Family of functions: using acronymsTRSPpgr_TRSP(one to one, one to many, many to one, many to many) TRSPWithPointspgr_TRSPWithPoints(one to one, one to many, many to one, many to many) Not using acronyms (this is my preference)turnRestrictedpgr_turnRestricted(one to one, one to many, many to one, many to many) turnRestrictedWithPointspgr_turnRestrictedWithPoints(one to one, one to many, many to one, many to many) |
On 7/8/2016 9:38 PM, Daniel Kastl wrote:
The issue here has more to do with how the code is implemented. We use So until we understand how we want to build the graph and process it and This email has been checked for viruses by Avast antivirus software. |
-1 on the internal sql query cost & reverse_cost the corresponding (source, target), (target, source) edge is not inserted. (for one way) |
Don't take my comment as how you should implement it ;-) |
"no u-turn" |
currently there is this way of representing "saving restrictions" in sample data
and when passed as a parameter to pgr_TRSP
What would be the wish list for storing the restrictions so its easy to understand/use? |
I would say:
Thoughts? |
(rid, to_cost, target_id, from_edge, via_path) (1, 0,7,4, {1,2,3}) <--- this 7,4, {1,2,3} without looking at the documentation can you explain what it means? |
The definition of a restriction is:
For simple restrictions, via_path is NULL as the whole restriction can be defined using target_id and from_edge. For more complex restrictions, you need to define a path of multiple edges that represent the restriction. |
We have the following pages in the wiki related to turn restrictions:
Also the sample data was originally designed for test various simple and complex restrictions. |
Basically, our restriction model is identical to the OSM model: |
Here are some references to various papers discussing turn restriction implementation: |
Here is the link of the current user's documentation: |
@sankepallyrohithreddy |
I will leave the explaination to @sankepallyrohithreddy but will note that for this restriction:
that regardless of the meaning, that the "effect" will be nothing because even if the restriction is triggered, the 0 cost would be the same as if it were not triggered. |
Upon reading through, what I understand is
please correct me if I am wrong. |
@sankepallyrohithreddy so what is the path that is being restricted? ie: what is the sequence of edge ids in the path that is the restriction? |
I'll rephrase the question. for the current implementation what is the meaning of all of this: |
@sankepallyrohithreddy |
I think I misunderstood the definiton of via_edges. I think it is a sequence of edges which connects the from_edge and the target_edge. I would like to explain the following restriction from_edge: v4-----e3------>v3 So now when we want to reach from v4 to v5 through the via_path the to_cost applied would be 4. please correct me if I am wrong. |
(rid, to_cost, target_id, from_edge, via_path) so the restriction is you want to go to 8 via 3 and 5. |
(rid, to_cost, target_id, from_edge, via_path) |
Here is an interesting ticket from OSRM regarding restrictions and CH. |
The current pgr_trsp function does not use Boost in its underlying implementation, in part because Boost Graph does not support it natively. There has been some discussion about re-implementing the pgr_trsp like functionality using Boost Graph. I'm opening this issue to collect ideas and references regarding this.
There are also two terms that I have come across in this research "turn-penalties" and "turn-restrictions". An infinite penalty can be considered a restriction. From an implementation point of view having penalties is probably preferable because applying a penalty allows you more flexibility like applying a cost to making a turn or applying a greater cost to make a turn across traffic, or at traffic lights ot stop signs, etc.
In my mind "turn-restrictions" could be viewed as dynamic modification to the graph, based on the first link above this might be problematic, while changing the costs to a particular node based on the path to get there might be less problematic.
Please add additional useful comments and research.
The text was updated successfully, but these errors were encountered: