Restore Initial-dependent parameter guess resolution#4731
Restore Initial-dependent parameter guess resolution#4731ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
|
Investigation checkpoint for this commit:
The ReleaseTest failure is separate: released Catalyst v16.2.1 contains a stale |
e83376c to
71a27e2
Compare
|
CI checkpoint after the rebase:
No observed failure points to the Initial-dependent guess substitution change, and no tests were skipped, silenced, or loosened. |
|
This is not the correct fix. The issue is that calling |
Pass `filterer = Symbolics.FPSubFilterer{Nothing}()` to the `IRSubstituter`
used in `evaluate_varmap!` so substitution descends into operator calls such
as `Initial`, matching the generic `fixpoint_sub` path. The default IR filterer
treats operators as atomic, which left `Initial`-dependent parameter guesses
unresolved (regression introduced in SciML#4674, ModelingToolkitBase v1.48.1).
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
71a27e2 to
5cb0374
Compare
|
Thanks @AayushSabharwal — you're right, the fallback approach was papering over the wrong filterer. Updated to pass Verified locally on Julia 1.12.4 against dev'd ModelingToolkitBase (Symbolics 7.24 / SymbolicUtils resolved):
|
|
#4704 will fix this, so I'm closing the PR |
This PR should be ignored until reviewed by @ChrisRackauckas.
Summary
Initial(X1 + X2).Root cause
ModelingToolkitBase v1.48.1 introduced the specialized
IRStructure/IRSubstituterpath in #4674.IRSubstituteruses a filter that treatsSymbolics.Operatorcalls such asInitialas atomic, while the prior genericfixpoint_subpath descends into those calls. As a result, anInitial-dependent parameter guess could remain symbolic and later fall back to a placeholder value.For Catalyst systems with eliminated conserved species, that stored
Γ = 1instead of3and made the corresponding observed species0instead of2. The regression boundary is ModelingToolkitBase 1.48.0 (correct) to 1.48.1 (incorrect); see #4721.The fallback only runs when the IR result is still symbolic, so fully resolved values retain the specialized fast path.
Validation
X2 stored = 2.0,Gamma stored = 3.0X2 stored = 0.0,Gamma stored = 1.0X2 stored = 2.0Gamma stored = 3.0GROUP=Initialization julia +1.12 --project=. -e 'using Pkg; Pkg.test(; coverage=false)', isolated depot, exit 0:Initialization | 795 passed, 12 broken, 807 totalModelingToolkit tests passedGROUP=Modeling, isolated depot, exit 0:Conservation Laws | 250 passed, 17 broken, 267 totalCatalyst tests passedConservation Laws | 242 passed, 8 failed, 17 broken, 267 totalRunic --check ., exit 0.git diff --check, exit 0.Related downstream workaround: SciML/Catalyst.jl#1506. The separate released-Catalyst stale
@test_brokenfailure is already fixed by SciML/Catalyst.jl#1495 and requires a Catalyst release.