You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of linearize uses ForwardDiff, which often works fine. However, models with discontinuities and saturation are sometimes better linearized with finite differences, with a relatively large perturbation size, (or even better, with stochastic linearization). It would be nice to allow the user to select exactly how the model is linearized, and if using finite-differences, the perturbation size for each variable. For input variables this would be straightforward to support, but for state variables less so since the state is not always known at the time of the call to linearize. A two-step approach could be okay, where the user first calls linearize and obtains the state realization, after which the perturbation sizes can be tuned. Alternatively, one could specify perturbation size for any desired variables, and the initialization system could be used to translate those sizes into whatever state realization is selected.
I notice that the AutoFiniteDiff backend from ADTypes has options for relative step size, this could perhaps be good enough in some situations
The text was updated successfully, but these errors were encountered:
The current implementation of
linearize
uses ForwardDiff, which often works fine. However, models with discontinuities and saturation are sometimes better linearized with finite differences, with a relatively large perturbation size, (or even better, with stochastic linearization). It would be nice to allow the user to select exactly how the model is linearized, and if using finite-differences, the perturbation size for each variable. For input variables this would be straightforward to support, but for state variables less so since the state is not always known at the time of the call tolinearize
. A two-step approach could be okay, where the user first callslinearize
and obtains the state realization, after which the perturbation sizes can be tuned. Alternatively, one could specify perturbation size for any desired variables, and the initialization system could be used to translate those sizes into whatever state realization is selected.I notice that the
AutoFiniteDiff
backend from ADTypes has options for relative step size, this could perhaps be good enough in some situationsThe text was updated successfully, but these errors were encountered: