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

Rjf/prevent recursion limit #213

Merged
merged 3 commits into from
Oct 2, 2023
Merged

Conversation

robfitzgerald
Copy link
Collaborator

This PR addresses a recursion limit failure in the assignment_ops:shortest_time_to_charge_ranking function which is possible when there are over 1000 vehicles charging and enqueued at a station. This edge case was observed while running freight simulation with tens of thousands of vehicles in locations where the user specified sparse charging stations. the solution refactors the code from a recursive function to a while loop.

Closes #212.

Copy link
Collaborator

@nreinicke nreinicke left a comment

Choose a reason for hiding this comment

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

This makes sense to me, good catch!

@robfitzgerald robfitzgerald merged commit 224263b into main Oct 2, 2023
4 checks passed
@robfitzgerald robfitzgerald deleted the rjf/prevent-recursion-limit branch October 2, 2023 22:26
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.

recursion limit during charging search
2 participants