-
-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Labels
Description
@mtkmodel Foo begin
@structural_parameters begin
nx = 2
end
@variables begin
(x(t)[1:nx]), [description = "State"]
end
@equations begin
end
endERROR: promotion of types Int64 and Symbol failed to change any arguments
With explicit array size, it works
julia> @mtkmodel Foo begin
@structural_parameters begin
nx = 2
end
@variables begin
(x(t)[1:2]), [description = "State"]
end
@equations begin
end
end
ModelingToolkit.Model{typeof(__Foo__), Dict{Symbol, Any}}(__Foo__, Dict{Symbol, Any}(:variables => Dict{Symbol, Dict{Symbol, Any}}(:x => Dict(:type => Real, :description => "State", :size => (2,))), :kwargs => Dict{Symbol, Dict}(:nx => Dict(:value => 2), :x => Dict{Symbol, Union{Nothing, UnionAll}}(:value => nothing, :type => AbstractArray{Real})), :structural_parameters => Dict{Symbol, Dict}(:nx => Dict(:value => 2)), :independent_variable => t, :equations => Any[]), false)