Both questions make me think of an approximation of the sensitivities using finite differences. But let me start off by saying that SimBiology does not use the finite differences approach because it does not yield very accurate results. Instead, it uses a technique called complex step differentiation. Let me now answer your specific questions:
- The equation of the sensitivities being approximated depends on which normalization has been selected. Typically, it is recommended to use Full Dedimensionalization to make sure all sensitivities are dimensionless and be able to compare them. In this case, it will be . That being said, this equation is approximated by the complex step differentiation technique and the final equation used will differ. More details in #2.
- You can find a nice short description of the algorithm and the final equation in Cleve Moler's blog, whose pioneer work in the 60's laid the groundwork for today's algorithm. Complex step differentiation also requires a step size parameter, which is set to a very small value because complex step differentiation is not only more accurate than finite differences but also more robust with decreasing step size.
Please note that complex step differentiation requires the ODEs to be complex analytic, that is, to be infinitely differentiable in the complex plane.
So, models with
- Nonconstant compartments
- Algebraic rules
- Events
- or nonanalytic functions
are not supported.
In this case, you can run a parameter scan to compute sensitivities with finite differences. For example, by varying parameter values by 5% as you suggested.
I hope this helps.
Best regards,
Jérémy