How can I define a time-dependent reaction rate for an SIR model in Simbiology

2 views (last 30 days)
I am trying to create an SIR model in Simbiology. I input my SIR as species and then define parameters. But the problem is one of my reaction rates is periodic and depends on time. I keep getting the error "Error evaluating reaction rate (from reaction Infectm) at t=0.0000." I'm also a little unsure of the kinetic laws I should be applying for the reactions. I believe I->R should be mass action, but am unsure of the other ones. If anyone has any insight or suggestions that they think would be helpful I would greatly appreciate it.
Thanks!

Answers (1)

Ingrid Tigges
Ingrid Tigges on 2 Mar 2015
Hello Nicolas,
You can use rate rules to define parameters that are dependent on time. This link of the documentation explains you how to use rate rules: Create a Rate Rule for a Constant Rate of Change While this documentation page talks about species being rate dependent you can also use the same approach for parameters. It is important that the tick for constant is not set in these cases. Attached you can find a very basic example with a parameter being dependent on time which is based on the above documentation page. Does this help?
What are your problems with understanding the kinetic laws to use?
  2 Comments
Alberto  Merchante
Alberto Merchante on 20 Sep 2016
Dear Ingrid, I have a similar problem I cannot fix: I want to make a function dependent on the values of another function at previous time, for example f2(t) = f1(t-5)
That is a very simple example which could be solved otherwise, but the idea is, to have as variables at a simulation time t2, the values of other variables at earlier time t1 Thanks so much!
Best wishes, Alberto
Arthur Goldsipe
Arthur Goldsipe on 21 Sep 2016
Hi Alberto,
SimBiology does not directly support this kind of model. It requires use of a special solver for delayed differential equations.
If you have additional questions, I suggest making a new MATLAB Answers post. That will help other people find your question more easily.
-Arthur

Sign in to comment.

Communities

More Answers in the  SimBiology Community

Categories

Find more on Scan Parameter Ranges 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!