There should be a convenience function remake! that allows parameters and variable attribute (eg initial_value) to be modified and the model/modeldata instances to be reused without needing to recreate from the .yaml file.
"""
remake!(model, modeldata)
Reinitialize after updating Parameters or Variable attributes
""""
function remake!(model, modeldata)
# Reinitialise Reactions and non-state Variables
PB.dispatch_setup(model, :setup, modeldata)
# Reinitialise constant, state variables etc
dispatch_setup(model, :initial_value, modeldata)
return nothing
end
There should be a convenience function
remake!
that allows parameters and variable attribute (eginitial_value
) to be modified and the model/modeldata instances to be reused without needing to recreate from the .yaml file.