| SimBiology® | ![]() |
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 MATLAB 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 |
| display (any object) | Display summary of SimBiology® object |
| rmcontent (variant) | Remove contents from variant object |
| verify (model, variant) | Validate and verify SimBiology® model |
Properties for variant objects
| Active | Indicate object in use during simulation |
| Annotation | Store link to URL or file |
| 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 top-level SimBiology® object type |
| UserData | Specify data to associate with object |
Objects — Compartment objectConfigset object, Model object, Parameter object, Species object
Functions — sbiosimulate
![]() | UnitPrefix object | verify (model, variant) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |