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

Add a remake! function #93

Open
sjdaines opened this issue May 21, 2023 · 0 comments
Open

Add a remake! function #93

sjdaines opened this issue May 21, 2023 · 0 comments

Comments

@sjdaines
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant