Skip to content

Conversation

martinjrobins
Copy link
Contributor

Description

Fixes #4545

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)

Important checks:

Please confirm the following before marking the PR as ready for review:

  • No style issues: nox -s pre-commit
  • All tests pass: nox -s tests
  • The documentation builds: nox -s doctests
  • Code is commented for hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@martinjrobins martinjrobins requested a review from a team as a code owner April 16, 2025 10:52
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.57%. Comparing base (b4c9df8) to head (36ed705).
Report is 103 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4975      +/-   ##
===========================================
- Coverage    98.60%   98.57%   -0.04%     
===========================================
  Files          304      304              
  Lines        23809    23641     -168     
===========================================
- Hits         23478    23305     -173     
- Misses         331      336       +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@MarcBerliner MarcBerliner left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @martinjrobins! It makes the code so much cleaner :)

Just a few minor comments

Comment on lines 328 to 335
sens_idaklu = np.interp(
solutions[1].t[:-2],
solutions[3].t,
solutions[3]["Voltage [V]"]
t,
solutions[1].t,
solutions[1]["Voltage [V]"]
.sensitivities[input_param_name]
.full()
.flatten(),
)
Copy link
Member

Choose a reason for hiding this comment

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

Can we change this to a higher order interpolator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried this but it doesn't work very well due to the discontinuities in the experiment, linear interp behaves better

Copy link
Member

@MarcBerliner MarcBerliner left a comment

Choose a reason for hiding this comment

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

Thanks Martin! Looks great

@MarcBerliner MarcBerliner merged commit f2702b3 into develop Apr 24, 2025
25 of 26 checks passed
@MarcBerliner MarcBerliner deleted the i4545-remove-explicit-sens branch April 24, 2025 13:13
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.

remove explicit sensitivity calculation (casadi solver)
2 participants