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
ODEProblem
@variables Y(t) @parameters d p = Y [guess = 1.0] eqs = [D(Y) ~ p - d*Y] @mtkbuild osys = ODESystem(eqs, t) u0 = [Y => 1.0] p = [d => 0.2] oprob = ODEProblem(osys, u0, (0.0, 1.0), p)
In the REPL:
julia> oprob[osys.Y] 1.0 julia> oprob.ps[osys.p] 0.0
This is because while the initialization is trivial:
julia> oprob.f.initialization_data.initializeprob NonlinearProblem with uType Nothing. In-place: true u0: nothing julia> oprob.f.initialization_data.initializeprob.f.sys |> observed 2-element Vector{Equation}: Y(t) ~ 1.0 p ~ Y(t)
MTK doesn't utilize this the way remake does and solve the problem on the spot. We can fix this by simply calling remake(prob) before returning.
remake
remake(prob)
The text was updated successfully, but these errors were encountered:
AayushSabharwal
No branches or pull requests
In the REPL:
This is because while the initialization is trivial:
MTK doesn't utilize this the way
remake
does and solve the problem on the spot. We can fix this by simply callingremake(prob)
before returning.The text was updated successfully, but these errors were encountered: