-
Notifications
You must be signed in to change notification settings - Fork 660
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
Increase limits for timedep_* algorithms to fix "no route found" #2845
Conversation
on |
@@ -53,9 +53,12 @@ namespace sif { | |||
// default options/parameters | |||
namespace { | |||
|
|||
// max penalty to apply when use tracks | |||
constexpr float kMaxTrackPenalty = 300.f; // 5 min |
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.
are you going to add a costing option to all the user to set this? a lot of our other penalties work like this like gate penalty and alley penalty
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.
I've implemented the same logic as @SvetlanaBayarovich for living_street
. reasons:
- I couldn't come up with a usecase that can't be covered with single
use_tracks
parameter; so, as for me to havetrack_penalty
as external parameter is superfluously. - it's clear separation:
use_tracks
- external parameter in range[0..1]
;track_factor
,track_penalty
- internal parameters that are measured in internal units and can be tweaked by us without notifying external users.
@@ -14,7 +14,7 @@ namespace thor { | |||
constexpr uint32_t kInitialEdgeLabelCount = 500000; | |||
|
|||
// Number of iterations to allow with no convergence to the destination | |||
constexpr uint32_t kMaxIterationsWithoutConvergence = 800000; | |||
constexpr uint32_t kMaxIterationsWithoutConvergence = 1800000; |
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.
oof more than double :( i guess the good news is that we rarely reach this limit except for some extreme cases?
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.
right, it happens not very often
| | | | ||
C--------D G |
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.
can you briefly describe the test change, its not really obvious from the diff
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.
yeah. as far as I introduced track_penalty
, route ABEF
became cheaper and route ABCDEF
became more expensive (because of high penalty in transition cost). So, in order to demonstrate track avoidance feature, we should have route completely without tracks as ABCDEF
and with tracks as ABEF
this looks good to me. myy only question is about adding the penality as a parameter in the request like the other ones are |
Performance test. I ran set
set
|
// Calculate penalty value based on use preference. Return value | ||
// in range [kMaxTrackPenalty; 0], if use < 0.5; or | ||
// 0, if use > 0.5. | ||
track_penalty_ = use_tracks < 0.5f ? (kMaxTrackPenalty * (1.f - 2.f * use_tracks)) : 0.f; |
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.
Is this parameter documented somewhere? I couldn't find it in the API docs.
Its math for generating the track penalty is not very straight-forward. Eg: setting a value of 0.4
would mean applying a penalty of 1 min (?) to each track edge. CMIIW. Makes it a bit hard to reason as to what affect the value has without looking at the code.
Can we document this somewhere?
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, I forgot to add use_tracks
option to docs( will do. the reasons why we use single option I described here #2845 (comment)
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.
Minor commetn about docs. Rest LGTM!
80613ae
@kevinkreiser do you know why |
@genadz its because you forked the repository and you dont have the dockerhub credentials. i'l work on making that build robust to that. you can ignore it for now |
should be fixed now |
thanks a lot! |
Issue
the problem was described here #2834 . So, I did 2 things:
track_factor
(it boosted convergence) and the same time to keep avoid tracks.Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?