-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix downstream indexing tests #2927
Merged
ChrisRackauckas
merged 8 commits into
SciML:master
from
AayushSabharwal:as/fix-indexing-ci
Aug 6, 2024
Merged
fix: fix downstream indexing tests #2927
ChrisRackauckas
merged 8 commits into
SciML:master
from
AayushSabharwal:as/fix-indexing-ci
Aug 6, 2024
Conversation
This file contains 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
This is good to go, SciMLBase Downstream CI passes locally. It fails here because for some reason it's not using this branch of MTK |
MWE for bug in using SymbolicIndexingInterface
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
function make_sys1()
@parameters p1=0.5 [tunable = true] (p23[1:2]=[1, 3.0]) [tunable = true] p4=3 * p1 [tunable = false] y0=1.2 [tunable = true]
@variables x(t)=2p1 y(t)=y0 z(t)=x + y
eqs = [D(x) ~ p1 * x - p23[1] * x * y
D(y) ~ -p23[2] * y + p4 * x * y
z ~ x + y]
structural_simplify(complete(ODESystem(eqs, t, tspan = (0, 3.0), name = :sys)))
end
function make_sys2()
@parameters p1=1 [tunable = false] (p23[1:2]=[1, 3.0]) [tunable = true] p4=3 * p1
@variables x(t)=2 * p1 y(t)=0.2 z(t)
eqs = [D(x) ~ p1 * x - p23[1] * x * y
D(y) ~ -p23[2] * y + p4 * x * y
z ~ x + y]
structural_simplify(complete(ODESystem(eqs, t, tspan = (0, 3.0), name = :sys)))
end
sys1 = make_sys1()
sys2 = make_sys2()
prob1 = ODEProblem(sys1, [sys1.p23 => [2, 4.0]])
prob2 = ODEProblem(sys2, [sys2.p1 => 2.0])
bi = BatchedInterface((prob1, [sys2.p1, sys1.p23]))
param_getter = getu(bi)
param_getter(prob1, prob2) gives
|
The error above is fixed by this PR |
ChrisRackauckas
approved these changes
Aug 6, 2024
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.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Add any other context about the problem here.