Store alternate component values
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.
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 get and set commands to list object properties and change their values at the command line. You can graphically change object properties in the graphical user interface.
|sbiovariant||Construct variant object|
Methods for variant objects
|addcontent (variant)||Append content to variant object|
|commit (variant)||Commit variant contents to model|
|copyobj (any object)||Copy SimBiology object and its children|
|delete (any object)||Delete SimBiology object|
|display (any object)||Display summary of SimBiology object|
|get (any object)||Get object properties|
|rmcontent (variant)||Remove contents from variant object|
|set (any object)||Set object properties|
|verify (model, variant)||Validate and verify SimBiology model|
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|