libSBML C API  5.18.0
Model_t Class Reference

Detailed Description

An SBML model.

In an SBML model definition, a single object of class Model_t serves as the overall container for the lists of the various model components. All of the lists are optional, but if a given list container is present within the model, the list must not be empty; that is, it must have length one or more. The following are the components and lists permitted in different Levels and Versions of SBML in version 5.18.0 of libSBML:

Although all the lists are optional, there are dependencies between SBML components such that defining some components requires defining others. An example is that defining a species requires defining a compartment, and defining a reaction requires defining a species. The dependencies are explained in more detail in the SBML specifications.

In addition to the above lists and attributes, the Model_t class in both SBML Level 2 and Level 3 has the usual two attributes of "id" and "name", and both are optional. As is the case for other SBML components with "id" and "name" attributes, they must be used according to the guidelines described in the SBML specifications. (Within the frameworks of SBML Level 2 and Level 3, a Model_t object identifier has no assigned meaning, but extension packages planned for SBML Level 3 are likely to make use of this identifier.)

Finally, SBML Level 3 has introduced a number of additional Model_t attributes. They are discussed in a separate section below.

Approaches to creating objects using the libSBML API

LibSBML provides two main mechanisms for creating objects: class constructors (e.g., Species_t::Species_t() ), and createObject() methods (such as Model_t::createSpecies()) provided by certain Object classes such as Model_t. These multiple mechanisms are provided by libSBML for flexibility and to support different use-cases, but they also have different implications for the overall model structure.

In general, the recommended approach is to use the createObject() methods. These methods both create an object and link it to the parent in one step. Here is an example:

// Create an SBMLDocument_t object in Level 3 Version 1 format:
SBMLDocument_t* sbmlDoc = new SBMLDocument_t(3, 1);
// Create a Model_t object inside the SBMLDocument_t object and set
// its identifier. The call returns a pointer to the Model_t object
// created, and methods called on that object affect the attributes
// of the object attached to the model (as expected).
Model_t* model = sbmlDoc->createModel();
model->setId("BestModelEver");
// Create a Species_t object inside the Model_t and set its identifier.
// Similar to the lines above, this call returns a pointer to the Species_t
// object created, and methods called on that object affect the attributes
// of the object attached to the model (as expected).
Species_t *sp = model->createSpecies();
sp->setId("MySpecies");

The createObject() methods return a pointer to the object created, but they also add the object to the relevant list of object instances contained in the parent. (These lists become the <listOfObjects> elements in the finished XML rendition of SBML.) In the example above, Model_t::createSpecies() adds the created species directly to the <listOfSpecies> list in the model. Subsequently, methods called on the species change the species in the model (which is what is expected in most situations).

Consistency and adherence to SBML specifications

To make it easier for applications to do whatever they need, libSBML version 5.18.0 is relatively lax when it comes to enforcing correctness and completeness of models during model construction and editing. Essentially, libSBML will not in most cases check automatically that a model's components have valid attribute values, or that the overall model is consistent and free of errors—even obvious errors such as duplication of identifiers. This allows applications great leeway in how they build their models, but it means that software authors must take deliberate steps to ensure that the model will be, in the end, valid SBML. These steps include such things as keeping track of the identifiers used in a model, manually performing updates in certain situations where an entity is referenced in more than one place (e.g., a species that is referenced by multiple SpeciesReference_t objects), and so on.

That said, libSBML does provide powerful features for deliberately performing validation of SBML when an application decides it is time to do so. The interfaces to these facilities are on the SBMLDocument_t class, in the form of SBMLDocument_t::checkInternalConsistency() and SBMLDocument_t::checkConsistency(). Please refer to the documentation for SBMLDocument_t for more information about this.

While applications may play fast and loose and live like free spirits during the construction and editing of SBML models, they should always make sure to call SBMLDocument_t::checkInternalConsistency() and/or SBMLDocument_t::checkConsistency() before writing out the final version of an SBML model.

Model_t attributes introduced in SBML Level 3

As mentioned above, the Model_t class has a number of optional attributes in SBML Level 3. These are "substanceUnits", "timeUnits", "volumeUnits", "areaUnits", "lengthUnits", "extentUnits", and "conversionFactor. The following provide more information about them.

The "substanceUnits" attribute

The "substanceUnits" attribute is used to specify the unit of measurement associated with substance quantities of Species_t objects that do not specify units explicitly. If a given Species_t object definition does not specify its unit of substance quantity via the "substanceUnits" attribute on the Species_t object instance, then that species inherits the value of the Model_t "substanceUnits" attribute. If the Model_t does not define a value for this attribute, then there is no unit to inherit, and all species that do not specify individual "substanceUnits" attribute values then have no declared units for their quantities. The SBML Level 3 specifications provide more details.

Note that when the identifier of a species appears in a model's mathematical expressions, the unit of measurement associated with that identifier is not solely determined by setting "substanceUnits" on Model_t or Species_t. Please see the discussion about units given in the documentation for the Species_t class.

The "timeUnits" attribute

The "timeUnits" attribute on SBML Level 3's Model_t object is used to specify the unit in which time is measured in the model. This attribute on Model_t is the only way to specify a unit for time in a model. It is a global attribute; time is measured in the model everywhere in the same way. This is particularly relevant to Reaction_t and RateRule_t objects in a model: all Reaction_t and RateRule_t objects in SBML define per-time values, and the unit of time is given by the "timeUnits" attribute on the Model_t object instance. If the Model_t "timeUnits" attribute has no value, it means that the unit of time is not defined for the model's reactions and rate rules. Leaving it unspecified in an SBML model does not result in an invalid model in SBML Level 3; however, as a matter of best practice, we strongly recommend that all models specify units of measurement for time.

The "volumeUnits", "areaUnits", and "lengthUnits" attributes

The attributes "volumeUnits", "areaUnits" and "lengthUnits" together are used to set the units of measurements for the sizes of Compartment_t objects in an SBML Level 3 model when those objects do not otherwise specify units. The three attributes correspond to the most common cases of compartment dimensions: "volumeUnits" for compartments having a "spatialDimensions" attribute value of "3", "areaUnits" for compartments having a "spatialDimensions" attribute value of "2", and "lengthUnits" for compartments having a "spatialDimensions" attribute value of "1". The attributes are not applicable to compartments whose "spatialDimensions" attribute values are not one of "1", "2" or "3".

If a given Compartment_t object instance does not provide a value for its "units" attribute, then the unit of measurement of that compartment's size is inherited from the value specified by the Model_t "volumeUnits", "areaUnits" or "lengthUnits" attribute, as appropriate based on the Compartment_t object's "spatialDimensions" attribute value. If the Model_t object does not define the relevant attribute, then there are no units to inherit, and all Compartment_t objects that do not set a value for their "units" attribute then have no units associated with their compartment sizes.

The use of three separate attributes is a carry-over from SBML Level 2. Note that it is entirely possible for a model to define a value for two or more of the attributes "volumeUnits", "areaUnits" and "lengthUnits" simultaneously, because SBML models may contain compartments with different numbers of dimensions.

The "extentUnits" attribute

Reactions are processes that occur over time. These processes involve events of some sort, where a single ``reaction event'' is one in which some set of entities (known as reactants, products and modifiers in SBML) interact, once. The extent of a reaction is a measure of how many times the reaction has occurred, while the time derivative of the extent gives the instantaneous rate at which the reaction is occurring. Thus, what is colloquially referred to as the "rate of the reaction" is in fact equal to the rate of change of reaction extent.

In SBML Level 3, the combination of "extentUnits" and "timeUnits" defines the units of kinetic laws in SBML and establishes how the numerical value of each KineticLaw_t object's mathematical formula is meant to be interpreted in a model. The units of the kinetic laws are taken to be "extentUnits" divided by "timeUnits".

Note that this embodies an important principle in SBML Level 3 models: all reactions in an SBML model must have the same units for the rate of change of extent. In other words, the units of all reaction rates in the model must be the same. There is only one global value for "extentUnits" and one global value for "timeUnits".

The "conversionFactor" attribute

The attribute "conversionFactor" in SBML Level 3's Model_t object defines a global value inherited by all Species_t object instances that do not define separate values for their "conversionFactor" attributes. The value of this attribute must refer to a Parameter_t object instance defined in the model. The Parameter_t object in question must be a constant; ie it must have its "constant" attribute value set to "true".

If a given Species_t object definition does not specify a conversion factor via the "conversionFactor" attribute on Species_t, then the species inherits the conversion factor specified by the Model_t "conversionFactor" attribute. If the Model_t does not define a value for this attribute, then there is no conversion factor to inherit. More information about conversion factors is provided in the SBML Level 3 specifications.

Examples:
addCVTerms.c, addingEvidenceCodes_1.c, addingEvidenceCodes_2.c, addModelHistory.c, appendAnnotation.c, createExampleSBML.c, printAnnotation.c, printMath.c, printNotes.c, printSBML.c, printUnits.c, spec_example1.c, unsetAnnotation.c, and unsetNotes.c.

Public Member Functions

int Model_addCompartment (Model_t *m, const Compartment_t *c)
 Adds a copy of a Compartment_t structure to a given Model_t structure. More...
 
int Model_addCompartmentType (Model_t *m, const CompartmentType_t *ct)
 Adds a copy of a CompartmentType_t structure to a given Model_t structure. More...
 
int Model_addConstraint (Model_t *m, const Constraint_t *c)
 Adds a copy of a Constraint_t structure to a given Model_t structure. More...
 
int Model_addEvent (Model_t *m, const Event_t *e)
 Adds a copy of a Event_t structure to a given Model_t structure. More...
 
int Model_addFunctionDefinition (Model_t *m, const FunctionDefinition_t *fd)
 Adds a copy of a FunctionDefinition_t structure to a given Model_t structure. More...
 
int Model_addInitialAssignment (Model_t *m, const InitialAssignment_t *ia)
 Adds a copy of a InitialAssignment_t structure to a given Model_t structure. More...
 
int Model_addParameter (Model_t *m, const Parameter_t *p)
 Adds a copy of a Parameter_t structure to a given Model_t structure. More...
 
int Model_addReaction (Model_t *m, const Reaction_t *r)
 Adds a copy of a Reaction_t structure to a given Model_t structure. More...
 
int Model_addRule (Model_t *m, const Rule_t *r)
 Adds a copy of a Rule_t structure to a given Model_t structure. More...
 
int Model_addSpecies (Model_t *m, const Species_t *s)
 Adds a copy of a Species_t structure to a given Model_t structure. More...
 
int Model_addSpeciesType (Model_t *m, const SpeciesType_t *st)
 Adds a copy of a SpeciesType_t structure to a given Model_t structure. More...
 
int Model_addUnitDefinition (Model_t *m, const UnitDefinition_t *ud)
 Adds a copy of a UnitDefinition_t structure to a given Model_t structure. More...
 
Model_tModel_clone (const Model_t *m)
 Creates and returns a deep copy of a given Model_t structure. More...
 
Model_tModel_create (unsigned int level, unsigned int version)
 Creates a new Model_t structure using the given SBML level and version values. More...
 
Rule_tModel_createAlgebraicRule (Model_t *m)
 Creates a new AlgebraicRule_t structure inside the given Model_t structure and returns a pointer to it. More...
 
Rule_tModel_createAssignmentRule (Model_t *m)
 Creates a new AssignmentRule_t structure inside the given Model_t structure and returns a pointer to it. More...
 
Compartment_tModel_createCompartment (Model_t *m)
 Creates a new Compartment_t structure inside the given Model_t and returns a pointer to it. More...
 
CompartmentType_tModel_createCompartmentType (Model_t *m)
 Creates a new CompartmentType_t structure inside the given Model_t and returns a pointer to it. More...
 
Constraint_tModel_createConstraint (Model_t *m)
 Creates a new Constraint_t structure inside the given Model_t structure and returns it. More...
 
Delay_tModel_createDelay (Model_t *m)
 Creates a new Delay_t structure inside the last Event_t structure created in the given Model_t structure, and returns a pointer to it. More...
 
Event_tModel_createEvent (Model_t *m)
 Creates a new Event_t inside the given Model_t structure and returns a pointer to it. More...
 
EventAssignment_tModel_createEventAssignment (Model_t *m)
 Creates a new EventAssignment_t structure inside the last Event_t structure created in the given Model_t structure, and returns a pointer to it. More...
 
FunctionDefinition_tModel_createFunctionDefinition (Model_t *m)
 Creates a new FunctionDefinition_t structure inside the given Model_t and returns a pointer to it. More...
 
InitialAssignment_tModel_createInitialAssignment (Model_t *m)
 Creates a new InitialAssignment_t structure inside the given Model_t structure and returns it. More...
 
KineticLaw_tModel_createKineticLaw (Model_t *m)
 Creates a new KineticLaw_t structure inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it. More...
 
LocalParameter_tModel_createKineticLawLocalParameter (Model_t *m)
 Creates a new LocalParameter_t structure inside the KineticLaw_t structure of the last Reaction_t structure created inside the given model, and returns a pointer to it. More...
 
Parameter_tModel_createKineticLawParameter (Model_t *m)
 Creates a new local Parameter_t structure inside the KineticLaw_t structure of the last Reaction_t structure created inside the given model, and returns a pointer to it. More...
 
SpeciesReference_tModel_createModifier (Model_t *m)
 Creates a new modifier SpeciesReference_t structure for a reactant inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it. More...
 
Parameter_tModel_createParameter (Model_t *m)
 Creates a new Parameter_t structure inside the given Model_t and returns a pointer to it. More...
 
SpeciesReference_tModel_createProduct (Model_t *m)
 Creates a new SpeciesReference_t structure for a product inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it. More...
 
Rule_tModel_createRateRule (Model_t *m)
 Creates a new RateRule_t structure inside the given Model_t structure and returns a pointer to it. More...
 
SpeciesReference_tModel_createReactant (Model_t *m)
 Creates a new SpeciesReference_t structure for a reactant inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it. More...
 
Reaction_tModel_createReaction (Model_t *m)
 Creates a new Reaction_t structure inside the given Model_t structure and returns a pointer to it. More...
 
Species_tModel_createSpecies (Model_t *m)
 Creates a new Species_t structure inside the given Model_t and returns a pointer to it. More...
 
SpeciesType_tModel_createSpeciesType (Model_t *m)
 Creates a new SpeciesType_t structure inside the given Model_t and returns a pointer to it. More...
 
Trigger_tModel_createTrigger (Model_t *m)
 Creates a new Trigger_t structure inside the last Event_t structure created in the given Model_t structure, and returns a pointer to it. More...
 
Unit_tModel_createUnit (Model_t *m)
 Creates a new Unit_t structure inside the last UnitDefinition_t structure created in this model and returns a pointer to it. More...
 
UnitDefinition_tModel_createUnitDefinition (Model_t *m)
 Creates a new UnitDefinition_t structure inside the given Model_t and returns a pointer to it. More...
 
Model_tModel_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new Model_t structure using the given SBMLNamespaces_t structure. More...
 
void Model_free (Model_t *m)
 Frees the given Model_t structure. More...
 
const char * Model_getAreaUnits (const Model_t *m)
 Get the areaUnits of the given Model_t structure. More...
 
Compartment_tModel_getCompartment (Model_t *m, unsigned int n)
 Get the nth Compartment_t structure contained in the given Model_t structure. More...
 
Compartment_tModel_getCompartmentById (Model_t *m, const char *sid)
 Get the Compartment_t structure whose identifier is sid in the given Model_t structure. More...
 
CompartmentType_tModel_getCompartmentType (Model_t *m, unsigned int n)
 Get the nth CompartmentType_t structure contained in the given Model_t structure. More...
 
CompartmentType_tModel_getCompartmentTypeById (Model_t *m, const char *sid)
 Get the CompartmentType_t structure whose identifier is sid in the given Model_t structure. More...
 
Constraint_tModel_getConstraint (Model_t *m, unsigned int n)
 Get the nth Constraint_t structure contained in the given Model_t structure. More...
 
const char * Model_getConversionFactor (const Model_t *m)
 Get the conversionFactor of the given Model_t structure. More...
 
Event_tModel_getEvent (Model_t *m, unsigned int n)
 Get the nth Event_t structure contained in the given Model_t structure. More...
 
Event_tModel_getEventById (Model_t *m, const char *sid)
 Get the Event_t structure whose identifier is sid in the given Model_t structure. More...
 
const char * Model_getExtentUnits (const Model_t *m)
 Get the extentUnits of the given Model_t structure. More...
 
FunctionDefinition_tModel_getFunctionDefinition (Model_t *m, unsigned int n)
 Get the nth FunctionDefinition_t structure contained in the given Model_t structure. More...
 
FunctionDefinition_tModel_getFunctionDefinitionById (Model_t *m, const char *sid)
 Get the FunctionDefinition_t structure whose identifier is sid in the given Model_t structure. More...
 
const char * Model_getId (const Model_t *m)
 Get the identifier of the given Model_t structure. More...
 
InitialAssignment_tModel_getInitialAssignment (Model_t *m, unsigned int n)
 Get the nth InitialAssignment_t structure contained in the given Model_t structure. More...
 
InitialAssignment_tModel_getInitialAssignmentBySym (Model_t *m, const char *symbol)
 
const char * Model_getLengthUnits (const Model_t *m)
 Get the lengthUnits of the given Model_t structure. More...
 
ListOf_tModel_getListOfCompartments (Model_t *m)
 Get the list of Compartment_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfCompartmentTypes (Model_t *m)
 Get the list of CompartmentType_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfConstraints (Model_t *m)
 Get the list of Constraint_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfEvents (Model_t *m)
 Get the list of Event_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfFunctionDefinitions (Model_t *m)
 Get the list of FunctionDefinition_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfInitialAssignments (Model_t *m)
 Get the list of InitialAssignment_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfParameters (Model_t *m)
 Get the list of Parameter_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfReactions (Model_t *m)
 Get the list of Reaction_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfRules (Model_t *m)
 Get the list of Rule_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfSpecies (Model_t *m)
 Get the list of Species_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfSpeciesTypes (Model_t *m)
 Get the list of SpeciesType_t structures contained in the given Model_t structure. More...
 
ListOf_tModel_getListOfUnitDefinitions (Model_t *m)
 Get the list of UnitDefinition_t structures contained in the given Model_t structure. More...
 
ModelHistory_tModel_getModelHistory (Model_t *m)
 Returns the ModelHistory_t of the given Model_t structure. More...
 
const char * Model_getName (const Model_t *m)
 Get the name of the given Model_t structure. More...
 
const XMLNamespaces_tModel_getNamespaces (Model_t *m)
 Returns a list of XMLNamespaces_t associated with this Model_t structure. More...
 
unsigned int Model_getNumCompartments (const Model_t *m)
 Get the number of Compartment_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumCompartmentTypes (const Model_t *m)
 Get the number of CompartmentType_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumConstraints (const Model_t *m)
 Get the number of Constraint_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumEvents (const Model_t *m)
 Get the number of Event_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumFunctionDefinitions (const Model_t *m)
 Get the number of FunctionDefinition_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumInitialAssignments (const Model_t *m)
 Get the number of InitialAssignment_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumParameters (const Model_t *m)
 Get the number of Parameter_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumReactions (const Model_t *m)
 Get the number of Reaction_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumRules (const Model_t *m)
 Get the number of Rule_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumSpecies (const Model_t *m)
 Get the number of Species_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumSpeciesTypes (const Model_t *m)
 Get the number of SpeciesType_t structures in the given Model_t structure. More...
 
unsigned int Model_getNumSpeciesWithBoundaryCondition (const Model_t *m)
 Get the number of Species_t structure in this Model_t structure having nonzero values for their "boundaryCondition" attribute. More...
 
unsigned int Model_getNumUnitDefinitions (const Model_t *m)
 Get the number of UnitDefinition_t structures in the given Model_t structure. More...
 
Parameter_tModel_getParameter (Model_t *m, unsigned int n)
 Get the nth Parameter_t structure contained in the given Model_t structure. More...
 
Parameter_tModel_getParameterById (Model_t *m, const char *sid)
 Get the Parameter_t structure whose identifier is sid in the given Model_t structure. More...
 
Reaction_tModel_getReaction (Model_t *m, unsigned int n)
 Get the nth Reaction_t structure contained in the given Model_t structure. More...
 
Reaction_tModel_getReactionById (Model_t *m, const char *sid)
 Get the Reaction_t structure whose identifier is sid in the given Model_t structure. More...
 
Rule_tModel_getRule (Model_t *m, unsigned int n)
 Get the nth Rule_t structure contained in the given Model_t structure. More...
 
Rule_tModel_getRuleByVar (Model_t *m, const char *variable)
 
Species_tModel_getSpecies (Model_t *m, unsigned int n)
 Get the nth Species_t structure contained in the given Model_t structure. More...
 
Species_tModel_getSpeciesById (Model_t *m, const char *sid)
 Get the Species_t structure whose identifier is sid in the given Model_t structure. More...
 
SpeciesReference_tModel_getSpeciesReferenceById (Model_t *m, const char *sid)
 Get the SpeciesReference_t structure whose identifier is sid in the given Model_t structure. More...
 
SpeciesType_tModel_getSpeciesType (Model_t *m, unsigned int n)
 Get the nth SpeciesType_t structure contained in the given Model_t structure. More...
 
SpeciesType_tModel_getSpeciesTypeById (Model_t *m, const char *sid)
 Get the SpeciesType_t structure whose identifier is sid in the given Model_t structure. More...
 
const char * Model_getSubstanceUnits (const Model_t *m)
 Get the substanceUnits of the given Model_t structure. More...
 
const char * Model_getTimeUnits (const Model_t *m)
 Get the timeUnits of the given Model_t structure. More...
 
UnitDefinition_tModel_getUnitDefinition (Model_t *m, unsigned int n)
 Get the nth UnitDefinition_t structure contained in the given Model_t structure. More...
 
UnitDefinition_tModel_getUnitDefinitionById (Model_t *m, const char *sid)
 Get the UnitDefinition_t structure whose identifier is sid in the given Model_t structure. More...
 
const char * Model_getVolumeUnits (const Model_t *m)
 Get the volumeUnits of the given Model_t structure. More...
 
int Model_isSetAreaUnits (const Model_t *m)
 Predicate for testing whether the areaUnits of a given Model_t structure is assigned. More...
 
int Model_isSetConversionFactor (const Model_t *m)
 Predicate for testing whether the conversionFactor of a given Model_t structure is assigned. More...
 
int Model_isSetExtentUnits (const Model_t *m)
 Predicate for testing whether the extentUnits of a given Model_t structure is assigned. More...
 
int Model_isSetId (const Model_t *m)
 Predicate for testing whether the identifier of a given Model_t structure is assigned. More...
 
int Model_isSetLengthUnits (const Model_t *m)
 Predicate for testing whether the lengthUnits of a given Model_t structure is assigned. More...
 
int Model_isSetModelHistory (Model_t *m)
 Predicate for testing whether the ModelHistory_t of a given Model_t structure is assigned. More...
 
int Model_isSetName (const Model_t *m)
 Predicate for testing whether the name of a given Model_t structure is assigned. More...
 
int Model_isSetSubstanceUnits (const Model_t *m)
 Predicate for testing whether the substanceUnits of a given Model_t structure is assigned. More...
 
int Model_isSetTimeUnits (const Model_t *m)
 Predicate for testing whether the timeUnits of a given Model_t structure is assigned. More...
 
int Model_isSetVolumeUnits (const Model_t *m)
 Predicate for testing whether the volumeUnits of a given Model_t structure is assigned. More...
 
Compartment_tModel_removeCompartment (Model_t *m, unsigned int n)
 Removes the nth Compartment_t structure from this Model_t structure and returns a pointer to it. More...
 
Compartment_tModel_removeCompartmentById (Model_t *m, const char *sid)
 Removes the Compartment_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
CompartmentType_tModel_removeCompartmentType (Model_t *m, unsigned int n)
 Removes the nth CompartmentType_t structure from this Model_t structure and returns a pointer to it. More...
 
CompartmentType_tModel_removeCompartmentTypeById (Model_t *m, const char *sid)
 Removes the CompartmentType_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
Constraint_tModel_removeConstraint (Model_t *m, unsigned int n)
 Removes the nth Constraint_t structure from this Model_t structure and returns a pointer to it. More...
 
Event_tModel_removeEvent (Model_t *m, unsigned int n)
 Removes the nth Event_t structure from this Model_t structure and returns a pointer to it. More...
 
Event_tModel_removeEventById (Model_t *m, const char *sid)
 Removes the Event_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
FunctionDefinition_tModel_removeFunctionDefinition (Model_t *m, unsigned int n)
 Removes the nth FunctionDefinition_t structure from this Model_t structure and returns a pointer to it. More...
 
FunctionDefinition_tModel_removeFunctionDefinitionById (Model_t *m, const char *sid)
 Removes the FunctionDefinition_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
InitialAssignment_tModel_removeInitialAssignment (Model_t *m, unsigned int n)
 Removes the nth InitialAssignment_t structure from this Model_t structure and returns a pointer to it. More...
 
InitialAssignment_tModel_removeInitialAssignmentBySym (Model_t *m, const char *symbol)
 Removes the InitialAssignment_t structure with the given "symbol" attribute from this Model_t structure and returns a pointer to it. More...
 
Parameter_tModel_removeParameter (Model_t *m, unsigned int n)
 Removes the nth Parameter_t structure from this Model_t structure and returns a pointer to it. More...
 
Parameter_tModel_removeParameterById (Model_t *m, const char *sid)
 Removes the Parameter_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
Reaction_tModel_removeReaction (Model_t *m, unsigned int n)
 Removes the nth Reaction_t structure from this Model_t structure and returns a pointer to it. More...
 
Reaction_tModel_removeReactionById (Model_t *m, const char *sid)
 Removes the Reaction_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
Rule_tModel_removeRule (Model_t *m, unsigned int n)
 Removes the nth Rule_t structure from this Model_t structure and returns a pointer to it. More...
 
Rule_tModel_removeRuleByVar (Model_t *m, const char *variable)
 Removes the Rule_t structure with the given "variable" attribute from this Model_t structure and returns a pointer to it. More...
 
Species_tModel_removeSpecies (Model_t *m, unsigned int n)
 Removes the nth Species_t structure from this Model_t structure and returns a pointer to it. More...
 
Species_tModel_removeSpeciesById (Model_t *m, const char *sid)
 Removes the Species_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
SpeciesType_tModel_removeSpeciesType (Model_t *m, unsigned int n)
 Removes the nth SpeciesType_t structure from this Model_t structure and returns a pointer to it. More...
 
SpeciesType_tModel_removeSpeciesTypeById (Model_t *m, const char *sid)
 Removes the SpeciesType_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
UnitDefinition_tModel_removeUnitDefinition (Model_t *m, unsigned int n)
 Removes the nth UnitDefinition_t structure from this Model_t structure and returns a pointer to it. More...
 
UnitDefinition_tModel_removeUnitDefinitionById (Model_t *m, const char *sid)
 Removes the UnitDefinition_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it. More...
 
int Model_setAreaUnits (Model_t *m, const char *units)
 Set the areaUnits attribute of a given Model_t structure. More...
 
int Model_setConversionFactor (Model_t *m, const char *sid)
 Set the conversionFactor attribute of a given Model_t structure. More...
 
int Model_setExtentUnits (Model_t *m, const char *units)
 Set the extentUnits attribute of a given Model_t structure. More...
 
int Model_setId (Model_t *m, const char *sid)
 Set the identifier of a given Model_t structure. More...
 
int Model_setLengthUnits (Model_t *m, const char *units)
 Set the lengthUnits attribute of a given Model_t structure. More...
 
int Model_setModelHistory (Model_t *m, ModelHistory_t *history)
 Set the ModelHistory_t of the given Model_t structure. More...
 
int Model_setName (Model_t *m, const char *name)
 Set the identifier of the given Model_t structure. More...
 
int Model_setSubstanceUnits (Model_t *m, const char *units)
 Set the substanceUnits attribute of a given Model_t structure. More...
 
int Model_setTimeUnits (Model_t *m, const char *units)
 Set the timeUnits attribute of a given Model_t structure. More...
 
int Model_setVolumeUnits (Model_t *m, const char *units)
 Set the volumeUnits attribute of a given Model_t structure. More...
 
int Model_unsetAreaUnits (Model_t *m)
 Unsets the "areaUnits" attribute of the given Model_t structure. More...
 
int Model_unsetConversionFactor (Model_t *m)
 Unsets the "conversionFactor" attribute of the given Model_t structure. More...
 
int Model_unsetExtentUnits (Model_t *m)
 Unsets the "extentUnits" attribute of the given Model_t structure. More...
 
int Model_unsetId (Model_t *m)
 Unsets the "id" attribute of the given Model_t structure. More...
 
int Model_unsetLengthUnits (Model_t *m)
 Unsets the "lengthUnits" attribute of the given Model_t structure. More...
 
int Model_unsetModelHistory (Model_t *m)
 Unsets the ModelHistory_t of the given Model_t structure. More...
 
int Model_unsetName (Model_t *m)
 Unsets the "name" attribute of the given Model_t structure. More...
 
int Model_unsetSubstanceUnits (Model_t *m)
 Unsets the "substanceUnits" attribute of the given Model_t structure. More...
 
int Model_unsetTimeUnits (Model_t *m)
 Unsets the "timeUnits" attribute of the given Model_t structure. More...
 
int Model_unsetVolumeUnits (Model_t *m)
 Unsets the "volumeUnits" attribute of the given Model_t structure. More...
 

Member Function Documentation

int Model_addCompartment ( Model_t m,
const Compartment_t c 
)

Adds a copy of a Compartment_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
cthe Compartment_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addCompartmentType ( Model_t m,
const CompartmentType_t ct 
)

Adds a copy of a CompartmentType_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
ctthe CompartmentType_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addConstraint ( Model_t m,
const Constraint_t c 
)

Adds a copy of a Constraint_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
cthe Constraint_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addEvent ( Model_t m,
const Event_t e 
)

Adds a copy of a Event_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
ethe Event_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addFunctionDefinition ( Model_t m,
const FunctionDefinition_t fd 
)

Adds a copy of a FunctionDefinition_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
fdthe FunctionDefinition_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addInitialAssignment ( Model_t m,
const InitialAssignment_t ia 
)

Adds a copy of a InitialAssignment_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
iathe InitialAssignment_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addParameter ( Model_t m,
const Parameter_t p 
)

Adds a copy of a Parameter_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
pthe Parameter_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addReaction ( Model_t m,
const Reaction_t r 
)

Adds a copy of a Reaction_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
rthe Reaction_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addRule ( Model_t m,
const Rule_t r 
)

Adds a copy of a Rule_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
rthe Rule_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addSpecies ( Model_t m,
const Species_t s 
)

Adds a copy of a Species_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
sthe Species_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addSpeciesType ( Model_t m,
const SpeciesType_t st 
)

Adds a copy of a SpeciesType_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
stthe SpeciesType_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_addUnitDefinition ( Model_t m,
const UnitDefinition_t ud 
)

Adds a copy of a UnitDefinition_t structure to a given Model_t structure.

Parameters
mthe Model_t structure.
udthe UnitDefinition_t structure to copy and add.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Model_t * Model_clone ( const Model_t m)

Creates and returns a deep copy of a given Model_t structure.

Parameters
mthe Model_t structure to copy.
Returns
a (deep) copy of this Model_t structure.
Model_t * Model_create ( unsigned int  level,
unsigned int  version 
)

Creates a new Model_t structure using the given SBML level and version values.

Parameters
levelan unsigned int, the SBML Level to assign to this Model_t.
versionan unsigned int, the SBML Version to assign to this Model_t.
Returns
a pointer to the newly created Model_t structure.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute.
Rule_t * Model_createAlgebraicRule ( Model_t m)

Creates a new AlgebraicRule_t structure inside the given Model_t structure and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the AlgebraicRule_t structure created.
Rule_t * Model_createAssignmentRule ( Model_t m)

Creates a new AssignmentRule_t structure inside the given Model_t structure and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the AssignmentRule_t structure created
Compartment_t * Model_createCompartment ( Model_t m)

Creates a new Compartment_t structure inside the given Model_t and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the Compartment_t structure created
Examples:
createExampleSBML.c, and spec_example1.c.
CompartmentType_t * Model_createCompartmentType ( Model_t m)

Creates a new CompartmentType_t structure inside the given Model_t and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the CompartmentType_t structure created
Constraint_t * Model_createConstraint ( Model_t m)

Creates a new Constraint_t structure inside the given Model_t structure and returns it.

Parameters
mthe Model_t structure.
Returns
the Constraint_t structure created.
Delay_t * Model_createDelay ( Model_t m)

Creates a new Delay_t structure inside the last Event_t structure created in the given Model_t structure, and returns a pointer to it.

The mechanism by which the last Event_t structure was created is not significant. It could have been created in a variety of ways, for example by using Model_createEvent(). If an Event_t structure does not exist, a new Delay_t structure is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the new Delay_t structure
Event_t * Model_createEvent ( Model_t m)

Creates a new Event_t inside the given Model_t structure and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
a new Event_t structure
EventAssignment_t * Model_createEventAssignment ( Model_t m)

Creates a new EventAssignment_t structure inside the last Event_t structure created in the given Model_t structure, and returns a pointer to it.

The mechanism by which the last Event_t structure was created is not significant. It could have been created in a variety of ways, for example by using Model_createEvent(). If an Event_t structure does not exist, a new EventAssignment_t structure is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the new EventAssignment_t structure
FunctionDefinition_t * Model_createFunctionDefinition ( Model_t m)

Creates a new FunctionDefinition_t structure inside the given Model_t and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the new FunctionDefinition_t structure
Examples:
createExampleSBML.c.
InitialAssignment_t * Model_createInitialAssignment ( Model_t m)

Creates a new InitialAssignment_t structure inside the given Model_t structure and returns it.

Parameters
mthe Model_t structure.
Returns
the InitialAssignment_t structure created
KineticLaw_t * Model_createKineticLaw ( Model_t m)

Creates a new KineticLaw_t structure inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it.

The mechanism by which the last Reaction_t structure was created and added to m is not significant. It could have been created in a variety of ways, for example using Model_createReaction(). If a Reaction_t structure does not exist for the model, or a Reaction_t structure exists but already contains a KineticLaw_t structure, a new KineticLaw_t is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the KineticLaw_t structure created
LocalParameter_t * Model_createKineticLawLocalParameter ( Model_t m)

Creates a new LocalParameter_t structure inside the KineticLaw_t structure of the last Reaction_t structure created inside the given model, and returns a pointer to it.

The last KineticLaw_t structure could have been created in a variety of ways. For example, it could have been added using Model_createKineticLaw(), or it could be the result of using Reaction_createKineticLaw() on the Reaction_t structure created by a Model_createReaction(). If a Reaction_t structure does not exist for this model, or the last Reaction_t structure does not contain a KineticLaw_t structure, a new LocalParameter_t is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the LocalParameter_t structure created
Parameter_t * Model_createKineticLawParameter ( Model_t m)

Creates a new local Parameter_t structure inside the KineticLaw_t structure of the last Reaction_t structure created inside the given model, and returns a pointer to it.

The last KineticLaw_t structure could have been created in a variety of ways. For example, it could have been added using Model_createKineticLaw(), or it could be the result of using Reaction_createKineticLaw() on the Reaction_t structure created by a Model_createReaction(). If a Reaction_t structure does not exist for this model, or the last Reaction_t structure does not contain a KineticLaw_t structure, a new Parameter_t is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the Parameter_t structure created
SpeciesReference_t * Model_createModifier ( Model_t m)

Creates a new modifier SpeciesReference_t structure for a reactant inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it.

The mechanism by which the last Reaction_t structure was created and added to m is not significant. It could have been created in a variety of ways, for example using Model_createReaction(). If a Reaction_t structure does not exist, a new modifier SpeciesReference_t structure is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the modifier SpeciesReference_t structure created
Parameter_t * Model_createParameter ( Model_t m)

Creates a new Parameter_t structure inside the given Model_t and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the Parameter_t structure created
Examples:
createExampleSBML.c.
SpeciesReference_t * Model_createProduct ( Model_t m)

Creates a new SpeciesReference_t structure for a product inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it.

The mechanism by which the last Reaction_t structure was created and added to m is not significant. It could have been created in a variety of ways, for example using Model_createReaction(). If a Reaction_t structure does not exist, a new SpeciesReference_t structure is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the SpeciesReference_t structure created
Rule_t * Model_createRateRule ( Model_t m)

Creates a new RateRule_t structure inside the given Model_t structure and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the RateRule_t structure created.
SpeciesReference_t * Model_createReactant ( Model_t m)

Creates a new SpeciesReference_t structure for a reactant inside the last Reaction_t structure in the given Model_t structure, and returns a pointer to it.

The mechanism by which the last Reaction_t structure was created and added to m is not significant. It could have been created in a variety of ways, for example using Model_createReaction(). If a Reaction_t structure does not exist, a new SpeciesReference_t structure is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the SpeciesReference_t structure created
Reaction_t * Model_createReaction ( Model_t m)

Creates a new Reaction_t structure inside the given Model_t structure and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the Reaction_t structure created.
Examples:
createExampleSBML.c, and spec_example1.c.
Species_t * Model_createSpecies ( Model_t m)

Creates a new Species_t structure inside the given Model_t and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the Species_t structure created
Examples:
createExampleSBML.c, and spec_example1.c.
SpeciesType_t * Model_createSpeciesType ( Model_t m)

Creates a new SpeciesType_t structure inside the given Model_t and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the SpeciesType_t structure created
Trigger_t * Model_createTrigger ( Model_t m)

Creates a new Trigger_t structure inside the last Event_t structure created in the given Model_t structure, and returns a pointer to it.

The mechanism by which the last Event_t structure was created is not significant. It could have been created in a variety of ways, for example by using Model_createEvent(). If an Event_t structure does not exist, a new Trigger_t structure is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the new Trigger_t structure
Unit_t * Model_createUnit ( Model_t m)

Creates a new Unit_t structure inside the last UnitDefinition_t structure created in this model and returns a pointer to it.

The mechanism by which the UnitDefinition_t structure was created is not significant. If a UnitDefinition_t does not exist in this model, a new Unit_t structure is not created and NULL is returned instead.

Parameters
mthe Model_t structure.
Returns
the Unit_t structure created, or NULL.
UnitDefinition_t * Model_createUnitDefinition ( Model_t m)

Creates a new UnitDefinition_t structure inside the given Model_t and returns a pointer to it.

Parameters
mthe Model_t structure.
Returns
the new UnitDefinition_t structure
Examples:
createExampleSBML.c.
Model_t * Model_createWithNS ( SBMLNamespaces_t sbmlns)

Creates a new Model_t structure using the given SBMLNamespaces_t structure.

Parameters
sbmlnsSBMLNamespaces_t, a pointer to an SBMLNamespaces_t structure to assign to this Model_t.
Returns
a pointer to the newly created Model_t structure.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute.
void Model_free ( Model_t m)

Frees the given Model_t structure.

Parameters
mthe Model_structure to free.
const char * Model_getAreaUnits ( const Model_t m)

Get the areaUnits of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the areaUnits of this Model_t structure.
Compartment_t * Model_getCompartment ( Model_t m,
unsigned int  n 
)

Get the nth Compartment_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the Compartment_t sought.
Returns
the Compartment_t if found, or NULL if not found
Examples:
printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
Compartment_t * Model_getCompartmentById ( Model_t m,
const char *  sid 
)

Get the Compartment_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the Compartment_t structure sought.
Returns
the Compartment_t if found, or NULL if not found
CompartmentType_t * Model_getCompartmentType ( Model_t m,
unsigned int  n 
)

Get the nth CompartmentType_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the CompartmentType_t sought.
Returns
the CompartmentType_t if found, or NULL if not found
CompartmentType_t * Model_getCompartmentTypeById ( Model_t m,
const char *  sid 
)

Get the CompartmentType_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the CompartmentType_t structure sought.
Returns
the CompartmentType_t if found, or NULL if not found
Constraint_t * Model_getConstraint ( Model_t m,
unsigned int  n 
)

Get the nth Constraint_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the Constraint_t sought.
Returns
the Constraint_t if found, or NULL if not found
Examples:
printAnnotation.c, printNotes.c, unsetAnnotation.c, and unsetNotes.c.
const char * Model_getConversionFactor ( const Model_t m)

Get the conversionFactor of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the conversionFactor of this Model_t structure.
Event_t * Model_getEvent ( Model_t m,
unsigned int  n 
)

Get the nth Event_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the Event_t sought.
Returns
the Event_t if found, or NULL if not found
Examples:
printAnnotation.c, printMath.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
Event_t * Model_getEventById ( Model_t m,
const char *  sid 
)

Get the Event_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the Event_t structure sought.
Returns
the Event_t if found, or NULL if not found
const char * Model_getExtentUnits ( const Model_t m)

Get the extentUnits of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the extentUnits of this Model_t structure.
FunctionDefinition_t * Model_getFunctionDefinition ( Model_t m,
unsigned int  n 
)

Get the nth FunctionDefinition_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the FunctionDefinition_t sought.
Returns
the FunctionDefinition_t if found, or NULL if not found
Examples:
printAnnotation.c, printMath.c, printNotes.c, unsetAnnotation.c, and unsetNotes.c.
FunctionDefinition_t * Model_getFunctionDefinitionById ( Model_t m,
const char *  sid 
)

Get the FunctionDefinition_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the FunctionDefinition_t structure sought.
Returns
the FunctionDefinition_t if found, or NULL if not found
const char * Model_getId ( const Model_t m)

Get the identifier of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the id of this Model_t structure.
Examples:
createExampleSBML.c, printAnnotation.c, printNotes.c, and printSBML.c.
InitialAssignment_t * Model_getInitialAssignment ( Model_t m,
unsigned int  n 
)

Get the nth InitialAssignment_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the InitialAssignment_t sought.
Returns
the InitialAssignment_t if found, or NULL if not found
Examples:
printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
InitialAssignment_t * Model_getInitialAssignmentBySym ( Model_t m,
const char *  symbol 
)
Returns
the InitialAssignment_t in this Model_t with the given symbol or NULL if no such InitialAssignment_t exists.
Parameters
mthe Model_t structure.
symbolthe symbol to search for.
const char * Model_getLengthUnits ( const Model_t m)

Get the lengthUnits of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the lengthUnits of this Model_t structure.
ListOf_t * Model_getListOfCompartments ( Model_t m)

Get the list of Compartment_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of Compartment_t structures.
ListOf_t * Model_getListOfCompartmentTypes ( Model_t m)

Get the list of CompartmentType_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of CompartmentType_t structures.
ListOf_t * Model_getListOfConstraints ( Model_t m)

Get the list of Constraint_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of Constraint_t structures.
ListOf_t * Model_getListOfEvents ( Model_t m)

Get the list of Event_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of Event_t structures.
ListOf_t * Model_getListOfFunctionDefinitions ( Model_t m)

Get the list of FunctionDefinition_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of FunctionDefinition_t structures
ListOf_t * Model_getListOfInitialAssignments ( Model_t m)

Get the list of InitialAssignment_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of InitialAssignment_t structures.
ListOf_t * Model_getListOfParameters ( Model_t m)

Get the list of Parameter_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of Parameter_t structures.
ListOf_t * Model_getListOfReactions ( Model_t m)

Get the list of Reaction_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of Reaction_t structures.
ListOf_t * Model_getListOfRules ( Model_t m)

Get the list of Rule_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of Rule_t structures.
ListOf_t * Model_getListOfSpecies ( Model_t m)

Get the list of Species_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of Species_t structures.
ListOf_t * Model_getListOfSpeciesTypes ( Model_t m)

Get the list of SpeciesType_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of SpeciesType_t structures.
ListOf_t * Model_getListOfUnitDefinitions ( Model_t m)

Get the list of UnitDefinition_t structures contained in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the list of UnitDefinition_t structures.
ModelHistory_t * Model_getModelHistory ( Model_t m)

Returns the ModelHistory_t of the given Model_t structure.

Returns
the ModelHistory_t of the given Model_t structure.
Parameters
mthe Model_t structure.
const char * Model_getName ( const Model_t m)

Get the name of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the name of this Model_t structure.
const XMLNamespaces_t * Model_getNamespaces ( Model_t m)

Returns a list of XMLNamespaces_t associated with this Model_t structure.

Parameters
mthe Model_t structure.
Returns
pointer to the XMLNamespaces_t structure associated with this structure
unsigned int Model_getNumCompartments ( const Model_t m)

Get the number of Compartment_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Compartment_t structures in m
Examples:
printAnnotation.c, printNotes.c, printSBML.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumCompartmentTypes ( const Model_t m)

Get the number of CompartmentType_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of CompartmentType_t structures in m
Examples:
printSBML.c.
unsigned int Model_getNumConstraints ( const Model_t m)

Get the number of Constraint_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Constraint_t structures in m
Examples:
printAnnotation.c, printNotes.c, printSBML.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumEvents ( const Model_t m)

Get the number of Event_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Event_t structures in m
Examples:
printAnnotation.c, printMath.c, printNotes.c, printSBML.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumFunctionDefinitions ( const Model_t m)

Get the number of FunctionDefinition_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of FunctionDefinition_t structures in m
Examples:
printAnnotation.c, printMath.c, printNotes.c, printSBML.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumInitialAssignments ( const Model_t m)

Get the number of InitialAssignment_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of InitialAssignment_t structures in m
Examples:
printAnnotation.c, printNotes.c, printSBML.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumParameters ( const Model_t m)

Get the number of Parameter_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Parameter_t structures in m
Examples:
printAnnotation.c, printNotes.c, printSBML.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumReactions ( const Model_t m)

Get the number of Reaction_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Reaction_t structures in m
Examples:
addingEvidenceCodes_1.c, printAnnotation.c, printMath.c, printNotes.c, printSBML.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumRules ( const Model_t m)

Get the number of Rule_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Rule_t structures in m
Examples:
printMath.c, printSBML.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumSpecies ( const Model_t m)

Get the number of Species_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Species_t structures in m
Examples:
addCVTerms.c, addingEvidenceCodes_2.c, appendAnnotation.c, printAnnotation.c, printNotes.c, printSBML.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumSpeciesTypes ( const Model_t m)

Get the number of SpeciesType_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of SpeciesType_t structures in m
Examples:
printAnnotation.c, printNotes.c, printSBML.c, unsetAnnotation.c, and unsetNotes.c.
unsigned int Model_getNumSpeciesWithBoundaryCondition ( const Model_t m)

Get the number of Species_t structure in this Model_t structure having nonzero values for their "boundaryCondition" attribute.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of Species_t structures
unsigned int Model_getNumUnitDefinitions ( const Model_t m)

Get the number of UnitDefinition_t structures in the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
an unsigned integer as the count of UnitDefinition_t structures in m
Examples:
printAnnotation.c, printNotes.c, printSBML.c, unsetAnnotation.c, and unsetNotes.c.
Parameter_t * Model_getParameter ( Model_t m,
unsigned int  n 
)

Get the nth Parameter_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the Parameter_t sought.
Returns
the Parameter_t if found, or NULL if not found
Examples:
printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
Parameter_t * Model_getParameterById ( Model_t m,
const char *  sid 
)

Get the Parameter_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the Parameter_t structure sought.
Returns
the Parameter_t if found, or NULL if not found
Reaction_t * Model_getReaction ( Model_t m,
unsigned int  n 
)

Get the nth Reaction_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the Reaction_t sought.
Returns
the Reaction_t if found, or NULL if not found
Examples:
addingEvidenceCodes_1.c, printAnnotation.c, printMath.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
Reaction_t * Model_getReactionById ( Model_t m,
const char *  sid 
)

Get the Reaction_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the Reaction_t structure sought.
Returns
the Reaction_t if found, or NULL if not found
Rule_t * Model_getRule ( Model_t m,
unsigned int  n 
)

Get the nth Rule_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the Rule_t sought.
Returns
the Rule_t if found, or NULL if not found
Examples:
printAnnotation.c, printMath.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
Rule_t * Model_getRuleByVar ( Model_t m,
const char *  variable 
)
Returns
the Rule_t in this Model_t with the given variable or NULL if no such Rule_t exists.
Parameters
mthe Model_t structure.
variablethe variable to search for.
Species_t * Model_getSpecies ( Model_t m,
unsigned int  n 
)

Get the nth Species_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the Species_t sought.
Returns
the Species_t if found, or NULL if not found
Examples:
addCVTerms.c, addingEvidenceCodes_2.c, appendAnnotation.c, printAnnotation.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.
Species_t * Model_getSpeciesById ( Model_t m,
const char *  sid 
)

Get the Species_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the Species_t structure sought.
Returns
the Species_t if found, or NULL if not found
SpeciesReference_t * Model_getSpeciesReferenceById ( Model_t m,
const char *  sid 
)

Get the SpeciesReference_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the SpeciesReference_t structure sought.
Returns
the SpeciesReference_t if found, or NULL if not found
SpeciesType_t * Model_getSpeciesType ( Model_t m,
unsigned int  n 
)

Get the nth SpeciesType_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the SpeciesType_t sought.
Returns
the SpeciesType_t if found, or NULL if not found
Examples:
printAnnotation.c, printNotes.c, unsetAnnotation.c, and unsetNotes.c.
SpeciesType_t * Model_getSpeciesTypeById ( Model_t m,
const char *  sid 
)

Get the SpeciesType_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the SpeciesType_t structure sought.
Returns
the SpeciesType_t if found, or NULL if not found
const char * Model_getSubstanceUnits ( const Model_t m)

Get the substanceUnits of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the substanceUnits of this Model_t structure.
const char * Model_getTimeUnits ( const Model_t m)

Get the timeUnits of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the timeUnits of this Model_t structure.
UnitDefinition_t * Model_getUnitDefinition ( Model_t m,
unsigned int  n 
)

Get the nth UnitDefinition_t structure contained in the given Model_t structure.

Parameters
mthe Model_t structure.
nthe integer index of the UnitDefinition_t sought.
Returns
the UnitDefinition_t if found, or NULL if not found
Examples:
printAnnotation.c, printNotes.c, unsetAnnotation.c, and unsetNotes.c.
UnitDefinition_t * Model_getUnitDefinitionById ( Model_t m,
const char *  sid 
)

Get the UnitDefinition_t structure whose identifier is sid in the given Model_t structure.

Parameters
mthe Model_t structure.
sidthe identifier of the UnitDefinition_t structure sought.
Returns
the UnitDefinition_t if found, or NULL if not found
const char * Model_getVolumeUnits ( const Model_t m)

Get the volumeUnits of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
the volumeUnits of this Model_t structure.
int Model_isSetAreaUnits ( const Model_t m)

Predicate for testing whether the areaUnits of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "areaUnits" attribute of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetConversionFactor ( const Model_t m)

Predicate for testing whether the conversionFactor of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "conversionFactor" attribute of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetExtentUnits ( const Model_t m)

Predicate for testing whether the extentUnits of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "extentUnits" attribute of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetId ( const Model_t m)

Predicate for testing whether the identifier of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "id" attribute of this Model_t structure is set, 0 (false) otherwise.
Examples:
printSBML.c.
int Model_isSetLengthUnits ( const Model_t m)

Predicate for testing whether the lengthUnits of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "lengthUnits" attribute of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetModelHistory ( Model_t m)

Predicate for testing whether the ModelHistory_t of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the ModelHistory_t of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetName ( const Model_t m)

Predicate for testing whether the name of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "name" attribute of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetSubstanceUnits ( const Model_t m)

Predicate for testing whether the substanceUnits of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "substanceUnits" attribute of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetTimeUnits ( const Model_t m)

Predicate for testing whether the timeUnits of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "timeUnits" attribute of this Model_t structure is set, 0 (false) otherwise.
int Model_isSetVolumeUnits ( const Model_t m)

Predicate for testing whether the volumeUnits of a given Model_t structure is assigned.

Parameters
mthe Model_t structure.
Returns
1 (true) if the "volumeUnits" attribute of this Model_t structure is set, 0 (false) otherwise.
Compartment_t * Model_removeCompartment ( Model_t m,
unsigned int  n 
)

Removes the nth Compartment_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the Compartment_t sought.
Returns
the Compartment_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Compartment_t * Model_removeCompartmentById ( Model_t m,
const char *  sid 
)

Removes the Compartment_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the Compartment_t sought.
Returns
the Compartment_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no Compartment_t structure with the identifier exists in this Model_t structure.
CompartmentType_t * Model_removeCompartmentType ( Model_t m,
unsigned int  n 
)

Removes the nth CompartmentType_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the CompartmentType_t sought.
Returns
the CompartmentType_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
CompartmentType_t * Model_removeCompartmentTypeById ( Model_t m,
const char *  sid 
)

Removes the CompartmentType_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the CompartmentType_t sought.
Returns
the CompartmentType_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no CompartmentType_t structure with the identifier exists in this Model_t structure.
Constraint_t * Model_removeConstraint ( Model_t m,
unsigned int  n 
)

Removes the nth Constraint_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the Constraint_t sought.
Returns
the Constraint_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Event_t * Model_removeEvent ( Model_t m,
unsigned int  n 
)

