Skip to content

SDESystem example MTKv10.0.1 error #3687

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

Open
ChristophHotter opened this issue Jun 3, 2025 · 1 comment
Open

SDESystem example MTKv10.0.1 error #3687

ChristophHotter opened this issue Jun 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ChristophHotter
Copy link

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.
@ChristophHotter ChristophHotter added the bug Something isn't working label Jun 3, 2025
@ChrisRackauckas
Copy link
Member

In v10 it's just System. The new docs should build soonish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants