Skip to content

Commit e3b49b7

Browse files
docs: namespace MTK analysis-point helpers and import ImplicitEuler
After #448 unblocked the connections.md operating_point error, the Documentation build surfaced two further breakages on main: - `dc_motor_pi.md` uses `Blocks.get_sensitivity`, `Blocks.get_comp_sensitivity`, `Blocks.get_looptransfer`. Those helpers moved out of `ModelingToolkitStandardLibrary.Blocks` into `ModelingToolkit` proper, so the `Blocks.` prefix now hits `UndefVarError`. Use `ModelingToolkit.` instead. - `input_component.md`'s `custom_component_external_data` example calls `solve(prob, ImplicitEuler())`, but OrdinaryDiffEq v7 no longer re-exports `ImplicitEuler`. Add `using OrdinaryDiffEqSDIRK: ImplicitEuler`. Two further docs failures remain (separate root causes, deferred): - `custom_component.md` `@mtkmodel ChaoticAttractor` can't see the `NonlinearResistor` defined in an earlier `@example` block of the same name — looks like a hygiene/lookup issue in the SciCompDSL `@mtkmodel` expansion when the constructor body runs in a Documenter `@example` module. - `MethodError: fntype_X_Y(::Type{Real})` from SymbolicUtils inside the BSplineInterpolation/parametrized_interpolation example — upstream SymbolicUtils dispatch gap. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent e24320e commit e3b49b7

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

docs/src/tutorials/dc_motor_pi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ T(s) &= \dfrac{P(s)C(s)}{I + P(s)C(s)}
117117
using ControlSystemsBase
118118
# Get sensitivity function
119119
matrices_S,
120-
simplified_sys_S = Blocks.get_sensitivity(
120+
simplified_sys_S = ModelingToolkit.get_sensitivity(
121121
model, :y, op = Dict(unknowns(sys) .=> 0.0))
122122
So = ss(matrices_S...) |> minreal # The output-sensitivity function as a StateSpace system
123123
# Get complementary sensitivity function
124124
matrices_T,
125-
simplified_sys_T = Blocks.get_comp_sensitivity(
125+
simplified_sys_T = ModelingToolkit.get_comp_sensitivity(
126126
model, :y, op = Dict(unknowns(sys) .=> 0.0))
127127
To = ss(matrices_T...)# The output complementary sensitivity function as a StateSpace system
128128
bodeplot([So, To], label = ["S" "T"], plot_title = "Sensitivity functions",
@@ -133,7 +133,7 @@ Similarly, we may compute the loop-transfer function and plot its Nyquist curve
133133

134134
```@example dc_motor_pi
135135
matrices_L,
136-
simplified_sys_L = Blocks.get_looptransfer(
136+
simplified_sys_L = ModelingToolkit.get_looptransfer(
137137
model, :y, op = Dict(unknowns(sys) .=> 0.0))
138138
L = -ss(matrices_L...) # The loop-transfer function as a StateSpace system. The negative sign is to negate the built-in negative feedback
139139
Ms, ωMs = hinfnorm(So) # Compute the peak of the sensitivity function to draw a circle in the Nyquist plot

docs/src/tutorials/input_component.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ using ModelingToolkit
187187
using ModelingToolkit: t_nounits as t, D_nounits as D
188188
using ModelingToolkitStandardLibrary.Blocks
189189
using OrdinaryDiffEq
190+
using OrdinaryDiffEqSDIRK: ImplicitEuler
190191
191192
const rdata = Ref{Vector{Float64}}()
192193

0 commit comments

Comments
 (0)