Removes the nth Event_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the Event_t sought.
Returns
the Event_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Event_t * Model_removeEventById ( Model_t m,
const char *  sid 
)

Removes the Event_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the Event_t sought.
Returns
the Event_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no Event_t structure with the identifier exists in this Model_t structure.
FunctionDefinition_t * Model_removeFunctionDefinition ( Model_t m,
unsigned int  n 
)

Removes the nth FunctionDefinition_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the FunctionDefinition_t sought.
Returns
the FunctionDefinition_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
FunctionDefinition_t * Model_removeFunctionDefinitionById ( Model_t m,
const char *  sid 
)

Removes the FunctionDefinition_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the FunctionDefinition_t sought.
Returns
the FunctionDefinition_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no FunctionDefinition_t structure with the identifier exists in this Model_t structure.
InitialAssignment_t * Model_removeInitialAssignment ( Model_t m,
unsigned int  n 
)

Removes the nth InitialAssignment_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the InitialAssignment_t sought.
Returns
the InitialAssignment_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
InitialAssignment_t * Model_removeInitialAssignmentBySym ( Model_t m,
const char *  symbol 
)

Removes the InitialAssignment_t structure with the given "symbol" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
symbolthe string of the "symbol" attribute of the InitialAssignment_t sought.
Returns
the InitialAssignment_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no InitialAssignment_t structure with the "symbol" attribute exists in this Model_t structure.
Parameter_t * Model_removeParameter ( Model_t m,
unsigned int  n 
)

Removes the nth Parameter_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the Parameter_t sought.
Returns
the Parameter_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Parameter_t * Model_removeParameterById ( Model_t m,
const char *  sid 
)

Removes the Parameter_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the Parameter_t sought.
Returns
the Parameter_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no Parameter_t structure with the identifier exists in this Model_t structure.
Reaction_t * Model_removeReaction ( Model_t m,
unsigned int  n 
)

Removes the nth Reaction_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the Reaction_t sought.
Returns
the Reaction_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Reaction_t * Model_removeReactionById ( Model_t m,
const char *  sid 
)

Removes the Reaction_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the Reaction_t sought.
Returns
the Reaction_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no Reaction_t structure with the identifier exists in this Model_t structure.
Rule_t * Model_removeRule ( Model_t m,
unsigned int  n 
)

Removes the nth Rule_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the Rule_t sought.
Returns
the Rule_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Rule_t * Model_removeRuleByVar ( Model_t m,
const char *  variable 
)

Removes the Rule_t structure with the given "variable" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
variablethe string of the "variable" attribute of the Rule_t sought.
Returns
the Rule_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no Rule_t structure with the "variable" attribute exists in this Model_t structure.
Species_t * Model_removeSpecies ( Model_t m,
unsigned int  n 
)

Removes the nth Species_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the Species_t sought.
Returns
the Species_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Species_t * Model_removeSpeciesById ( Model_t m,
const char *  sid 
)

Removes the Species_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the Species_t sought.
Returns
the Species_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no Species_t structure with the identifier exists in this Model_t structure.
SpeciesType_t * Model_removeSpeciesType ( Model_t m,
unsigned int  n 
)

Removes the nth SpeciesType_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the SpeciesType_t sought.
Returns
the SpeciesType_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
SpeciesType_t * Model_removeSpeciesTypeById ( Model_t m,
const char *  sid 
)

Removes the SpeciesType_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the SpeciesType_t sought.
Returns
the SpeciesType_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no SpeciesType_t structure with the identifier exists in this Model_t structure.
UnitDefinition_t * Model_removeUnitDefinition ( Model_t m,
unsigned int  n 
)

Removes the nth UnitDefinition_t structure from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
nthe integer index of the UnitDefinition_t sought.
Returns
the UnitDefinition_t structure removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
UnitDefinition_t * Model_removeUnitDefinitionById ( Model_t m,
const char *  sid 
)

Removes the UnitDefinition_t structure with the given "id" attribute from this Model_t structure and returns a pointer to it.

The caller owns the returned structure and is responsible for deleting it.

Parameters
mthe Model_t structure.
sidthe string of the "id" attribute of the UnitDefinition_t sought.
Returns
the UnitDefinition_t structure removed. As mentioned above, the caller owns the returned structure. NULL is returned if no UnitDefinition_t structure with the identifier exists in this Model_t structure.
int Model_setAreaUnits ( Model_t m,
const char *  units 
)

Set the areaUnits attribute of a given Model_t structure.

This copies the string in units.

Parameters
mthe Model_t structure.
unitsthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with units NULL is equivalent to unsetting the "areaUnits" attribute.
int Model_setConversionFactor ( Model_t m,
const char *  sid 
)

Set the conversionFactor attribute of a given Model_t structure.

This copies the string in sid.

Parameters
mthe Model_t structure.
sidthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with sid NULL is equivalent to unsetting the "conversionFactor" attribute.
int Model_setExtentUnits ( Model_t m,
const char *  units 
)

Set the extentUnits attribute of a given Model_t structure.

This copies the string in units.

Parameters
mthe Model_t structure.
unitsthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with units NULL is equivalent to unsetting the "extentUnits" attribute.
int Model_setId ( Model_t m,
const char *  sid 
)

Set the identifier of a given Model_t structure.

This copies the string in sid.

Parameters
mthe Model_t structure.
sidthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with an sid of NULL is equivalent to unsetting the "id" attribute.
Examples:
createExampleSBML.c, and spec_example1.c.
int Model_setLengthUnits ( Model_t m,
const char *  units 
)

Set the lengthUnits attribute of a given Model_t structure.

This copies the string in units.

Parameters
mthe Model_t structure.
unitsthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with units NULL is equivalent to unsetting the "lengthUnits" attribute.
int Model_setModelHistory ( Model_t m,
ModelHistory_t history 
)

Set the ModelHistory_t of the given Model_t structure.

Parameters
mthe Model_t structure.
historythe ModelHistory_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
addModelHistory.c.
int Model_setName ( Model_t m,
const char *  name 
)

Set the identifier of the given Model_t structure.

This copies the string in name.

Parameters
mthe Model_t structure.
namethe name string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with the name set to NULL is equivalent to unsetting the "name" attribute.
Examples:
spec_example1.c.
int Model_setSubstanceUnits ( Model_t m,
const char *  units 
)

Set the substanceUnits attribute of a given Model_t structure.

This copies the string in units.

Parameters
mthe Model_t structure.
unitsthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with units NULL is equivalent to unsetting the "substanceUnits" attribute.
int Model_setTimeUnits ( Model_t m,
const char *  units 
)

Set the timeUnits attribute of a given Model_t structure.

This copies the string in units.

Parameters
mthe Model_t structure.
unitsthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with units NULL is equivalent to unsetting the "timeUnits" attribute.
int Model_setVolumeUnits ( Model_t m,
const char *  units 
)

Set the volumeUnits attribute of a given Model_t structure.

This copies the string in units.

Parameters
mthe Model_t structure.
unitsthe identifier string.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with units NULL is equivalent to unsetting the "volumeUnits" attribute.
int Model_unsetAreaUnits ( Model_t m)

Unsets the "areaUnits" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetConversionFactor ( Model_t m)

Unsets the "conversionFactor" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetExtentUnits ( Model_t m)

Unsets the "extentUnits" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetId ( Model_t m)

Unsets the "id" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetLengthUnits ( Model_t m)

Unsets the "lengthUnits" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetModelHistory ( Model_t m)

Unsets the ModelHistory_t of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetName ( Model_t m)

Unsets the "name" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetSubstanceUnits ( Model_t m)

Unsets the "substanceUnits" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetTimeUnits ( Model_t m)

Unsets the "timeUnits" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int Model_unsetVolumeUnits ( Model_t m)

Unsets the "volumeUnits" attribute of the given Model_t structure.

Parameters
mthe Model_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: