libSBML C API
5.18.0
|
The FbcModelPlugin_t object is used to extend the standard SBML Model_t object with features used in the SBML Level 3 Flux Balance Constraints (“fbc”) package. In Version 1 of the “fbc” specification, the extended Model_t class has two optional subobjects: ListOfObjectives_t and ListOfFluxBounds_t. In Version 2 of the specification, the extended Model_t object is defined differently: it is extended with a new required attribute named "strict", and the two optional subobjects ListOfObjectives_t and ListOfGeneProducts_t. (ListOfFluxBounds_t is not used in Version 2.)
The mandatory attribute "strict", of type boolean
, in Version 2 of this package, is used to apply an additional set of restrictions to the model. The "strict" attribute helps ensure that the Flux Balance Constraints package can be used to encode legacy flux-balance analysis models expressible as Linear Programs (LP's) for software that is unable to analyze arbitrary mathematical expressions that may appear in an SBML model. In addition, a "strict" model is fully described and mathematically consistent, for example, by ensuring that all fluxes have a valid upper or lower bound.
The following restrictions are in effect if an “fbc” model object has a value of "true"
for the attribute "strict" on Model_t:
"true"
and its "value" attribute set to a value of type double
. This value may not be "NaN"
.double
value that is not "NaN"
, nor "-INF"
, nor "INF"
. In addition, the value of their "constant" attribute must be set to "true"
.double
value that is not "NaN"
, nor "-INF"
, nor "INF"
."INF"
."-INF"
.While it is not compulsory for a "strict" Flux Balance Constraints model to define an Objective_t, doing so does does allow the model to be formulated as a Linear Program and optimized. However, this decision is left to the modeler. Note that all other properties of the objects referred to in the list above are to be set as specified in the relevant SBML Level 3 Version 1 Core and Flux Balance Constraints (“fbc”) specifications.
Alternatively, if the value of the strict attribute is "false"
, then none of these restrictions apply and the model creator can choose to define “fbc” models that are not necessarily encodable as an LP. For example, if strict is "false"
, the InitialAssignment_t construct may be used to set any valid numerical entity, including Parameter_t values and stoichiometric coefficients, with any value of type double
. In addition, Parameter_t elements are no longer required to be flagged as constant, thus allowing for a Flux Balance Constraints model's use in alternative, hybrid modeling strategies.
The ListOfObjectives_t is used to define the objectives of a given “fbc” model. Objectives generally consist of linear combinations of model variables (fluxes) and a direction for the optimality constraint (either maximization or minimization). Each Objective_t has a ListOfFluxObjectives_t subobjects.
In Version 2 of “fbc”, the ListOfGeneProducts_t is used to define the gene products represented by the “fbc” model.
In Version 1 of “fbc”, there is no ListOfGeneProducts_t, and instead, Model_t can have an optional ListOfFluxBounds_t.
Public Member Functions | |
int | FbcModelPlugin_addFluxBound (SBasePlugin_t *fmp, FluxBound_t *fb) |
Appends a copy of the given FluxBound_t structure to the given FbcModelPlugin_t structure. More... | |
int | FbcModelPlugin_addGeneProduct (SBasePlugin_t *fmp, GeneProduct_t *fb) |
Appends a copy of the given GeneProduct_t structure to the given FbcModelPlugin_t structure. More... | |
int | FbcModelPlugin_addObjective (SBasePlugin_t *fmp, Objective_t *obj) |
Appends a copy of the given Objective_t structure to the given FbcModelPlugin_t structure. More... | |
char * | FbcModelPlugin_getActiveObjectiveId (SBasePlugin_t *fmp) |
Takes a FbcModelPlugin_t structure and returns the id of the current activeObjective. More... | |
FluxBound_t * | FbcModelPlugin_getFluxBound (SBasePlugin_t *fmp, unsigned int n) |
Return a specific FluxBound_t structure of the given FbcModelPlugin_t. More... | |
GeneProduct_t * | FbcModelPlugin_getGeneProduct (SBasePlugin_t *fmp, unsigned int n) |
Return a specific GeneProduct_t structure of the given FbcModelPlugin_t. More... | |
unsigned int | FbcModelPlugin_getNumFluxBounds (SBasePlugin_t *fmp) |
Returns the number of FluxBound_t structures attached to the given FbcModelPlugin_t. More... | |
unsigned int | FbcModelPlugin_getNumGeneProducts (SBasePlugin_t *fmp) |
Returns the number of GeneProduct_t structures attached to the given FbcModelPlugin_t. More... | |
unsigned int | FbcModelPlugin_getNumObjectives (SBasePlugin_t *fmp) |
Returns the number of Objective_t structures attached to the given FbcModelPlugin_t. More... | |
Objective_t * | FbcModelPlugin_getObjective (SBasePlugin_t *fmp, unsigned int n) |
Return a specific Objective_t structure of the given FbcModelPlugin_t. More... | |
int | FbcModelPlugin_getStrict (SBasePlugin_t *fmp) |
Takes a FbcModelPlugin_t structure and returns the value of the strict attribute. More... | |
int | FbcModelPlugin_setActiveObjectiveId (SBasePlugin_t *fmp, const char *activeObjective) |
Sets the activeObjective of the given FbcModelPlugin_t to a copy of activeObjective . More... | |
int | FbcModelPlugin_setStrict (SBasePlugin_t *fmp, int strict) |
Sets the strict attribute of the given FbcModelPlugin_t. More... | |
int FbcModelPlugin_addFluxBound | ( | SBasePlugin_t * | fmp, |
FluxBound_t * | fb | ||
) |
Appends a copy of the given FluxBound_t structure to the given FbcModelPlugin_t structure.
fmp | the FbcModelPlugin_t structure to which the FluxBound_t should be added. |
fb | a FluxBound_t structure to add. |
int FbcModelPlugin_addGeneProduct | ( | SBasePlugin_t * | fmp, |
GeneProduct_t * | fb | ||
) |
Appends a copy of the given GeneProduct_t structure to the given FbcModelPlugin_t structure.
fmp | the FbcModelPlugin_t structure to which the GeneProduct_t should be added. |
fb | a GeneProduct_t structure to add. |
int FbcModelPlugin_addObjective | ( | SBasePlugin_t * | fmp, |
Objective_t * | obj | ||
) |
Appends a copy of the given Objective_t structure to the given FbcModelPlugin_t structure.
fmp | the FbcModelPlugin_t structure to which the Objective_t should be added. |
obj | an Objective_t structure to add. |
char * FbcModelPlugin_getActiveObjectiveId | ( | SBasePlugin_t * | fmp | ) |
Takes a FbcModelPlugin_t structure and returns the id of the current activeObjective.
fmp | the FbcModelPlugin_t whose id of the current activeObjective is sought. |
FluxBound_t * FbcModelPlugin_getFluxBound | ( | SBasePlugin_t * | fmp, |
unsigned int | n | ||
) |
Return a specific FluxBound_t structure of the given FbcModelPlugin_t.
fmp | the FbcModelPlugin_t structure to use. |
n | an integer, the index of the FluxBound_t structure to return. |
NULL
if no such FluxBound_t exists. GeneProduct_t * FbcModelPlugin_getGeneProduct | ( | SBasePlugin_t * | fmp, |
unsigned int | n | ||
) |
Return a specific GeneProduct_t structure of the given FbcModelPlugin_t.
fmp | the FbcModelPlugin_t structure to use. |
n | an integer, the index of the GeneProduct_t structure to return. |
NULL
if no such GeneProduct_t exists. unsigned int FbcModelPlugin_getNumFluxBounds | ( | SBasePlugin_t * | fmp | ) |
Returns the number of FluxBound_t structures attached to the given FbcModelPlugin_t.
fmp | the FbcModelPlugin_t structure to use. |
unsigned int FbcModelPlugin_getNumGeneProducts | ( | SBasePlugin_t * | fmp | ) |
Returns the number of GeneProduct_t structures attached to the given FbcModelPlugin_t.
fmp | the GeneProduct_t structure to use. |
unsigned int FbcModelPlugin_getNumObjectives | ( | SBasePlugin_t * | fmp | ) |
Returns the number of Objective_t structures attached to the given FbcModelPlugin_t.
fmp | the FbcModelPlugin_t structure to use. |
Objective_t * FbcModelPlugin_getObjective | ( | SBasePlugin_t * | fmp, |
unsigned int | n | ||
) |
Return a specific Objective_t structure of the given FbcModelPlugin_t.
fmp | the FbcModelPlugin_t structure to use. |
n | an integer, the index of the Objective_t structure to return. |
NULL
if no such Objective_t exists. int FbcModelPlugin_getStrict | ( | SBasePlugin_t * | fmp | ) |
Takes a FbcModelPlugin_t structure and returns the value of the strict attribute.
fmp | the FbcModelPlugin_t whose 'strict' attribute is sought. |
int FbcModelPlugin_setActiveObjectiveId | ( | SBasePlugin_t * | fmp, |
const char * | activeObjective | ||
) |
Sets the activeObjective of the given FbcModelPlugin_t to a copy of activeObjective
.
fmp | the FbcModelPlugin_t structure to set. |
activeObjective | the activeObjective to assign to the given FbcModelPlugin_t's "activeObjective" attribute. |
int FbcModelPlugin_setStrict | ( | SBasePlugin_t * | fmp, |
int | strict | ||
) |
Sets the strict attribute of the given FbcModelPlugin_t.
fmp | the FbcModelPlugin_t structure to set. |
strict | bool value of the "strict" attribute to be set, with 0 indicating 'false', and all other values indicating 'true'. |