Skip to content

Commit e6e880b

Browse files
fix: revert SISO to function syntax instead of mtkmodel syntax
1 parent b2f848c commit e6e880b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Blocks/utils.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ Single input single output (SISO) continuous system block.
124124
- `u_start`: Initial value for the input
125125
- `y_start`: Initial value for the output
126126
"""
127-
@mtkmodel SISO begin
128-
@parameters begin
129-
u_start = 0.0
130-
y_start = 0.0
127+
@component function SISO(; name, u_start = 0.0, y_start = 0.0)
128+
pars = @parameters begin
129+
u_start = u_start
130+
y_start = y_start
131131
end
132-
@variables begin
132+
vars = @variables begin
133133
u(t), [guess = u_start, description = "Input of SISO system"]
134134
y(t), [guess = y_start, description = "Output of SISO system"]
135135
end
@@ -140,7 +140,7 @@ Single input single output (SISO) continuous system block.
140140
@equations begin
141141
u ~ input.u
142142
y ~ output.u
143-
end
143+
return ODESystem(eqs, t, vars, pars; name = name, systems = [input, output])
144144
end
145145

146146
"""

0 commit comments

Comments
 (0)