Skip to content

Commit 2300578

Browse files
fix: construct System in @mtkmodel
1 parent 43b172e commit 2300578

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/systems/model_parsing.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ModelingToolkit component or connector with metadata
77
$(FIELDS)
88
"""
99
struct Model{F, S}
10-
"""The constructor that returns ODESystem."""
10+
"""The constructor that returns a System."""
1111
f::F
1212
"""
1313
The dictionary with metadata like keyword arguments (:kwargs), base
@@ -61,7 +61,7 @@ function _model_macro(mod, name, expr, isconnector)
6161

6262
push!(exprs.args, :(variables = []))
6363
push!(exprs.args, :(parameters = []))
64-
push!(exprs.args, :(systems = ODESystem[]))
64+
push!(exprs.args, :(systems = System[]))
6565
push!(exprs.args, :(equations = Union{Equation, Vector{Equation}}[]))
6666
push!(exprs.args, :(defaults = Dict{Num, Union{Number, Symbol, Function}}()))
6767

@@ -114,7 +114,7 @@ function _model_macro(mod, name, expr, isconnector)
114114
@inline pop_structure_dict!.(
115115
Ref(dict), [:constants, :defaults, :kwargs, :structural_parameters])
116116

117-
sys = :($ODESystem($(flatten_equations)(equations), $iv, variables, parameters;
117+
sys = :($System($(flatten_equations)(equations), $iv, variables, parameters;
118118
name, description = $description, systems, gui_metadata = $gui_metadata, defaults))
119119

120120
if length(ext) == 0

0 commit comments

Comments
 (0)