Variant object
Store alternate component values
Description
The SimBiology® variant object stores the names and values
of model components and allows you to use the values stored in a variant
object as the alternate value to be applied during a simulation. You
can store values for species InitialAmount
,
parameter Value
, and compartment Capacity
in a variant object. Simulating
using a variant does not alter the model component values. The values
specified in the variant temporarily apply during simulation.
Using one or more variant objects associated with a model allows
you to evaluate model behavior during simulation, with different values
for the various model components without having to search and replace
these values, or having to create additional models with these values.
If you determine that the values in a variant object accurately define
your model, you can permanently replace the values in your model with
the values stored in the variant object, using the commit
method.
To use a variant in a simulation you must add the variant object
to the model object and set the Active
property
of the variant to true. Set the Active
property
to true if you always want the variant to be applied before simulating
the model. You can also enter the variant object as an argument to sbiosimulate
; this applies the variant
only for the current simulation and supersedes any active variant
objects on the model.
Warning
The Active
property of the Variant object
will be removed in a future
release. Explicitly specify a variant or an array of variants as an
input argument when you simulate a model using sbiosimulate
.
When there are multiple active variant objects on a model, if
there are duplicate specifications for a property's value, the last
occurrence for the property value in the array of variants, is used
during simulation. You can find out which variant is applied last
by looking at the indices of the variant objects stored on the model.
Similarly, in the Content
property, if there are
duplicate specifications for a property's value, the last occurrence
for the property in the Content
property, is used
during simulation.
Use the addcontent
method
to append contents to a variant object.
See Property Summary for
links to species property reference pages. Properties define the characteristics
of an object. Use the
and get
commands to list object
properties and change their values at the command line. You can graphically
change object properties in the graphical user interface. set
Constructor Summary
sbiovariant | Construct variant object |
Method Summary
Methods for variant objects
addcontent (variant) | Append content to variant object |
commit (variant) | Commit variant contents to model |
copyobj | Copy SimBiology object and its children |
delete | Delete SimBiology object |
display | Display summary of SimBiology object |
get | Get SimBiology object properties |
rename | Rename object and update expressions |
rmcontent (variant) | Remove contents from variant object |
set | Set SimBiology object properties |
verify (model, variant) | Validate and verify SimBiology model |
Property Summary
Properties for variant objects
Active | Indicate object in use during simulation |
Content | Contents of variant object |
Name | Specify name of object |
Notes | HTML text describing SimBiology object |
Parent | Indicate parent object |
Tag | Specify label for SimBiology object |
Type | Display SimBiology object type |
UserData | Specify data to associate with object |
Version History
Introduced in R2008a