Skip to content

Symbolic-array system bug in counting equations and variables #2597

@baggepinnen

Description

@baggepinnen

MWE

@mtkmodel Foo begin
    @variables begin
        x(t)[1:2]
    end
    @equations begin
        D.(x) ~ .-x
    end
end
@named foo = Foo()
foo = complete(foo)
prob = ODEProblem(foo, Dict(foo.x => [1.0, 1]), (0.0, 1.0))
sol = solve(prob, Rodas4())
julia> prob = ODEProblem(foo, Dict(foo.x => [1.0, 1]), (0.0, 1.0))
ERROR: ArgumentError: Equations (1), unknowns (2), and initial conditions (2) are of different lengths. To allow a different number of equations than unknowns use kwarg check_length=false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraysbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions