How do I set an upper/lower limit for a species in SimBiology 4.3.1 (R2013b)?
9 views (last 30 days)
Show older comments
MathWorks Support Team
on 25 Oct 2013
Answered: MathWorks Support Team
on 25 Oct 2013
I have got a species in my model which I would like to prevent to go above a certain value.
Accepted Answer
MathWorks Support Team
on 25 Oct 2013
In order to detect situations in which the value of a certain species goes above a threshold, you can use events in SimBiology. If you are using the SimBiology Desktop you can find the events in the model tab => tables view => events tab.
Events detect only the situation when the condition was not fullfilled to when the condition is fullfilled. Thus, you need to create two event functions (EventFcns), one to set the species to the value of interest and one to set the reaction producing the species to 0. Without the latter constraint your species will increase after the threshold is reached as the attached example illustrates.
This is a radio decay model which contains two events: The event "z above threshold and c=0*c" illustrates the behaviour of z if a threshold is set and the producing reaction set to 0 while in the event "z above threshold" the latter is missing.
0 Comments
More Answers (0)
See Also
Categories
Find more on Import Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!