Hi, I am intrigued by the idea of using the simbiology stochastic solvers for a project that I have so far coded in the idnlgrey framawork.
Some of the ODE right hand sides (ionic fluxes) in my model are given via fitobjects.
My question is: can I use a fit object in simbiology? Or should I figure out an analytical form and use it as a custom reaction rate?
Thanks, Francesco
2 Comments
Time DescendingHi Francesco,
Stochastic solvers have restrictions, you can only use a mass action kinetic law for the reaction rate.
To use with other solvers however, you can write a custom function and call that directly from the reaction rate. So such a fit object could be used. Instead of using a fitting object you can also consider using interpolation with interp1 for example. Fit objects are not supported by model acceleration but interp1 is. Acceleration is relevant if you're running multiple repeated simulations.
There is an example in the documentation with interp1 which might be useful. This example uses an external function that interpolates desired value from a data and calls this function in a repeated assignment rule to determine the value of the quantity in the model: https://www.mathworks.com/help/simbio/examples/simulating-the-glucose-insulin-response.html#insulindemo-12
Functions EndogenousGlucoseProduction and GlucoseAppearanceRate in this model are custom functions.
Fulden