Repository navigation
Document unbound_inputs as the fallback for discovering an input - #5090
Merged
ChrisRackauckas merged 1 commit intoSep 7, 2026
Merged
Conversation
The interactive-integrator page tells you to name the input variable to `mtkcompile`, which assumes you know which variable carries the external signal. For a model you did not build, or one assembled programmatically, that is the part you are missing. `unbound_inputs` reports the input variables the connection structure leaves external, and its result can be passed straight to `mtkcompile`. Follow-up to SciML#5087. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam
ChrisRackauckas
marked this pull request as ready for review
September 7, 2026 09:43
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.
What changed and why
#5087 tells you to name the input variable
to
mtkcompile, which assumes you already know which variable carries the external signal.For a model you did not build, or one assembled programmatically, that is exactly the part
you are missing.
unbound_inputsreports the input variables the connection structureleaves external, and its result can be passed straight to
mtkcompile:Fifteen lines added to
docs/src/examples/interactive_simulation.md, plusunbound_inputsin that example's import line. No code changes.
Verification
The page uses plain ```julia fences, so Documenter does not execute them. The snippet was
run by hand against ModelingToolkit 11.41.0 and ModelingToolkitStandardLibrary, on the same
mass-spring-damper model the surrounding section already uses:
so the discovered name compiles, drives through
integrator.ps[...]andstep!, and thesolve completes.
typosclean.What I did not verify, and one thing a reviewer should weigh
I did not get a clean full docs build for this branch. My local run hit pre-existing
failures in
docs/src/tutorials/bifurcation_diagram_computation.md, an unrelated page, so Istopped it. This PR touches one markdown file and adds no executed block, but CI is the real
check here.
More importantly — this describes behaviour that
#5089 changes. As of current master,
unbound_inputsreturns[force₊f₊u(t)]for this model, so the page is accurate today.#5089 makes namespace nesting segment-aware, and with it this same call returns
[],because the
Forcecase works on master only through a string-prefix collision(
"force₊flange"vs"force₊f"). The underlying semantics question is tracked in#5088.
So this page and #5089 must not land independently: if #5089 merges first, this section
needs rewriting to whatever discovery mechanism replaces it, and if this merges first the
docs go stale the moment #5089 does. Sequencing is the reviewer's call — I am opening it now
on request rather than holding it behind #5088 as I had originally planned.
This PR should be ignored until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code
https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam