Skip to content

Harmonise parameter input praxis into Problems #428

@TorkelE

Description

@TorkelE

Currently, this is the way to create an ODEProblem using MTK:

using ModelingToolkit

@parameters t σ ρ β
@variables x(t) y(t) z(t)
@derivatives D'~t
eqs = [D(x) ~ σ*(y-x),
       D(y) ~ x*-z)-y,
       D(z) ~ x*y - β*z]
de = ODESystem(eqs,t,[x,y,z],[σ,ρ,β])

ODEProblem(de,[x => 1., y => .2, z => 3.],(0.,10.),[σ => 1.=> 1.=> 1.])

while this is an incorrect notation

ODEProblem(de,[1., .2, 3.],(0.,10.),[1.,1.,1.])

When creating ReactionSystems using the new DiffEqBio rework one does not declare the variables and parameters, hence I enabled the notation

ODEProblem(rs,[1., .2, 3.],(0.,10.),[1.,1.,1.])

where rs is a ReactionSystem. This is the only type of system where this is possible.

We will need to decide on an input praxis, and ensure that it is similar across all system types.

Reference: #425

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions