We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When you have vector variables, it seems like remake is not working for several cases:
remake
using ModelingToolkit, OrdinaryDiffEq @variables t (X(t))[1:2] @parameters p[1:2] D = Differential(t) eqs = [ D(X[1]) ~ p[1] - X[1], D(X[2]) ~ p[2] - X[2] ] @mtkbuild osys = ODESystem(eqs, t) u0 = [X[1] => 1.0, X[2] => 2.0] tspan = (0.0, 1.0) ps = [p[1] => 0.1, p[2] => 0.2] oprob = ODEProblem(osys, u0, tspan, ps) oprob_rmk = remake(oprob; u0 = [X => [10.0, 20.0]]) # Errors oprob_rmk = remake(oprob; u0 = [X[1] => 10.0, X[2] => 20.0]) # Errors oprob_rmk = remake(oprob; u0 = [osys.X => [10.0, 20.0]]) # Errors oprob_rmk = remake(oprob; u0 = [osys.X[1] => 10.0, osys.X[2] => 20.0]) # Errors oprob_rmk = remake(oprob; u0 = [:X => [10.0, 20.0]]) # Errors oprob_rmk = remake(oprob; ps = [p => [10.0, 20.0]]) # Works oprob_rmk = remake(oprob; ps = [p[1] => 10.0, p[2] => 20.0]) # Works oprob_rmk = remake(oprob; ps = [osys.p => [10.0, 20.0]]) # Works oprob_rmk = remake(oprob; ps = [osys.p[1] => 10.0, osys.p[2] => 20.0]) # Works oprob_rmk = remake(oprob; ps = [:p => [10.0, 20.0]]) # Works
For parameters it seems fine though.
The text was updated successfully, but these errors were encountered:
I linked the wrong issue 😅
Sorry, something went wrong.
AayushSabharwal
Successfully merging a pull request may close this issue.
When you have vector variables, it seems like
remake
is not working for several cases:For parameters it seems fine though.
The text was updated successfully, but these errors were encountered: