Skip to Main Content Skip to Search
Product Documentation

Compartment object - Options for compartments

Description

The SimBiology compartment object represents a container for species in a model. Compartment size can vary or remain constant during a simulation. All models must have at least one compartment and all species in a model must be assigned to a compartment. Compartment names must be unique within a model.

Compartments allow you to define the size (Capacity) of physically isolated regions that may affect simulation, and associate pools of species within those regions. You can specify or change Capacity using rules, events, and variants, similar to species amounts or parameter values.

The model object stores compartments as a flat list. Each compartment stores information on its own organization; in other words a compartment has information on which compartment it lives within (Owner) and who it contains (Compartments).

The flat list of compartments in the model object lets you vary the way compartments are organized in your model without invalidating any expressions.

To add species that participate in reactions, add the reaction to the model using the addreaction method. When you define a reaction with a new species:

Alternatively, create and add a species object to a compartment object, using the addspecies method at the command line.

When you use the SimBiology desktop to create a new model, it adds an empty compartment (unnamed), to which you can add species.

You can specify reactions that cross compartments using the syntax compartment1Name.species1Name –> compartment2Name.species2Name. If you add a reaction that contains species from different compartments, and the reaction rate dimensions are concentration/time, all reactants should be from the same compartment.

In addition, if the reaction is reversible then there are two cases:

See Property Summary for links to compartment 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.

Constructor Summary

addcompartment (model, compartment)Create compartment object

Method Summary

Methods for compartment objects

addcompartment (model, compartment)Create compartment object
addspecies (model, compartment)Create species object and add to compartment object within model object
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
rename (compartment, parameter, species)Rename object and update expressions
reorder (model, compartment)Reorder component lists
set (any object)Set object properties

Property Summary

Properties for compartment objects

CapacityCompartment capacity
CapacityUnitsCompartment capacity units
CompartmentsArray of compartments in model or compartment
ConstantCapacity Specify variable or constant compartment capacity
NameSpecify name of object
NotesHTML text describing SimBiology object
OwnerOwning compartment
ParentIndicate parent object
SpeciesArray of species in compartment object
TagSpecify label for SimBiology object
TypeDisplay SimBiology object type
UserDataSpecify data to associate with object

See Also

AbstractKineticLaw object, Configset object, KineticLaw object, Model object, Parameter object, Reaction object, Root object, Rule object

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS