A variant object represents a variant, which is an alternate value for a compartment, species, or parameter in a model. You can apply this alternate value during a simulation, which lets you evaluate model behavior with a different value, without having to search and replace the value, or create an additional model with the new value.
You can use a variant to store an alternate value for any of the following:
The alternate value applies temporarily, only during a simulation, and does not alter the model's values permanently. If you determine that the values in a variant accurately define your model, you can permanently replace the values in your model with the values stored in the variant object by using the commit method.
Create a variant object and add it to a model using the addvariant method.
(Optional) Set the Active property of the variant object to true if you always want the variant to be applied before simulating the model.
Enter the model and variant object as input arguments to sbiosimulate. This applies the variant only for the current simulation and supersedes any active variant objects on the model.
If you followed step 2, simply call sbiosimulate on the model object to apply the variant.
For an example of creating and using a variant in a model, see Simulate Biological Variability of the Yeast G Protein Cycle Using the Wild-Type and Mutant Strains.
|For information about...||See...|
|Creating and adding a variant to a model||addvariant|
|Creating a stand-alone variant||sbiovariant|
|Methods and properties of a variant||Variant object|
|Appending contents to variants||addcontent|
|Replacing model values permanently with values from a variant||commit|
When you use multiple variants during a simulation, and 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.
If you specify variants as arguments to sbiosimulate, this applies the variants for the current simulation in the order that they are specified, and supersedes any active variant objects on the model.
Similarly, in the variant contents (Content property), if there are duplicate specifications for a property's value, the last occurrence for the property in the contents is used during simulation.