Skip to content

Issue 684 casadi events#691

Merged
valentinsulzer merged 11 commits intomasterfrom
issue-684-casadi-events
Nov 1, 2019
Merged

Issue 684 casadi events#691
valentinsulzer merged 11 commits intomasterfrom
issue-684-casadi-events

Conversation

@valentinsulzer
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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