docs: namespace MTK analysis-point helpers and import ImplicitEuler#449
Merged
ChrisRackauckas merged 1 commit intoMay 1, 2026
Merged
Conversation
After SciML#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>
2 tasks
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/ModelingToolkitStandardLibrary.jl
that referenced
this pull request
May 1, 2026
After the v7 import fixes (SciML#445) and docs fixes (SciML#448, SciML#449), several Tests jobs hit `ExtraVariablesSystemException` from MTK 11's stricter mtkcompile balance check. The dangling variables aren't bugs in the test models — they're sensor / output connectors that the test never consumes — so mark them as `outputs=` (excluded from the balance check) or pass `fully_determined=false`: - `test/Blocks/utils.jl` "SISO Check": `outputs = [so.output.u]` - `test/Thermal/thermal.jl` "Heat flow system": `outputs = [mass1.T, hf_sensor2.port_b.Q_flow]` - `test/Mechanical/rotational.jl` "sensors": `fully_determined=false` (11 dangling sensor variables make an `outputs=` listing impractical) - `test/Mechanical/translational.jl` "AccelerationSensor": `mtkcompile(sys; fully_determined = false)` Two further test failures are upstream-only and not addressed here: - `test/Blocks/sources.jl` BSplineInterpolation / Initialization: SymbolicUtils `MethodError: fntype_X_Y(::Type{Real})` from `promote_symtype` when MTK substitutes through a callable parameter of a `ParametrizedInterpolation`. Needs a SymbolicUtils fix. - `test/Blocks/test_analysis_points.jl` `get_looptransfer`: MTK initialization rejects with "Cyclic guesses detected" inside `varmap_to_vars`. Needs an MTK fix or explicit `missing_guess_value`. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/ModelingToolkitStandardLibrary.jl
that referenced
this pull request
May 1, 2026
After the v7 import fixes (SciML#445) and docs fixes (SciML#448, SciML#449), several Tests jobs hit `ExtraVariablesSystemException` from MTK 11's stricter mtkcompile balance check. The dangling variables aren't bugs in the test models — they're sensor / output connectors the test never feeds back, so semantically they're outputs. Declare them via `outputs=` so mtkcompile excludes them from the balance check (no `fully_determined=false`, no skipped tests): - `test/Blocks/utils.jl` "SISO Check": `outputs = [so.output.u]`. - `test/Thermal/thermal.jl` "Heat flow system": `outputs = [mass1.T, hf_sensor2.port_b.Q_flow]`. - `test/Mechanical/rotational.jl` "sensors": switch from `@mtkcompile` to `@named model = Sensors(); sys = mtkcompile(model; outputs = [...])` listing the 11 dangling sensor/connector variables. - `test/Mechanical/translational.jl` "AccelerationSensor": `outputs = [mass.v, mass.flange.s]`. Two further test failures remain on this PR (intentionally — not disabled, not skipped) and are upstream-blocked: - `test/Blocks/sources.jl` BSplineInterpolation / Initialization: SymbolicUtils `MethodError: fntype_X_Y(::Type{Real})` from `promote_symtype` when MTK substitutes through a callable parameter of a `ParametrizedInterpolation`. Root cause is in SymbolicUtils (and/or the `(interpolator::interp_type)(..)::eltype(u)` declaration in `src/Blocks/sources.jl`). - `test/Blocks/test_analysis_points.jl` `get_looptransfer`: MTK initialization rejects with "Cyclic guesses detected" inside `varmap_to_vars`. Needs an MTK fix or an explicit `missing_guess_value`. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #448. Unblocking the `connections.md` operating_point error surfaced two more independent docs build failures on `main`:
`docs/src/tutorials/dc_motor_pi.md` uses `Blocks.get_sensitivity`, `Blocks.get_comp_sensitivity`, and `Blocks.get_looptransfer`. Those helpers were moved out of `ModelingToolkitStandardLibrary.Blocks` into `ModelingToolkit` proper. Update the calls to `ModelingToolkit.get_sensitivity` / `ModelingToolkit.get_comp_sensitivity` / `ModelingToolkit.get_looptransfer`.
`docs/src/tutorials/input_component.md` `custom_component_external_data` example calls `solve(prob, ImplicitEuler())`, but `OrdinaryDiffEq` v7 no longer re-exports `ImplicitEuler` (same narrowed-export pattern as the other solvers in Bump compat for OrdinaryDiffEq v7 / SciMLBase v3 ecosystem #445). Add `using OrdinaryDiffEqSDIRK: ImplicitEuler`.
Remaining docs failures (not in this PR)
Test plan