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

Creates a 'calc_esoh' property in the BaseModel #4825

Merged
merged 8 commits into from
Feb 11, 2025

Conversation

pipliggins
Copy link
Contributor

Creates a 'cal_esoh' property in the model class, set to False for the BaseModel, and True for the lithium ion BaseModel.
Allows the logic for whether eSOH variables should be calculated to be stored in the model, while allowing Simulation.solve() to override the model setting (i.e. set calc_esoh to False) as is the current behaviour.

Fixes #4619

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.70%. Comparing base (7419219) to head (940be75).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4825   +/-   ##
========================================
  Coverage    98.70%   98.70%           
========================================
  Files          303      303           
  Lines        23314    23334   +20     
========================================
+ Hits         23011    23031   +20     
  Misses         303      303           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pipliggins pipliggins marked this pull request as ready for review February 10, 2025 13:28
Copy link
Contributor

@kratman kratman left a comment

Choose a reason for hiding this comment

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

Everything else looks fine

@kratman kratman merged commit d12eb62 into pybamm-team:develop Feb 11, 2025
25 checks passed
RohitP2005 pushed a commit to RohitP2005/PyBaMM that referenced this pull request Feb 13, 2025
* Creates a 'calc_esoh' property in the BaseModel, allows Simulation to override
False in BaseModel, True in lithium_ion.BaseModel

* Fix style issue

* Update changelog

* Add setter for calc_esoh attr in lithium BaseModel

* Apply suggestions from code review

Make docstrings triple quotes

Co-authored-by: Eric G. Kratz <[email protected]>

---------

Co-authored-by: Eric G. Kratz <[email protected]>
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.

Make calc_esoh a model attribute
2 participants