Merged
Conversation
42B
reviewed
Nov 18, 2018
flow/envs/base_env.py
Outdated
| # check to make sure all vehicles have been spawned | ||
| if len(self.initial_ids) < self.vehicles.num_vehicles: | ||
| logging.error("Not enough vehicles have spawned! Bad start?") | ||
| exit() |
There was a problem hiding this comment.
Shouldn't this use sys.exit and return a nonzero value?
Member
There was a problem hiding this comment.
This is correct, thanks for the catch!
Pull Request Test Coverage Report for Build 1695
💛 - Coveralls |
…se_env_cleanup
…se_env_cleanup
…se_env_cleanup
…se_env_cleanup
| vehicle in a sumo network with traci) | ||
| """ | ||
| # check to make sure all vehicles have been spawned | ||
| num_spawned_veh = self.traci_connection.simulation.getDepartedNumber() |
Member
There was a problem hiding this comment.
why is this a bad check to have in place?
Member
There was a problem hiding this comment.
To be specific, this is hit sometimes when your initial_config is invalid due to overlapping positions
Member
Author
There was a problem hiding this comment.
Don’t worry, it was just shifted down. The check is still there.
| @@ -261,7 +254,7 @@ def reset(self): | |||
| route_id, | |||
| typeID=str(type_id), | |||
| departLane=str(lane_index), | |||
Member
There was a problem hiding this comment.
Thank you for copying this!
eugenevinitsky
approved these changes
Nov 30, 2018
Member
eugenevinitsky
left a comment
There was a problem hiding this comment.
LGTM minus discussion as indicated
crystalzyan
pushed a commit
to crystalzyan/flow
that referenced
this pull request
Dec 1, 2018
Vehicles cleanup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changes: