Repository navigation
Give the reduced system its own time span - #181
Merged
ChrisRackauckas merged 2 commits intoSep 7, 2026
Merged
Conversation
Inherit a time span from the source: prob.tspan for the problem method, which is the interval the reduction was trained on, and get_tspan(sys) for the system method. A problem can then be built from the reduced system without repeating one, and the README and tutorial no longer do. A source without a time span still yields a reduced system without one. Requires the tspan field on ModelingToolkit.System, so the compat floor moves to ModelingToolkit 11.42. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Agent-Harness: Claude Code 2.1.263 Agent-Model: claude-opus-5 Agent-Session: https://claude.ai/code/session_01H5RuLDtEazwTKPkNbPeZVu Claude-Session: https://claude.ai/code/session_01H5RuLDtEazwTKPkNbPeZVu
ChrisRackauckas
marked this pull request as ready for review
September 7, 2026 11:08
This was referenced Sep 7, 2026
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.
Ignore this PR until reviewed by @ChrisRackauckas.
Blocked on ModelingToolkit 11.42.0 being released. The compat floor here is
ModelingToolkit = "11.42", which does not exist yet, so CI cannot resolve until SciML/ModelingToolkit.jl#5091 merges and MTK is released. Everything below was verified locally against that branch.Closes the ModelOrderReduction half of #29.
The reduced system now carries its own time span, so a problem can be built from it without repeating one:
Where the span comes from
prob.tspan. That is the interval the reduction was actually trained on, so it is the honest default for the reduced model.get_tspan(sys), inheriting whatever the source system carries.The README and the FitzHugh-Nagumo tutorial drop the now-redundant
full_prob.tspanargument.Background
Systemgained atspanfield in SciML/ModelingToolkit.jl#5085, released as ModelingToolkitBase v1.69.0 (JuliaRegistries/General#167382, merged 10:01Z today). Every time-dependent problem constructor defaults to it. The floor here is MTK 11.42 rather than 11.41 because MTK 11.41 floorsModelingToolkitBase = "1.64", so an 11.41 user can resolve MTKBase 1.68 and not have the field at all; PR 5091 raises that floor to 1.69.Verification
Julia 1.12.7, against local checkouts of ModelingToolkitBase 1.69.0 and the ModelingToolkit 5091 branch.
Behaviour of the four cases, measured directly:
The full Documenter build, with the tutorial now omitting the time span, exits 0.
Runic --check .,typos, andgit diff --checkall exit 0.Not verified
GROUP=QAwas not re-run; this PR adds no public name and changes no import.ModelingToolkitat its floor, which is the whole point of moving the floor to 11.42.Review notes
prob.tspanfor the problem method is a judgement call. The alternative is the source system's own span, which for a MethodOfLines discretization is the PDE'stdomain and usually identical. I went with the problem because that is the interval the snapshots came from, and because a user who solved a sub-interval probably wants the reduced model to describe that sub-interval.test/Project.tomlmoves to 11.42 as well, so the test environment cannot silently resolve an older MTK that lacks the field.🤖 Generated with Claude Code
https://claude.ai/code/session_01H5RuLDtEazwTKPkNbPeZVu