|
libSBML C API
5.18.0
|
An integral component in a complete description of a steady-state model is the so-called objective function, which generally consists of a linear combination of model variables (fluxes) and a sense (direction). In the SBML Level 3 Flux Balance Constraints (“fbc”) package, this concept is succinctly captured in the Objective_t class. An Objective_t object includes a list of flux objectives, each in the form of a FluxObjective_t object.
The FluxObjective_t class is a relatively simple container for a model variable weighted by a signed linear coefficient. In addition to the common SBML object attributes of "id" and "name" (both of which are optional), it adds two required attributes: "reaction" and "coefficient".
The "reaction" attribute must have a value of type SIdRef, and its value is restricted to the identifier of a Reaction_t object in the model. The "reaction" attribute identifiers the reaction to which the FluxObjective_t applies. The "coefficient" attribute must have a value of type double, and refers to the coefficient that this FluxObjective_t takes in the enclosing Objective_t. Its unit of measurement is dimensionless. The meaning of these two attributes together is given by the formula coefficient × reaction-flux. Since reactions in SBML Level 3 are in units of extent, the units of a flux objective are thus extent per time.
The following example * illustrates the use of these attributes in an example of a * ListOfObjectives_t:
<fbc:listOfObjectives fbc:activeObjective="obj1"> <fbc:objective fbc:id="obj1" fbc:type="maximize"> <fbc:listOfFluxObjectives> <fbc:fluxObjective fbc:reaction="R1" fbc:coefficient="1"/> <fbc:fluxObjective fbc:reaction="R2" fbc:coefficient="2"/> </fbc:listOfFluxObjectives> </fbc:objective> </fbc:listOfObjectives>
Public Member Functions | |
| FluxObjective_t * | FluxObjective_clone (FluxObjective_t *fo) |
| Creates a deep copy of the given FluxObjective_t structure. More... | |
| FluxObjective_t * | FluxObjective_create (unsigned int level, unsigned int version, unsigned int pkgVersion) |
Creates a new FluxObjective_t structure using the given SBML level and version, and the pkgVersion package version. More... | |
| void | FluxObjective_free (FluxObjective_t *fo) |
| Frees the given FluxObjective_t structure. More... | |
| double | FluxObjective_getCoefficient (const FluxObjective_t *fo) |
| Returns the value of the "coefficient" attribute of the given FluxObjective_t structure. More... | |
| const char * | FluxObjective_getId (const FluxObjective_t *fo) |
| Returns the value of the "id" attribute of the given FluxObjective_t structure. More... | |
| const char * | FluxObjective_getName (const FluxObjective_t *fo) |
| Returns the value of the "name" attribute of the given FluxObjective_t structure. More... | |
| const char * | FluxObjective_getReaction (const FluxObjective_t *fo) |
| Returns the value of the "reaction" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_hasRequiredAttributes (const FluxObjective_t *fo) |
Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given FluxObjective_t structure have been set. More... | |
| int | FluxObjective_isSetCoefficient (const FluxObjective_t *fo) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "coefficient" is set. More... | |
| int | FluxObjective_isSetId (const FluxObjective_t *fo) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "id" is set. More... | |
| int | FluxObjective_isSetName (const FluxObjective_t *fo) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "name" is set. More... | |
| int | FluxObjective_isSetReaction (const FluxObjective_t *fo) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "reaction" is set. More... | |
| int | FluxObjective_setCoefficient (FluxObjective_t *fo, double coefficient) |
| Sets the "coefficient" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_setId (FluxObjective_t *fo, const char *id) |
| Sets the "id" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_setName (FluxObjective_t *fo, const char *name) |
| Sets the "name" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_setReaction (FluxObjective_t *fo, const char *reaction) |
| Sets the "reaction" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_unsetCoefficient (FluxObjective_t *fo) |
| Unsets the value of the "coefficient" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_unsetId (FluxObjective_t *fo) |
| Unsets the value of the "id" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_unsetName (FluxObjective_t *fo) |
| Unsets the value of the "name" attribute of the given FluxObjective_t structure. More... | |
| int | FluxObjective_unsetReaction (FluxObjective_t *fo) |
| Unsets the value of the "reaction" attribute of the given FluxObjective_t structure. More... | |
| FluxObjective_t * | ListOfFluxObjectives_getById (ListOf_t *lo, const char *sid) |
Return the structure indicated by the given sid. More... | |
| FluxObjective_t * | ListOfFluxObjectives_removeById (ListOf_t *lo, const char *sid) |
Removes the structure with the given sid from the given ListOf_t structure and returns a pointer to it. More... | |
| FluxObjective_t * FluxObjective_clone | ( | FluxObjective_t * | fo | ) |
Creates a deep copy of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure to be copied. |
| FluxObjective_t * FluxObjective_create | ( | unsigned int | level, |
| unsigned int | version, | ||
| unsigned int | pkgVersion | ||
| ) |
Creates a new FluxObjective_t structure using the given SBML level and version, and the pkgVersion package version.
| level | an unsigned int, the SBML level to assign to this FluxObjective_t structure. |
| version | an unsigned int, the SBML version to assign to this FluxObjective_t structure. |
| pkgVersion | an unsigned int, the version of the package to assign to this FluxObjective_t structure. |
| void FluxObjective_free | ( | FluxObjective_t * | fo | ) |
Frees the given FluxObjective_t structure.
| fo | the FluxObjective_t structure to be freed. |
| double FluxObjective_getCoefficient | ( | const FluxObjective_t * | fo | ) |
Returns the value of the "coefficient" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| const char * FluxObjective_getId | ( | const FluxObjective_t * | fo | ) |
Returns the value of the "id" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| const char * FluxObjective_getName | ( | const FluxObjective_t * | fo | ) |
Returns the value of the "name" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| const char * FluxObjective_getReaction | ( | const FluxObjective_t * | fo | ) |
Returns the value of the "reaction" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| int FluxObjective_hasRequiredAttributes | ( | const FluxObjective_t * | fo | ) |
Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given FluxObjective_t structure have been set.
| fo | the FluxObjective_t structure to check. |
1 (true) if all the required attributes for this structure have been defined, 0 (false) otherwise. | int FluxObjective_isSetCoefficient | ( | const FluxObjective_t * | fo | ) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "coefficient" is set.
| fo | the FluxObjective_t structure. |
1 (true) if the "coefficient" of this FluxObjective_t structure is set, 0 (false) otherwise. | int FluxObjective_isSetId | ( | const FluxObjective_t * | fo | ) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "id" is set.
| fo | the FluxObjective_t structure. |
1 (true) if the "id" of this FluxObjective_t structure is set, 0 (false) otherwise. | int FluxObjective_isSetName | ( | const FluxObjective_t * | fo | ) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "name" is set.
| fo | the FluxObjective_t structure. |
1 (true) if the "name" of this FluxObjective_t structure is set, 0 (false) otherwise. | int FluxObjective_isSetReaction | ( | const FluxObjective_t * | fo | ) |
Predicate returning 1 (true) if the given FluxObjective_t structure's "reaction" is set.
| fo | the FluxObjective_t structure. |
1 (true) if the "reaction" of this FluxObjective_t structure is set, 0 (false) otherwise. | int FluxObjective_setCoefficient | ( | FluxObjective_t * | fo, |
| double | coefficient | ||
| ) |
Sets the "coefficient" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| coefficient | the string to which the structures "coefficient" attribute should be set. |
| int FluxObjective_setId | ( | FluxObjective_t * | fo, |
| const char * | id | ||
| ) |
Sets the "id" attribute of the given FluxObjective_t structure.
This function copies the string given in id. If the string is a null pointer, this function is equivalent to calling FluxObjective_unsetId().
| fo | the FluxObjective_t structure. |
| id | the string to which the structures "id" attribute should be set. |
id is equivalent to unsetting the value of the "id" attribute. | int FluxObjective_setName | ( | FluxObjective_t * | fo, |
| const char * | name | ||
| ) |
Sets the "name" attribute of the given FluxObjective_t structure.
This function copies the string given in name. If the string is a null pointer, this function is equivalent to calling FluxObjective_unsetName().
| fo | the FluxObjective_t structure. |
| name | the string to which the structures "name" attribute should be set. |
name is equivalent to unsetting the value of the "name" attribute. | int FluxObjective_setReaction | ( | FluxObjective_t * | fo, |
| const char * | reaction | ||
| ) |
Sets the "reaction" attribute of the given FluxObjective_t structure.
This function copies the string given in reaction. If the string is a null pointer, this function is equivalent to calling FluxObjective_unsetReaction().
| fo | the FluxObjective_t structure. |
| reaction | the string to which the structures "reaction" attribute should be set. |
reaction is equivalent to unsetting the value of the "reaction" attribute. | int FluxObjective_unsetCoefficient | ( | FluxObjective_t * | fo | ) |
Unsets the value of the "coefficient" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| int FluxObjective_unsetId | ( | FluxObjective_t * | fo | ) |
Unsets the value of the "id" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| int FluxObjective_unsetName | ( | FluxObjective_t * | fo | ) |
Unsets the value of the "name" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| int FluxObjective_unsetReaction | ( | FluxObjective_t * | fo | ) |
Unsets the value of the "reaction" attribute of the given FluxObjective_t structure.
| fo | the FluxObjective_t structure. |
| FluxObjective_t * ListOfFluxObjectives_getById | ( | ListOf_t * | lo, |
| const char * | sid | ||
| ) |
Return the structure indicated by the given sid.
| lo | the ListOf_t structure to use. |
| sid | a string matching the "id" attribute of the element sought. |
NULL if no such object exists in the list. | FluxObjective_t * ListOfFluxObjectives_removeById | ( | ListOf_t * | lo, |
| const char * | sid | ||
| ) |
Removes the structure with the given sid from the given ListOf_t structure and returns a pointer to it.
The caller owns the returned structure and is responsible for deleting it.
| lo | the ListOf_t structure. |
| sid | the string of the "id" attribute of the sought structure. |
NULL is returned if no structure with the "id" attribute exists in the given ListOf_t structure.