Contenido principal

add

R2026b

Add quantities to equivalence set

Since R2026b

Description

add(eqSet,quantities) adds one or more quantities to the equivalence set eqSet.

example

eqSet = add(eqSet,quantities) also returns eqSet after adding the quantities.

Examples

collapse all

Create a PBPK model with three organ submodels sharing a Venous Blood compartment, then use add to include an additional compartment in an existing equivalence set.

Create a PBPK model with three organ submodels, each containing a Venous Blood compartment.

pbpkModel = sbiomodel("PBPK");

gutModel = addmodel(pbpkModel,"Gut");
gutVenous = addcompartment(gutModel,"Venous Blood",3000,Units="milliliter");

liverModel = addmodel(pbpkModel,"Liver");
liverVenous = addcompartment(liverModel,"Venous Blood",3000,Units="milliliter");

lungModel = addmodel(pbpkModel,"Lung");
lungVenous = addcompartment(lungModel,"Venous Blood",3000,Units="milliliter");

Create an equivalence set with the Venous Blood compartments from the Gut and Liver submodels.

eqSet = addequivalence(pbpkModel,[gutVenous,liverVenous]);

Add the Venous Blood compartment from the Lung submodel to the equivalence set.

add(eqSet,lungVenous);
eqSet.Quantities
ans = 
   SimBiology Compartment Array

   Index:    Name:           Value:    Units:        ParentModel:
   1         Venous Blood    3000      milliliter    Gut         
   2         Venous Blood    3000      milliliter    Liver       
   3         Venous Blood    3000      milliliter    Lung        

Input Arguments

collapse all

Equivalence set to add quantities to, specified as a SimBiology.EquivalenceSet object.

Quantities to add to the equivalence set, specified as a SimBiology.Compartment, SimBiology.Species, or SimBiology.Parameter object, or an array of such objects.

Each quantity must belong to a different submodel than the quantities already in the equivalence set. No two quantities in an equivalence set can be in the same model. All quantities must have the same type (compartment, species, or parameter), and they must not be reaction-scoped parameters.

Output Arguments

collapse all

Updated equivalence set, returned as a SimBiology.EquivalenceSet object. The returned object is the same as the input eqSet.

Version History

Introduced in R2026b