Skip to content

SDESystem example MTKv10.0.1 error #3687

Open
@ChristophHotter

Description

@ChristophHotter

The SDESystem example on the MTK docu does not work with MTK version 10.0.1.

using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D

@parameters σ ρ β
@variables x(t) y(t) z(t)

eqs = [D(x) ~ σ*(y-x),
       D(y) ~ x*-z)-y,
       D(z) ~ x*y - β*z]

noiseeqs = [0.1*x,
            0.1*y,
            0.1*z]

@named de = SDESystem(eqs,noiseeqs,t,[x,y,z],[σ,ρ,β]; tspan = (0, 1000.0))

Error & Stacktrace ⚠️

ERROR: MethodError: no method matching System(::Vector{…}, ::Num, ::Vector{…}, ::Vector{…}, ::Vector{…}; noise_eqs::Vector{…}, name::Symbol, tspan::Tuple{…})
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.

Closest candidates are:
  System(::Vector{Equation}, ::Any, ::Any, ::Any, ::Any; constraints, noise_eqs, jumps, costs, consolidate, observed, parameter_dependencies, defaults, guesses, systems, initialization_eqs, continuous_events, discrete_events, connector_type, assertions, metadata, gui_metadata, is_dde, tstops, tearing_state, ignored_connections, parent, description, name, discover_from_metadata, initializesystem, is_initializesystem, preface, checks) got unsupported keyword argument "tspan"
   @ ModelingToolkit ~/.julia/packages/ModelingToolkit/DSTHC/src/systems/system.jl:325
  System(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any; ...)
   @ ModelingToolkit ~/.julia/packages/ModelingToolkit/DSTHC/src/systems/system.jl:252
  System(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any; ...)
   @ ModelingToolkit ~/.julia/packages/ModelingToolkit/DSTHC/src/systems/system.jl:252
  ...

Stacktrace:
 [1] kwerr(::@NamedTuple{}, ::Type, ::Vector{…}, ::Num, ::Vector{…}, ::Vector{…}, ::Vector{…})
   @ Base ./error.jl:165
 [2] SDESystem(eqs::Vector{…}, noise::Vector{…}, iv::Num, dvs::Vector{…}, ps::Vector{…}; is_scalar_noise::Bool, parameter_dependencies::Vector{…}, kwargs::@Kwargs{})
   @ ModelingToolkit ~/.julia/packages/ModelingToolkit/DSTHC/src/systems/system.jl:1007
 [3] top-level scope
   @ ~/.julia/packages/ModelingToolkit/DSTHC/src/systems/abstractsystem.jl:2192
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions