You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using @mtkmodel and @extend, the constructor does not know about the parameters of the extended system. MWE:
@mtkmodel Inner begin@parametersbegin
color[1:4] = [1.0, 0.0, 0.0, 1.0], [description ="Color of the body in animations"]
render =true, [description ="Render the joint in animations"]
endend@mtkmodel Outer begin@extend () = v =Inner()
@parametersbegin
radius =0.1, [description ="Radius of the sphere in animations"]
endend@named test =Outer(color=[1,1,1,1])
julia>@named test =Outer(color=[1,1,1,1])
ERROR: MethodError: no method matching __Outer__(; name::Symbol, color::Vector{Int64})
Closest candidates are:__Outer__(; name, radius) got unsupported keyword argument "color"
@ Main ~/.julia/packages/ModelingToolkit/UXr3S/src/systems/model_parsing.jl:138
The text was updated successfully, but these errors were encountered:
The component that is extended may have 10s-100s of parameters and variables, if we have to type them all out it kind-of defeats the purpose of extending something in the first place?
When using
@mtkmodel
and@extend
, the constructor does not know about the parameters of the extended system. MWE:The text was updated successfully, but these errors were encountered: