-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/extend example trips #160
Conversation
Also solves #158 |
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.
Change the test so the behavior of the code aligns with the expected behavior
tests/test_schedule.py
Outdated
@@ -165,7 +165,7 @@ def test_get_common_stations(self): | |||
assert '2' in (common_stations["3"]) | |||
|
|||
def test_get_negative_rotations(self): | |||
"""Check if the single rotation '1' with a negative soc is found """ | |||
"""Check if rotations '1' and '11' with negative SOCs are found """ |
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.
The test tries making clear that rotation "1" is obviously negative. Its is not clear why 11 should be negative too.
This happens because of 11 and 1 share the same vehicle and the soc of -120 can not be recharged until the next day. My suggestion is calculating a slightly negative soc by using the mileage and distance or moving the great distance to the last rotation taking place. This way it will not change other rotations
the "bad" assigning of vehicles should not be caught here.
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.
rotation 11 and rotation 1 have the same trips, only +24h. So 11 is always neagtive if 1 is.
There is also room for improvement for our vehicle dispatch, vehicles with -120 should not be dispatched, but this is another topic I guess.
No description provided.