Skip to content

@named not defined when running the Copy-Paste Example from the documentation #877

@hurak

Description

@hurak

I am encountering the following problem when running the Copy-Paste Example from the (stable) ModelingToolkit documentation:

julia> using ModelingToolkit, OrdinaryDiffEq

julia> @parameters t σ ρ β
(t, σ, ρ, β)

julia> @variables x(t) y(t) z(t)
(x(t), y(t), z(t))

julia> D = Differential(t)
(::Differential) (generic function with 1 method)

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

3-element Array{Equation,1}:
 Equation(derivative(x(t), t), σ * (y(t) - x(t)))
 Equation(derivative(y(t), t), x(t) *- z(t)) - y(t))
 Equation(derivative(z(t), t), x(t) * y(t) - β * z(t))

julia> @named lorenz1 = ODESystem(eqs)
ERROR: LoadError: UndefVarError: @named not defined
in expression starting at none:1

julia> @named lorenz2 = ODESystem(eqs)
ERROR: LoadError: UndefVarError: @named not defined
in expression starting at none:1

My environment contains the latest stable ModelingToolkit.jl and OrdinaryDiffEq.jl:

(electrical) pkg> status
Status `~/julia/electrical/Project.toml`
  [961ee093] ModelingToolkit v5.12.1
  [1dea7af3] OrdinaryDiffEq v5.52.0
  [91a5bcdd] Plots v1.10.6

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