Skip to content

Commit c59485e

Browse files
committed
add compat details on MTK.jl bugfixes
1 parent 3833301 commit c59485e

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ JuMP = "1"
1616
LinearAlgebra = "1.6"
1717
Logging = "1.6"
1818
Plots = "1"
19-
ModelingToolkit = "~9.41"
19+
ModelingToolkit = "9.50"

docs/src/manual/mtk.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ the last section.
2222
as a basic starting template to combine both packages. There is no guarantee that it
2323
will work for all corner cases.
2424

25-
!!! compat
26-
The example only work with `ModelingToolkit.jl` v9.41 releases.
27-
2825
We first construct and instantiate the pendulum model:
2926

3027
```@example 1
@@ -79,16 +76,14 @@ function generate_f_h(model, inputs, outputs)
7976
end
8077
return nothing
8178
end
82-
return_inplace = true
8379
(_, h_ip) = ModelingToolkit.build_explicit_observed_function(
84-
io_sys, outputs; inputs, return_inplace
80+
io_sys, outputs; inputs, return_inplace = true
8581
)
86-
println(h_ip)
8782
u_nothing = fill(nothing, nu)
8883
function h!(y, x, _ , p)
8984
try
90-
# MTK.jl supports a `u` argument in `h_` function but not this package. We set
91-
# `u` as a vector of nothing and `h_` function will presumably throw an
85+
# MTK.jl supports a `u` argument in `h_ip` function but not this package. We set
86+
# `u` as a vector of nothing and `h_ip` function will presumably throw an
9287
# MethodError it this argument is used inside the function
9388
h_ip(y, x, u_nothing, p, nothing)
9489
catch err
@@ -110,6 +105,9 @@ vu, vy = ["\$τ\$ (Nm)"], ["\$θ\$ (°)"]
110105
nothing # hide
111106
```
112107

108+
!!! compat
109+
The example relies on features and bugfixes of `ModelingToolkit.jl` v9.50.
110+
113111
A [`NonLinModel`](@ref) can now be constructed:
114112

115113
```@example 1

0 commit comments

Comments
 (0)