Git Product home page Git Product logo

ode-toolbox's People

Contributors

abigailm avatar clinssen avatar dimitriplotnikov avatar ingablundell avatar jougs avatar shraddhajain13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ode-toolbox's Issues

Add Scipy ODE integrator as fallback for PyGSL

See #19:

Finally, I want to point out that Scipy's odeint does automatic switching between stiff and non-stiff methods and can return method choice and step size information for every step,

sol, info = scipy.integrate.odeint(f, y0, t, (), jac, full_output=True)
step_size_per_step = info['hu']
method_used_per_step = info['mused']
stiff_steps = (method_used_per_step == 2).sum()
non_stiff_steps = sol.size - stiff_steps
# etc

given your API, it would be straightforward to provide this as a fallback when PyGSL is not available (and looking at PyGSL's website does not inspire confidence as a long-term dependency).

This might require a slight redefinition of our solver selection criteria if automatic switching between solvers cannot be disabled in Scipy. Note that Scipy essentially wraps the ODEPACK solver library.

ode-toolbox unable to solve a system of a homogenous and inhomogennous ODEs

The system of ODEs is

u_bar_plus' = -u_bar_plus / tau
foo' = u_bar_plus / tau + b

The system has a solution when solved with pen and paper, which is as below

u_bar_plus = e^(-t/tau) + c1
foo = -e^(-t/tau) + b.t + c2

However, the output of ode-toolbox is with an undefined value zoo which indicates a bidirectional limit of 1/x with x->0 as mentioned here

"propagators": {
            "__P__foo__foo": "1",
            "__P__foo__u_bar_plus": "1 - exp(-__h/tau)",
            "__P__u_bar_plus__u_bar_plus": "exp(-__h/tau)"
        },
        "solver": "analytical",
        "state_variables": [
            "u_bar_plus",
            "foo"
        ],
        "update_expressions": {
            "foo": "-__P__foo__foo*(b*zoo - foo) - __P__foo__u_bar_plus*(b*zoo - u_bar_plus) + 2*b*zoo",
            "u_bar_plus": "__P__u_bar_plus__u_bar_plus*u_bar_plus"
        }

Address sympy API changes

Between sympy 1.4 and 1.7, the sympy API was changed leading to the error 'sympy.core' has no attribute 'all_classes'.

For now, requirements.txt has been updated to require exactly version 1.4. A more permanent fix should involve rewriting the ODE-toolbox function _is_sympy_type().

Test doesn't really work on master

Running the script against the aeif_cond_alpha_implicit.json file in the tests directory raises an error

(NameError: name 'V_m' is not defined).

This must be cached through tests! And test and/or implementation must be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.