Jump species quantity then stay constant

31 次查看(过去 30 天)
Ji
Ji 2024-11-20,16:20
回答: Ji 2024-11-21,14:08
Hi,
In simbiology design app, is there a way to define a species like a step fucntion so that it increases to a constant after a specific time point? I tried to use 'events' to trigger a species increase after a time piont, but the species is not a constant and changed during reactions. I also tried to 'dose', which behaved same as 'event' triggered species increase.
There are examples of codes where a user defined function was used in conjunction with repeated assignments. However, in design app, code can't seem to be edited.
Thank you very much!
-Ji

回答(2 个)

Arthur Goldsipe
Arthur Goldsipe 2024-11-20,21:23
I don't yet understand what your goal is. Can you provide more details on what behavior you want? A concrete example illustrating the desired behavior would be most helpful.
In general, step changes can and should be implemented using events. You mention that you tried using events, "but the species is not a constant changed during reactions." Does that mean you don't want the species to be affected by the reaction at all? If that's the issue you could either remove the species from the reaction or set the BoundaryCondition property to true.
-Arthur
  2 个评论
Ji
Ji 2024-11-20,21:57
Hi Authur,
Thanks for the response!
I would like my species to be 0 before time = t0, and constantly 1 after time >= t0. An example would be to look at the effects of a long halflife inhibitor on enzyme activities so the total amout of inhibitor is approximately a constant after dosing.
Does BoundaryCondition allow time dependence?
Ji
Arthur Goldsipe
Arthur Goldsipe 2024-11-20,22:26
Setting the Constant property to false is what allows a species to be time-dependent. You normally don't have to set this property because the defualt value is false for species.
Setting BoundaryCondition to true tells SimBiology to ignore reactions that a species participates in when determining the dynamics of that species.
So if I understand your question, you can just do the following:
  • Set the initial value of your species to 0.
  • Add an event with the trigger "time >= t0" and the transition function "species = 1".
  • Optionally, set BoundaryCondition of species to true. (This is only required if the species is a reactant or product of a reaction.)

请先登录,再进行评论。


Ji
Ji 2024-11-21,14:08
Thank you very much Authur! Setting BoundaryCondition did the trick!

类别

Help CenterFile Exchange 中查找有关 Extend Modeling Environment 的更多信息

标签

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by