Repository navigation
Accept inputs represented by time-independent parameters in the initialization system - #5227
Merged
Merged
Conversation
…alization system `generate_initializesystem_timevarying` matched the registered inputs of a system as `Term`s only, so a system whose inputs are time-independent parameters threw a `MatchError` when its `ODEProblem` was constructed. Such inputs are now classified as parameters of the initialization system. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QBgBrXDidWG1G2KF64gAte
Contributor
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Contributor
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
|
AayushSabharwal
approved these changes
Sep 29, 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.
Split out of #5173.
Summary
generate_initializesystem_timevaryingclassifies the registered inputs of a system as parameters of the initialization system. It matchedTerms only, on the assumption that every input is originally a variable, so a system whose registered inputs are time-independent parameters (System(eqs, t; inputs = [p])with@parameters p, or a compiled system in which such parameters represent inputs) threw aMatchErrorwhen itsODEProblemwas constructed. Such inputs are now classified as parameters of the initialization system.Tests
A regression test constructs
ODEProblems for a system with a parameter registered as input, with and without initialization equations.🤖 Generated with Claude Code
https://claude.ai/code/session_01QBgBrXDidWG1G2KF64gAte