SciML / Catalyst.jl

Chemical reaction network and systems biology interface for scientific machine learning (SciML). High performance, GPU-parallelized, and O(1) solvers in open source software.
https://docs.sciml.ai/Catalyst/stable/
Other
464 stars 78 forks source link

no longer assume that prob.p is the correct parameters for a problem lacking callbacks and DAEs #1087

Open isaacsas opened 1 month ago

isaacsas commented 1 month ago

Per the discussion in https://github.com/SciML/ModelingToolkit.jl/issues/2733 parameters may not always get updated for non-DAE models anymore until integrator initialization. We should therefore no longer assume prob.p are updated and correct parameters associated with the prob. I think this is a potential issue in some of the extensions that needs to be checked and updated.

isaacsas commented 1 month ago

This probably impacts tests in a number of places too.

ChrisRackauckas commented 4 weeks ago

Just to be clear, "no longer" - this change happened in 2017. It is for example a very essential feature in Pumas that parameters are updated in the callback initialization, which can do all sorts of things like add tstops the user may have forgotten https://github.com/SciML/DiffEqCallbacks.jl/blob/master/src/iterative_and_periodic.jl#L163-L169, project the initial state (and all subsequent states) onto a manifold https://github.com/SciML/DiffEqCallbacks.jl/blob/master/src/manifold.jl#L118-L139, etc. So it could not necessarily be assumed even before Catalyst was created.