Regeneration of the compiled code of an IQRmodel

Needed in case a model object has been saved and loaded again to ensure that the model is compiled and executable. Also allows to set other properties. Takes the model and regenerates the simulation functions, including compilation and attempts to calculate the symbolic equations for df/dx, df/dp, dg/dx, dg/dp. Parameter names can be passed to indicate which parameters should be in scope for sensitivity equations, symbolic, etc.

regenerate_IQRmodel(model, FLAGsim = TRUE, FLAGsym = TRUE, sensParams = NULL)

Arguments

model

IQRmodel object to regenerate

FLAGsim

TRUE: the IQRmodel is prepared for simulation. This means that all required simulation related functions will be generated and the model will be compiled.

FLAGsym

If set to FALSE then no symbolic information will be generated for a model. If set to TRUE (default) then state jacobian, state/parameter, output/state and output/parameter derivatives will attempted to be generated symbolically and attached to the model if successful.

sensParams

Vector with parameter names for which sensitivities can be calculated for all state variables. This input argument is added here but it can also be changed afterwards in other functions that need the sensitivities.

Value

The updated/regenerated IQRmodel object