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

Connection between Mads.jl and JuliaDiffEq #7

Closed
ChrisRackauckas opened this issue Oct 31, 2016 · 3 comments
Closed

Connection between Mads.jl and JuliaDiffEq #7

ChrisRackauckas opened this issue Oct 31, 2016 · 3 comments

Comments

@ChrisRackauckas
Copy link
Contributor

Hey,
I just found what you have here and it's pretty nice stuff. I would like to be able to wrap this functionality into the DifferentialEquations.jl ecosystem so that way it will be seamless for the average Julia user to use this. Here's the low-down:

  • First of all, just to mention, I see that you're still using ODE.jl. ODE.jl is pretty much defunct and DifferentialEquations.jl will offer both more features and better performance. There may be a breaking change to ODE.jl soon (which will add an iterator interface and change the API, but that's about it), but after that maintenance is not nontenured, which is why I'd suggest DifferentialEquations.jl (or more directly, OrdinaryDiffEq.jl). I can help you make the transition, though this should be fairly simple.
  • Recently added to DifferentialEquations.jl are parameter estimation (through Optim.jl), and there is a push right now for sensitivity analysis and uncertainty quantification (see DifferentialEquations Roadmap SciML/DifferentialEquations.jl#47). This is through the component packages ParameterEstimation.jl and the coming Sensitivity.jl. However, I think that the current approaches can definitely be improved by adding an interface to what you have here. Do you have good start to end examples of how to use the functionality here?
  • What functionality is required to be able to plug into this system? Through ParameterizedFunctions.jl the JuliaDiffEq ecosystem has a very robust way of specifying a model. Its not only overloaded with the function ready to use with the ODE/SDE solvers, but also holds the symbolic information for the functions, the parameters involved, the symbolic equation for the Jacobian and inverse Jacobians, etc. It seems like this has everything that would be needed to specify a Mads model and thus automatically do a sensitivity analysis/parameter estimation from a ParameterizedFunction. However, I don't quite understand your docs. Do you think we can collaborate to get this going? This would make Mads very accessible!

@finmod I see you've opened an issue here: are you familiar with its usage?

@montyvesselinov
Copy link
Member

Thank you very much! We will address this issues. Currently, we use ODE.jl only to demo our model analyses capabilites.

@ChrisRackauckas
Copy link
Contributor Author

Can this be re-opened? This was never done and I'd still like to take a crack at it.

Reguarding building the .mads file from the ParameterizedFunction, I have a few questions. First of all

https://github.com/madsjulia/Mads.jl/blob/master/examples/ode/ode.mads

Is the specification for this file defined anywhere? All I can find is here:

http://mads.readthedocs.io/en/latest/getting_started/

But not all of the fields are defined or documented. Secondly, is there a way to go about this without building the .mads file? It's quite unnecessary to have to write out to a file to call the library.

Third, regarding:

http://mads.readthedocs.io/en/latest/getting_started/

where is Associative documented?

Also, ode.jl example fails:

julia> import Mads

julia> import ODE

julia> import JSON

julia> import Gadfly

julia> import DataStructures

julia> # load parameter data from MADS YAML file
       Mads.madsinfo("Loading data ...")

julia> workdir = Mads.getmadsdir() # get the directory where the problem is executed
"."

julia> if workdir == ""
               workdir = joinpath(Mads.madsdir, "..", "examples", "ode")
       end

julia> md = Mads.loadmadsfile(joinpath(workdir, "ode.mads"))
ERROR: SystemError: opening file ./ode.mads: No such file or directory
 in #systemerror#51 at ./error.jl:34 [inlined]
 in systemerror(::String, ::Bool) at ./error.jl:34
 in open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./iostream.jl:89
 in #loadyamlfile#41(::Bool, ::Function, ::String) at /home/crackauc/.julia/v0.5/Mads/src/MadsYAML.jl:19
 in (::Mads.#kw##loadyamlfile)(::Array{Any,1}, ::Mads.#loadyamlfile, ::String) at ./<missing>:0
 in #loadmadsfile#6(::Bool, ::String, ::Function, ::String) at /home/crackauc/.julia/v0.5/Mads/src/MadsIO.jl:25
 in loadmadsfile(::String) at /home/crackauc/.julia/v0.5/Mads/src/MadsIO.jl:24

@montyvesselinov
Copy link
Member

It is not required to use "ode.mads" but in this case, you need to build the Dictionary by yourself.

Changes pushed. Now include("ode.jl" should work

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

No branches or pull requests

2 participants