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

[WIP] Add Common Interface Bindings #6

Merged
merged 3 commits into from
Nov 28, 2016
Merged

Conversation

ChrisRackauckas
Copy link
Collaborator

This adds LSODA to the common interface. For example, as seen in the tests, problems on things like 2-dimensional matrix are supported through solve:

using LSODA, DiffEqProblemLibrary
prob = prob_ode_2Dlinear
sol = solve(prob,LSODAAlg(),save_timeseries=false,saveat=[1/2])

Additionally, this allows LSODA to be the backend solver for sensitivity analysis, parameter estimation, etc.

Currently there are some details to fix up:

  • If the package is named LSODA, then the algorithm type cannot be named LSODA. This is a bummer. Currently I named it LSODAAlg. Is there a better name?
  • Setup with save_timeseries. Currently you can only use the saveat style of saving instead of letting it save at each timepoint it steps to. Can someone help me find out how to get the value of each timestep @sdwfrost ?

@coveralls
Copy link

coveralls commented Nov 27, 2016

Coverage Status

Coverage decreased (-0.6%) to 90.909% when pulling ec8e0d5 on ChrisRackauckas:common into 913574f on rveltz:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 90.909% when pulling ec8e0d5 on ChrisRackauckas:common into 913574f on rveltz:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 90.909% when pulling ec8e0d5 on ChrisRackauckas:common into 913574f on rveltz:master.

@rveltz
Copy link
Owner

rveltz commented Nov 28, 2016

Good work! Thank you for adding tests too.

@rveltz rveltz merged commit 20e5c6c into rveltz:master Nov 28, 2016
@rveltz
Copy link
Owner

rveltz commented Nov 28, 2016

I am not sure why you need to put all this in LSODA.jl. You can just call LSODA from DifferentialEquations by, for example, putting common.jl in DifferentialEquations' sources?
.

@ChrisRackauckas
Copy link
Collaborator Author

This was still WIP, but the changes can be further PRs. @sdwfrost do you have a suggestion for saving each step? I assume that's just an option somewhere.

I am not sure why you need to put all this in LSODA.jl.

Well, it's a very short code. You can read the numerous discussions that have gone on about the ecosystem structure, but the key idea is that this allows one to use the common interface without requiring the full 40,000+ lines of code represented by the metapackage DiffererntialEquations.jl. This setup allows someone to try LSODA along with every other code, and if they find LSODA is good for their application, reduce the dependencies to only LSODA without having to change the code (to write to a different interface). In addition, having this package-wise instead of centralized allows for add-on packages to not require every solver. Therefore DiffEqParamEstim is now able to use LSODA as a backend in parameter estimation, without requiring any other packages. If you wish to know more, there's a whole trail of additional explanations for this setup, and similar setups in JuMP, JuliaML, Plots.jl, etc. already online.

@ChrisRackauckas ChrisRackauckas deleted the common branch November 28, 2016 18:05
@rveltz
Copy link
Owner

rveltz commented Nov 28, 2016

That makes sense, thank you.

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.

3 participants