- Model the fluctuations as discrete step changes using events.
- Model the fluctuations as continuous changes to the parameters that are done via a repeated assignment rule that uses a smooth function (for example, an interpolant like interp1) to determine the parameter values. If you use this approach, you may need to set the MaxStep on the configset's SolverOptions to some time scale that is smaller than the frequency of the fluctuations to ensure that the solver "sees" these fluctuations.
Fluctuations in Simbiology
8 views (last 30 days)
Show older comments
Hi,
I try to run a simulation in Simbiology in which a parameter fluctuates during the simulation. I have a few reactions which are not of mass-action type so I can't use the stochastic solver, I believe. How can I simulate with a fluctuating parameter?
Thanks in advance.
Razvan
0 Comments
Accepted Answer
Arthur Goldsipe
on 23 May 2011
Hi Razvan,
I think the answer will ultimately depend on what you know about the fluctuations and what sort of questions you're trying to answer. Can you share more details about why you need to model fluctuations and what the fluctuations represent?
In any case, let me see if I can make some guesses and suggestions for how to model your problem in SimBiology.
Are the fluctuations ultimately due to the presence of a small number of molecules of some species participating in a reaction? If so, can you refine the mechanism of your model so that you can write the model in terms of mass action reactions and events? Then, you would be able to use one of the stochastic solvers. (Note that the ssa solver does support events, if that is helpful.)
If you can find some way to convert all your reactions to mass action kinetics, then you will need to take another approach. However, your question does raise some concerns. If something about the model fluctuates during the simulation, do you think it is reasonable to model the reaction kinetics as ODEs? For example, if the parameters fluctuate slowly relative to the time scale of the reactions, then perhaps it is reasonable to model the reactions with ODEs. Let's assume so for now.
Depending on what you know about the fluctuations, I can suggest two approaches, both of which assume the fluctuations are relatively low frequency:
Let me know if you need more details about any of these approaches.
Good luck!
-Arthur
2 Comments
Arthur Goldsipe
on 24 May 2011
Hi,
Here's an easy way to make an event that adds a random variable to species x every twenty seconds. (My example assumes your model is stored in a variable named m1.)
First, add a non-constant parameter with the first event time:
m1.addparameter('eventTime', 20, 'ConstantValue', 0);
Next, add an event that modifies x AND updates timeOfNextEvent:
m1.addevent('time >= eventTime', {'x = x + (rand-.5)', 'eventTime = eventTime+20'})
-Arthur
More Answers (0)
See Also
Categories
Find more on Perform Sensitivity Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!