Skip to content

Commit 79e32b0

Browse files
authored
Refactors Blocks module with @mtkmodel (#191)
* refactor: Blocks/math.jl * refactor: Blocks/continuous.jl * refactor: Blocks/nonlinear.jl * refactor: Blocks/sources.jl (limited) * refactor: Blocks/utils.jl (limited) * docs: set MTK to 8 * refactor: update the arglist of non-dsl components to match the style of dsl components - this will allow upgradation of those without breaking again
1 parent 1a22c77 commit 79e32b0

File tree

14 files changed

+374
-279
lines changed

14 files changed

+374
-279
lines changed

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ControlSystemsBase = "1.1"
1313
DifferentialEquations = "7.6"
1414
Documenter = "0.27"
1515
IfElse = "0.1"
16-
ModelingToolkit = "8.33"
16+
ModelingToolkit = "8"
1717
ModelingToolkitStandardLibrary = "1.8"
1818
OrdinaryDiffEq = "6.31"
1919
Plots = "1.36"

src/Blocks/Blocks.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Blocks
55
using ModelingToolkit, Symbolics
66
using IfElse: ifelse
77
import ..@symcheck
8+
using ModelingToolkit: getdefault
89

910
@parameters t
1011
D = Differential(t)

src/Blocks/analysis_points.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ See also [`get_sensitivity`](@ref), [`get_comp_sensitivity`](@ref), [`get_looptr
4646
```julia
4747
using ModelingToolkitStandardLibrary.Blocks
4848
@named P = FirstOrder(k = 1, T = 1)
49-
@named C = Gain(-1)
49+
@named C = Gain(; k = -1)
5050
t = ModelingToolkit.get_iv(P)
5151
eqs = [connect(P.output, C.input)
5252
connect(C.output, :plant_input, P.input)]

0 commit comments

Comments
 (0)