Skip to content
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

Merged
merged 11 commits into from
Mar 25, 2024
Merged

Feature/extend example trips #160

merged 11 commits into from
Mar 25, 2024

Conversation

j-brendel
Copy link
Collaborator

No description provided.

@j-brendel
Copy link
Collaborator Author

Also solves #158

Copy link
Collaborator

@PaulScheerRLI PaulScheerRLI left a 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

@@ -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 """
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@j-brendel j-brendel merged commit 2964261 into dev Mar 25, 2024
6 checks passed
@j-brendel j-brendel deleted the feature/extend_example_trips branch March 25, 2024 13:20
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