@@ -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-
2825We 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)"], ["\$θ\$ (°)"]
110105nothing # hide
111106```
112107
108+ !!! compat
109+ The example relies on features and bugfixes of ` ModelingToolkit.jl ` v9.50.
110+
113111A [ ` NonLinModel ` ] ( @ref ) can now be constructed:
114112
115113``` @example 1
0 commit comments