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 684 casadi events #691

Merged
merged 11 commits into from
Nov 1, 2019
Merged

Issue 684 casadi events #691

merged 11 commits into from
Nov 1, 2019

Conversation

valentinsulzer
Copy link
Member

Description

Add 'safe' mode to casadi for solving with events. This is hacky and make the solver slower.

Fixes #684

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.

  • 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

Copy link
Contributor

@Scottmar93 Scottmar93 left a comment

Choose a reason for hiding this comment

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

Looks great @tinosulzer. Well done getting this up and running. Looks like still getting some NaNs in the solution though. Maybe we can just remove those? A bit hacky though

@codecov
Copy link

codecov bot commented Oct 31, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@44614d1). Click here to learn what that means.
The diff coverage is 90.54%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #691   +/-   ##
=========================================
  Coverage          ?   98.21%           
=========================================
  Files             ?      176           
  Lines             ?     9040           
  Branches          ?        0           
=========================================
  Hits              ?     8879           
  Misses            ?      161           
  Partials          ?        0
Impacted Files Coverage Δ
pybamm/solvers/idaklu_solver.py 88.4% <100%> (ø)
pybamm/solvers/dae_solver.py 99.45% <100%> (ø)
pybamm/solvers/ode_solver.py 100% <100%> (ø)
pybamm/solvers/base_solver.py 97.4% <100%> (ø)
pybamm/solvers/scikits_ode_solver.py 98.24% <100%> (ø)
pybamm/solvers/scikits_dae_solver.py 97.72% <100%> (ø)
pybamm/solvers/algebraic_solver.py 100% <100%> (ø)
pybamm/quick_plot.py 96.75% <100%> (ø)
pybamm/solvers/solution.py 100% <100%> (ø)
pybamm/solvers/scipy_solver.py 100% <100%> (ø)
... and 1 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 44614d1...551f625. Read the comment docs.

@valentinsulzer valentinsulzer force-pushed the issue-684-casadi-events branch from 219abd9 to f4bcce7 Compare November 1, 2019 03:54
@valentinsulzer valentinsulzer merged commit 5a30f15 into master Nov 1, 2019
@valentinsulzer valentinsulzer deleted the issue-684-casadi-events branch November 1, 2019 14:32
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.

Casadi events
2 participants