-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow abitrary edge weights #2399
Conversation
Capturing from chat:
For traffic data imports, let's look at some use cases:
The last case is a bit of a stretch, I couldn't think of a better example. But the point is that we probably need to be able to update both with the CSV import. I think we could do:
I think if we simply don't supply data, we can efficiently skip either the duration and/or weight updates. |
wow, this has been a long time coming! it will be very useful for bike routing |
We can update the data with regard to the names given in the csv header column. |
92bdb88
to
b03c3a6
Compare
45f9d06
to
d6754a6
Compare
@@ -154,7 +154,7 @@ class GraphContractor | |||
for (auto diter = input_edge_list.dbegin(); diter != dend; ++diter) | |||
{ | |||
BOOST_ASSERT_MSG(static_cast<unsigned int>(std::max(diter->weight, 1)) > 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't max(weight,1)
always >0
, especially since we cast to an unsigned?
e6181c5
to
cf3eee4
Compare
@@ -71,7 +71,9 @@ struct ExtractorConfig | |||
rtree_nodes_output_path = basepath + ".osrm.ramIndex"; | |||
rtree_leafs_output_path = basepath + ".osrm.fileIndex"; | |||
edge_segment_lookup_path = basepath + ".osrm.edge_segment_lookup"; | |||
edge_penalty_path = basepath + ".osrm.edge_penalties"; | |||
turn_duration_penalties_path = basepath + ".osrm.turn_weight_penalties"; | |||
turn_weight_penalties_path = basepath + ".osrm.turn_duration_penalties"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the values are swapped:
turn_weight_penalties → turn_duration_penalties and vice versa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch 👍
3d11c97
to
a06f134
Compare
Things to do here:
|
duration_penalty += profile_properties.traffic_signal_penalty; | ||
} | ||
|
||
if (use_turn_function) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use_turn_function is not defined, may the changeset it is incomplete?
Hi, i have almost finished rebase of the PR to master, but some parts are missing. If it is interesting, i can create a duplicate PR with rebased patches. |
@oxidase Let me just give your contributor access so you can push directly to this branch. |
6a4a2a4
to
f316d03
Compare
Please review a forced rebase of the branch to master. I have modified some commits, changed some properties in profiles and changed TurnPenalty to int16_t to make all tests green. |
e186963
to
8d1f156
Compare
@TheMarex updated and rebased the brach, but in some places i did not make changes:
|
8d1f156
to
28589e7
Compare
28b1c6e
to
02880cf
Compare
You are right, I confused myself with my own changelog entry. Currently it is:
Correct however would be:
This looks good to me. I think we can merge this (wow so weird). |
looks like std::size_t is not integral type? will change to |
02880cf
to
f6dca2b
Compare
Thanks for all the effort you are putting into this. |
@djschilling @emiltin and anyone else who has been watching this ticket - we've merge into master but feedback on this feature would be really helpful. Anyone who has the time to test it out, please do and open tickets with any problems/confusion you encounter. |
We are using an earlier state of the pull request since the start of the year and it does exactly what it should. One thing that we encountered is a performance loose from about 40%. Its not critical for us, but i think its worth mentioning. |
This PR aims to finally implement #77.
Where we are now:
ExtractionWay
has a new propertyweight_per_meter
that we pull through the whole pipeline to the server. It is exposed over the fields namedweight
(analogous toduration
).ProfileProperties
has a new propertyweight_name
TODO
weight_per_meter
is a wrong name. This was an oversight from my part: It actually encodesweight_per_second
(analogous tospeed
beingmeters_per_second
) We need to rename this. /cc @karenzsheaScriptingEnvironment
andEdgeBasedGraphFactory
here needs to work with both API versionScriptingEnvironment
andExtractionContainers
here also needs to work with both API version.0
: We expect the current implementation ofturn_function
andsegment_function
and silently fallback toweight = duration
(this needs wrapper code inScriptingEnvironment::ProcessTurn
andScriptingEnvironment::ProcessSegment
)1
: We expectturn_function
andsegment_function
to follow the scheme already implemented in this PR