Using splines and other data-driven function as rates

Francesco on 11 Jun 2019
Latest activity Reply by Francesco on 14 Jun 2019

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

Fulden Buyukozturk
Fulden Buyukozturk on 13 Jun 2019 (Edited on 13 Jun 2019)

Hi 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

Francesco
Francesco on 14 Jun 2019

Great, thank you - this is very informative. Francesco

Tags

No tags entered yet.