Skip to content

parameter is not a parameter, bad error message #2578

Open
@baggepinnen

Description

@baggepinnen

The following system gives the cryptic error

ArgumentError: r(t) is not a parameter.

I assume it has something to do with r being an array and the equation using .~, but the error message doesn't really tell me what the problem is, r is certainly a parameter from the user's point of view.

using LinearAlgebra
@component function Temp(; name, r)
    @parameters r(t)[1:3]=r [
        description = "position vector from frame_a to frame_b, resolved in frame_a",
    ]
    @variables fb(t)[1:3]=r [
        description = "force",
    ]
    eqs = cross(r, fb) .~ zeros(3)
    ODESystem(eqs, t; name)
end

Temp(; name=:t, r=zeros(3))

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions