SimBiology.RuntimeOptions
R2026bOptions for logged SimBiology quantity components
Description
A SimBiology.RuntimeOptions object contains information on
which species, parameters, or compartments are logged during simulation.
Creation
This object is a property of a Configset object. Use dot notation or get or set to access and modify this object from a
configset object.
Properties
Logged SimBiology quantity components, specified as a
SimBiology.Species, SimBiology.Parameter, or
SimBiology.Compartment object, or a vector of objects. Alternatively,
you can specify the object name or names as a character vector, string scalar, string
vector, or cell array of character vectors.
By default, the software logs all species, all nonconstant compartments, and all nonconstant parameters. For models with equivalence sets, it logs only the resolved quantity from each equivalence set. Nonresolved quantities are excluded.
When you specify quantities by name, use the fully qualified name (that is, the
FullyQualifiedName property) for quantities that belong to child
models. For example, specify a species as
"parentModelName.childModelName.compartmentName.speciesName". If
the model does not contain a hierarchy but multiple species in different compartments
share the same name, use the qualified name instead (that is,
"compartmentName.speciesName").
If you specify a quantity that is in an equivalence set but is not the resolved
quantity, the software throws an error at simulation time. Remove these quantities from
StatesToLog and replace them with their corresponding resolved
quantities.
This property is read-only.
Object type, specified as 'runtimeoptions'. When you create a
SimBiology object, the value of Type is automatically
defined.
Data Types: char
Examples
Load the Lotka-Volterra model.
sbioloadproject lotka;Get the configset object of the lotka model m1.
configset = getconfigset(m1);
Display the list of species whose data are logged by default during the simulation.
configset.RuntimeOptions.StatesToLog
ans = SimBiology Species Array Index: Compartment: Name: Value: Units: ParentModel: 1 unnamed x 1 lotka 2 unnamed y1 900 lotka 3 unnamed y2 900 lotka 4 unnamed z 0 lotka
Suppose you want to log just species y1 and y2 data. You can specify their names as a cell array of strings and set it to StatesToLog property.
configset.RuntimeOptions.StatesToLog = {'y1','y2'};Confirm the setting.
configset.RuntimeOptions.StatesToLog
ans = SimBiology Species Array Index: Compartment: Name: Value: Units: ParentModel: 1 unnamed y1 900 lotka 2 unnamed y2 900 lotka
Alternatively, you can specify an array of species objects (instead of strings) to StatesToLog property.
y1 = m1.Species(2); y2 = m1.Species(3); configset.RuntimeOptions.StatesToLog = [y1, y2];
Simulate and plot the results. Notice that simulation results of only y1 and y2 are plotted.
sbioplot(sbiosimulate(m1));

To reset to the default list, set StatesToLog to a string 'all', which means all species objects, all nonconstant compartment objects and all nonconstant parameter objects are logged by default. A nonconstant compartment or parameter means that its Constant property is set to false.
configset.RuntimeOptions.StatesToLog = 'all';Simulate again. Notice all the species data are plotted.
sbioplot(sbiosimulate(m1));

Do not specify 'all' as a cell string such as {'all'}. If so, SimBiology interprets it as a species named all.
Version History
Introduced in R2006b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)