Skip to content

Conversation

eugenevinitsky
Copy link
Member

@eugenevinitsky eugenevinitsky commented Sep 17, 2018

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

@eugenevinitsky
Copy link
Member Author

This should fix #116

@eugenevinitsky eugenevinitsky mentioned this pull request Sep 17, 2018
segment_length = length/float(num_edges)

edges = []
for i in range(num_edges):
Copy link
Member

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?

Copy link
Member Author

@eugenevinitsky eugenevinitsky Sep 17, 2018

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"]
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

@AboudyKreidieh AboudyKreidieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AboudyKreidieh AboudyKreidieh merged commit fb4195a into master Sep 18, 2018
@AboudyKreidieh AboudyKreidieh deleted the multi_lane_bug_fix branch September 18, 2018 04:46
crystalzyan pushed a commit to crystalzyan/flow that referenced this pull request Dec 1, 2018
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)
crystalzyan pushed a commit to crystalzyan/flow that referenced this pull request Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants