Issue with SimBiology - parameters from valid .sbproj not loading

조회 수: 1 (최근 30일)
emjey
emjey 2019년 8월 22일
답변: Arthur Goldsipe 2019년 8월 22일
Hi, I am having an issue pertaining to some *.sbproj models. See for example the attached simple Lotka model version.
While the general model information indicates that there are 3 parameters, 4 reactions, 4 species etc.
SimBiology Model - lotka
Model Components:
Compartments: 1
Events: 0
Parameters: 3
Reactions: 3
Rules: 0
Species: 4
the following commands
m1.Reactions
m1.Parameters
m1.Species
result in display of reactions and species arrays only
SimBiology Reaction Array
Index: Reaction:
1 x + y1 -> 2 y1 + x
2 y1 + y2 -> 2 y2
3 y2 -> z
ans =
0×1 empty double column vector
SimBiology Species Array
Index: Compartment: Name: InitialAmount: InitialAmountUnits:
1 unnamed x 1
2 unnamed y1 900
3 unnamed y2 900
4 unnamed z 0
The parameter array is empty!
What is wrong with the attached 'lotka.sbproj' file? Strangly enough the simulation runs just fine producing the expected results. I attach the simulation script as well.
Any comments would be very appreciated. M

채택된 답변

Arthur Goldsipe
Arthur Goldsipe 2019년 8월 22일
As described here, parameters can be scoped to either the model or to a reaction. The display counts both scopes of parameters, but the model's Parameters property only lists model-scoped parameters. I agree that this difference is quite confusing! But there is a way to programatically get all parameters on a model using sbioselect:
allParameters = sbioselect(m1, 'Type', 'parameter')
-Arthur

추가 답변 (1개)

emjey
emjey 2019년 8월 22일
OK, problem solved.
This is to me a bug in the display of parameters - only those parameters which are visible on the diagram are also displayed as the 'Parameter Array'! (Unless of course I did something wrong and there is a way to find out all model parameters and display them.)
It would be useful this to be fixed as otherwiser one cannot programatically find out all the model parameters, using m1.Parameters, and e.g. assgn different values to them.

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by