Skip to content
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

Catalyst issue for remake on SDEProblems (alias_elimination! related?) #3302

Open
TorkelE opened this issue Jan 9, 2025 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@TorkelE
Copy link
Member

TorkelE commented Jan 9, 2025

using Catalyst, StochasticDiffEq
model = @reaction_network begin
    @observables XY ~ X + Y
    (kp,kd), 0 <--> X
    (k1,k2), X <--> Y
end
@unpack XY, X, Y, kp, kd, k1, k2 = model

# Creates problem.
u0_vals = [X => 4, Y => 5]
tspan = (0.0, 10.0)
p_vals = [kp => 1.0, kd => 0.1, k1 => 0.25, k2 => 0.5]
sprob = SDEProblem(model,u0_vals, tspan, p_vals)

# tests remake.
rp = remake(sprob; u0 = [Y => 7])
rp[[X, Y]] == [4, 7] # false (should be true).
rp[X] # -7.0 (!, should be 4.0, X is never changed)
rp[Y] # 7.0 (correct)

@AayushSabharwal have already done some digging, suggesting that it could be caused by a bug in alias_elimination!.

@TorkelE TorkelE added the bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants