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

Issue 1082 events #1450

Merged
merged 24 commits into from
Mar 29, 2021
Merged

Issue 1082 events #1450

merged 24 commits into from
Mar 29, 2021

Conversation

valentinsulzer
Copy link
Member

@valentinsulzer valentinsulzer commented Mar 27, 2021

Description

Add a new casadi solver mode which provides a fast solution even when there are events. Eventually this could become the default mode for the casadi solver, but it needs more testing first.

Should not be part of v0.4.0, do not merge before #1448

Fixes #1082

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #1450 (f280a92) into develop (4df4220) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1450      +/-   ##
===========================================
+ Coverage    98.28%   98.30%   +0.01%     
===========================================
  Files          281      281              
  Lines        16219    16313      +94     
===========================================
+ Hits         15941    16036      +95     
+ Misses         278      277       -1     
Impacted Files Coverage Δ
...graphite_UMBL_Mohtat2020/graphite_ocp_PeymanMPM.py 100.00% <ø> (ø)
...lectrodes/NMC_UMBL_Mohtat2020/NMC_ocp_PeymanMPM.py 100.00% <ø> (ø)
pybamm/models/submodels/particle/base_particle.py 100.00% <ø> (ø)
pybamm/solvers/casadi_algebraic_solver.py 98.87% <ø> (ø)
pybamm/models/event.py 95.83% <100.00%> (+4.52%) ⬆️
...m/models/full_battery_models/base_battery_model.py 99.67% <100.00%> (+<0.01%) ⬆️
...ybamm/models/submodels/interface/base_interface.py 99.62% <100.00%> (+<0.01%) ⬆️
pybamm/parameters/lithium_ion_parameters.py 100.00% <100.00%> (ø)
pybamm/simulation.py 97.99% <100.00%> (+0.04%) ⬆️
pybamm/solvers/base_solver.py 99.18% <100.00%> (+0.03%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4df4220...f280a92. Read the comment docs.

Copy link
Member

@brosaplanella brosaplanella 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, thanks Tino! On Monday I will test it with the new parameter set I am working on which gave some issues in terms of speed.

@valentinsulzer
Copy link
Member Author

Cool, hope it helps!

Copy link
Contributor

@rtimms rtimms left a comment

Choose a reason for hiding this comment

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

thanks @tinosulzer !

@valentinsulzer valentinsulzer merged commit 79236f1 into develop Mar 29, 2021
@valentinsulzer valentinsulzer deleted the issue-1082-events branch March 29, 2021 12:55
@rtimms rtimms mentioned this pull request Mar 29, 2021
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.

Reformat casadi solver again
3 participants