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

Create functions for battery parameters that were accessed in the code. #1251

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

brtietz
Copy link
Collaborator

@brtietz brtietz commented Dec 2, 2024

This prevents copying the entire params object multiple times each step. Improves battery runtimes, especially for PV smoothing.

Happy to add const pointer changes to this PR as well if we want to do that too.

…e. This prevents copying the entire params object multiple times each step. Improves battery runtimes, especially for PV smoothing
@brtietz brtietz added this to the SAM Fall 2024 Release milestone Dec 2, 2024
@brtietz brtietz requested review from sjanzou and dguittet December 2, 2024 23:08
@brtietz brtietz self-assigned this Dec 2, 2024
Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

Looks good and thanks for adding access to only the necessary parameters - makes debugging easier for our future selves!

Any stats on the reduced memory or execution time?

@brtietz
Copy link
Collaborator Author

brtietz commented Dec 3, 2024

Any stats on the reduced memory or execution time?

Looks like this shaved 56 seconds off of the PVSmoothing tests on Ubuntu. Develop:

image

This branch:

image

@brtietz brtietz merged commit ff7ab60 into develop Dec 3, 2024
8 checks passed
@brtietz brtietz deleted the batt_params_speedup branch December 13, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants