Conversation
The `extend` function was not properly merging `brownians`, `poissonians`, and `jumps` fields when combining two systems. These fields are now unioned and passed to the System constructor. Fixes SciML#4267 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When extending systems without an independent variable (e.g., NonlinearSystem), the args tuple was incorrectly constructed as (eqs, sts, ps, brs) which matched the main System constructor signature with sts being interpreted as iv. This fix explicitly passes nothing for iv in the no-iv case to correctly match the System(eqs, nothing, dvs, ps, brownians; ...) constructor path. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
|
@AayushSabharwal I think this is good too now. Thanks! |
AayushSabharwal
approved these changes
Feb 6, 2026
Member
Author
|
Thanks! If we could get a release when you have a chance that would be great. |
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
Fixes #4267
The
extendfunction was not properly mergingbrownians,poissonians, andjumpsfields when combining two systems. These fields were simply lost because they weren't being unioned or passed to the System constructor.Changes
lib/ModelingToolkitBase/src/systems/abstractsystem.jlbrowniansfrom both systems (passed as positional arg)poissoniansfrom both systems (passed as kwarg)jumpsfrom both systems (passed as kwarg)Test Coverage
New test file
extend_sde_jump.jlwith comprehensive tests:sysvalues preferred overbasesysfor initial conditions