Skip to content

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

Merged
brtietz merged 1 commit into
developfrom
batt_params_speedup
Dec 3, 2024
Merged

Create functions for battery parameters that were accessed in the code.#1251
brtietz merged 1 commit into
developfrom
batt_params_speedup

Conversation

@brtietz

@brtietz brtietz commented Dec 2, 2024

Copy link
Copy Markdown
Collaborator

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 dguittet and sjanzou December 2, 2024 23:08
@brtietz brtietz self-assigned this Dec 2, 2024

@sjanzou sjanzou left a comment

Copy link
Copy Markdown
Collaborator

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

brtietz commented Dec 3, 2024

Copy link
Copy Markdown
Collaborator Author

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
@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