-
Notifications
You must be signed in to change notification settings - Fork 389
Multi lane bug fix #153
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
Multi lane bug fix #153
Conversation
… things to gen_custom_start_pos
This should fix #116 |
segment_length = length/float(num_edges) | ||
|
||
edges = [] | ||
for i in range(num_edges): |
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.
sort of at a high level, why do we want to cut the highway into sections?
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.
This lets me write tests for the methods that get leaders for subsequent edges; doing this to highways seemed like the cleanest way to test the non-junction version of this
startlanes : list of int | ||
list of start lanes | ||
""" | ||
return kwargs["start_positions"], kwargs["start_lanes"] |
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.
do we want this for all scenarios? if so, would be a good idea to create an issue about this
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.
It seems like a one-off at the moment? I don't see a compelling case for carefully specifying the initial position of vehicles but happy to be convinced otherwise
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.
LGTM
full unit test coverage for the current codebase, total of 62 tests that take around 12 sec to run. bug fixes and methods to handle edge cases The "safe_velocity" failsafe was also re-written, and now manages to always prevent crashes. visualizer_flow no longer requires you to specify the type of scenario Refactored components: visualizer_CISTAR renamed to visualizer_flow, and all other visualizers were deleted some parts of the accelerations controllers were renamed to maintain some consistency between all controllers. stuff that haven't been tested: get_headway_dict run_long in visualizer_flow (this is still broken) resets after collisions (this used to be broken, but I added a patch. I can't figure out how to recreate the problem though, since it doesn't happen all the time) anything rl (tests take at least 3 sec because of rllab, so moving them all into integration tests) generator base class (could not think of good unit tests)
Multi lane bug fix
Added tests to _multi_lane_headways_util
Fixed _multi_lane_headways_util to pass the tests
Modified gen_custom_start_pos to allow for passing of explicit vehicle positions
Fix #147