Simbiology: using a dummy species to fit data to a sum of real species with sbiofit

조회 수: 1 (최근 30일)
Hello,
Let's say I have a model with two species:
addspecies('compartment1',s1,'InitialAmount',100,'InitialAmountUnits','nanomole')
addspecies('compartment1',s2,'InitialAmount',50,'InitialAmountUnits','nanomole')
and now I am trying to fit a trace 'DATA' to the sum of these two species using sbiofit. I thought I could simply do this in two steps:
1) add a dummy species to track the sum
addspecies('compartment1',sDummy,'InitialAmount',0,'InitialAmountUnits','nanomole')
addrule(model,'sDummy = compartment1.s1 + compartment1.s2')
2) and then in my sbiofit, do a responseMap as follows to map the sum to my data:
responseMap = {'sDummy = DATA'};
However, I can't even get past step 1. Every time I add my sDummy species to the model and add that rule, it simply zeros out species1 and species2, it's very bizarre.
My questions are:
  • Does adding a dummy species work the way I have described above, or is my conception of using addrule to do that wrong to begin with?
  • is there a better way altogether to fit my data to a sum of species?

채택된 답변

Arthur Goldsipe
Arthur Goldsipe 2018년 10월 29일
I think your idea is reasonable. I believe the problem is with the rule you added. As written, addrule adds an initial assignment rule to the model, which is only evaluated at time=0. If you want the rule to be in effect at all times, then you need to create a repeated assignment rule. You can do that by changing the line of code to the following:
addrule(model,'sDummy = compartment1.s1 + compartment1.s2', 'repeatedAssignment');
If that doesn't solve the problem, let us know here.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by