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

remake not working for Symbol + array variable (u0 only, p is fine) #3281

Open
TorkelE opened this issue Dec 19, 2024 · 2 comments
Open

remake not working for Symbol + array variable (u0 only, p is fine) #3281

TorkelE opened this issue Dec 19, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@TorkelE
Copy link
Member

TorkelE commented Dec 19, 2024

using Catalyst, OrdinaryDiffEq

rn = @reaction_network begin
    @parameters k[1:2]
    @species X(t)[1:2]
    (k[1], k[2]), X[1] <--> X[2]
end

u0_symvar = [rn.X => [1.0, 2.0]]
ps_symvar = [rn.k => [2.0, 3.0]]
u0_symb = [:X => [1.0, 2.0]]
ps_symb = [:k => [2.0, 3.0]]

ODEProblem(rn, u0_symvar, (0.0, 1.0), ps_symvar) # Works. 
ODEProblem(rn, u0_symvar, (0.0, 1.0), ps_symb) # Works.
ODEProblem(rn, u0_symb, (0.0, 1.0), ps_symvar) # Works.
ODEProblem(rn, u0_symb, (0.0, 1.0), ps_symb) # Works.

oprob = ODEProblem(rn, u0_symvar, (0.0, 1.0), ps_symvar)
remake(oprob; u0 = u0_symb) # ERROR: KeyError: key 1:2 not found
remake(oprob; u0 = u0_symvar) # Works.
remake(oprob; p = ps_symvar) # Works.
remake(oprob; p = ps_symb) # Works.
@TorkelE TorkelE added the bug Something isn't working label Dec 19, 2024
@isaacsas
Copy link
Member

Probably this should be in ModelingToolkit or SciMLBase and not Catalyst?

@ChrisRackauckas ChrisRackauckas transferred this issue from SciML/Catalyst.jl Dec 19, 2024
@ChrisRackauckas
Copy link
Member

Yeah, just moved to MTK. Should just be a simple bugfix, I assigned @AayushSabharwal on that.

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

4 participants