Skip to content

fix charge queue bug#122

Merged
nreinicke merged 2 commits intomainfrom
ndr/bugfixes
Dec 21, 2022
Merged

fix charge queue bug#122
nreinicke merged 2 commits intomainfrom
ndr/bugfixes

Conversation

@nreinicke
Copy link
Copy Markdown
Collaborator

Applies a couple of bug fixes discovered when creating a new hive scenario:

charge queue

When transitioning out of dispatch station we were only going into charge queuing if the available chargers result was None. But, there were cases when this evaluated to 0. This has been updated such that the available chargers method only returns an integer and it gets properly checked.

vehicle state updates

I was running into some very strange behavior in which I would observe the vehicle stepping properly in the internal closure of the perform_vehicle_state_updates method, breaking here but then the change would not be reflected in the result here. I revised the code to use a for loop and moved the _step_vehicle function out of the scope of the perform_vehicle_state_updates and the behavior is gone. This smells like something a bit deep and I didn't have time to investigate further.

@nreinicke nreinicke requested a review from a user December 15, 2022 18:35
Copy link
Copy Markdown
Collaborator

@robfitzgerald robfitzgerald left a comment

Choose a reason for hiding this comment

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

wow, killer 🐝s dude, thanks for catching these.

Comment thread nrel/hive/state/simulation_state/update/step_simulation_ops.py
Comment thread nrel/hive/model/station/station.py
Comment thread nrel/hive/state/simulation_state/update/step_simulation_ops.py
Comment thread tests/test_step_simulation_ops.py
@nreinicke nreinicke merged commit a3f71d2 into main Dec 21, 2022
@nreinicke nreinicke deleted the ndr/bugfixes branch December 21, 2022 17:11
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