- Define a reation rate rate1, rate2, rate3, ... for each of the phases you describe.
- Add dummy (phase-indicator) parameters phase1, phase2, phase3, ... to your model. The initial value of phase1 should be 1, all other parameters should have an initial value of 0.
- Add SimBiology Events to switch between different phases.
Time-dependent Growth Rate of Species in Model
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I'm trying to implement in Simbiology the model of a system which describes the kinetics of many species. The kinetics of one these species is non-standard in that it's change rate is time dependent with different kinetics in three different periods. In the first period, which occurs in the first five days, the species is able to distribute from its initial compartment to another at a fixed rate. Following the distribution of the species into the second compartment, in the second period which occurs for the next seven days, the species grows at a fixed constant rate. Finally, for the next seven days during the third period, the species decays at a fixed constant rate. Thus, if I'm not mistaken, the species has a time-dependent growth rate that can be described as a step function in time with changes in time = 5, 12, and 19 days. Is there a way implement these kinetics using Simbiology?
Many thanks in advance for any suggestions or comments.
댓글 수: 0
채택된 답변
Florian Augustin
2022년 6월 15일
Hi Marco,
you may be able to use SimBiology Events to switch between reaction rates. The general idea would be as follows:
Below is an example using SimBiology on the MATLAB Command Window. Dependent on your actual rates you may be able to condense/rewrite the events; you may not even need the phase-indicator parameters. But I hope this demonstrates how you could achieve different reation rates in different time intervals.
% Define model
model = sbiomodel("time-dependent reaction rates");
addspecies(model, "A", 10);
addparameter(model, "k", 1, "Constant", false);
% Add phase-indicator (dummy) parameters:
addparameter(model, "phase1", 1, "Constant", false);
addparameter(model, "phase2", 0, "Constant", false);
addparameter(model, "phase3", 0, "Constant", false);
% Define reaction rate: here I am using rate1 = k*A, rate2 = -k, rate3 = -k*A as an example.
reaction = addreaction(model, "A -> null");
reaction.ReactionRate = "phase1*k*A - phase2*k - phase3*k*A";
% Add events to switch between phases:
addevent(model, "time >= 5" , ["phase1 = 0", "phase2 = 1", "k = 0.1"]);
addevent(model, "time >= 12", ["phase2 = 0", "phase3 = 1", "k = 0.4"]);
% Simulate model
configset = getconfigset(model);
configset.StopTime = 19;
configset.RuntimeOptions.StatesToLog = "A";
simData = sbiosimulate(model);
% Plot results
sbioplot(simData)
Best,
Florian
댓글 수: 9
Florian Augustin
2022년 7월 29일
Hi Marco,
attached is an sbproj file with the example above. The project is compatible with MATLAB version R2020b and later. I hope this helps you to get started.
Best,
Florian
추가 답변 (0개)
커뮤니티
더 많은 답변 보기: SimBiology Community
참고 항목
카테고리
Help Center 및 File Exchange에서 Import Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!