Skip to content

Add intermediate model classes#183

Merged
NicolaCourtier merged 6 commits into
162-update-design-optimisation-functionalityfrom
162b-design-optimisation-edits
Feb 8, 2024
Merged

Add intermediate model classes#183
NicolaCourtier merged 6 commits into
162-update-design-optimisation-functionalityfrom
162b-design-optimisation-edits

Conversation

@NicolaCourtier

Copy link
Copy Markdown
Member

As discussed, here is an implementation of intermediate model classes to allow the additional model function required for design optiimisation to be included as part of an electrochemical base model - see what you think!

Regarding the nominal capacity estimate, I think it is reliable - I am happy for this to be included as a base echem function called approximate_capacity in combination with the user warnings I've added to the GravimetricEnergyDensity cost.

@codecov

codecov Bot commented Feb 7, 2024

Copy link
Copy Markdown

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (0d65dc5) 93.30% compared to head (9d8853f) 94.08%.

Files Patch % Lines
pybop/models/base_model.py 50.00% 2 Missing ⚠️
pybop/models/empirical/ecm_base.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@                               Coverage Diff                                @@
##           162-update-design-optimisation-functionality     #183      +/-   ##
================================================================================
+ Coverage                                         93.30%   94.08%   +0.77%     
================================================================================
  Files                                                35       37       +2     
  Lines                                              1345     1352       +7     
================================================================================
+ Hits                                               1255     1272      +17     
+ Misses                                               90       80      -10     

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

@BradyPlanden

Copy link
Copy Markdown
Member

Hi Nicola,

Thanks for adding this, I think we should have an issue open to track this change moving forward. Can you open one for this PR?

This was linked to issues Feb 8, 2024
@NicolaCourtier

Copy link
Copy Markdown
Member Author

Hi Brady, I have created issue #186 to clarify the motivation for this PR - let me know if you have any further questions!

@BradyPlanden BradyPlanden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great @NicolaCourtier, thanks!

I've added a comment that I'm hoping will link and remind us to update the private reference to model in the problem class while merging #169. Otherwise just docstring updates.

],
"source": [
"cost.nominal_capacity(x, cost.problem._model)\n",
"cost.problem._model.approximate_capacity(x)\n",

@BradyPlanden BradyPlanden Feb 8, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Future merge reminder: Update this using the model getter in #169

Comment thread pybop/models/empirical/ecm_base.py Outdated
Comment thread pybop/models/lithium_ion/echem_base.py Outdated
NicolaCourtier and others added 2 commits February 8, 2024 14:52
Co-authored-by: Brady Planden <55357039+BradyPlanden@users.noreply.github.com>
Co-authored-by: Brady Planden <55357039+BradyPlanden@users.noreply.github.com>
@NicolaCourtier
NicolaCourtier merged commit 32dabb7 into 162-update-design-optimisation-functionality Feb 8, 2024
@NicolaCourtier
NicolaCourtier deleted the 162b-design-optimisation-edits branch February 8, 2024 15:09
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.

Issue with PR #167 Update design optimisation functionality

2 participants