libSBML C API  5.18.0
Rule_t Class Reference

Detailed Description

Parent class for SBML rules in libSBML.

In SBML, rules provide additional ways to define the values of variables in a model, their relationships, and the dynamical behaviors of those variables. They enable encoding relationships that cannot be expressed using Reaction_t nor InitialAssignment_t objects alone.

The libSBML implementation of rules mirrors the SBML Level 3 definition (which is in turn is very similar to the Level 2 Version 4 definition), with Rule_t being the parent class of three subclasses as explained below. The Rule_t class itself cannot be instantiated by user programs and has no constructor; only the subclasses AssignmentRule_t, AlgebraicRule_t and RateRule_t can be instantiated directly.

General summary of SBML rules

In SBML Level 3 as well as Level 2, rules are separated into three subclasses for the benefit of model analysis software. The three subclasses are based on the following three different possible functional forms (where x is a variable, f is some arbitrary function returning a numerical result, V is a vector of variables that does not include x, and W is a vector of variables that may include x):

Algebraic:left-hand side is zero0 = f(W)
Assignment:left-hand side is a scalar:x = f(V)
Rate:left-hand side is a rate-of-change:dx/dt = f(W)

In their general form given above, there is little to distinguish between assignment and algebraic rules. They are treated as separate cases for the following reasons:

  • Assignment rules can simply be evaluated to calculate intermediate values for use in numerical methods. They are statements of equality that hold at all times. (For assignments that are only performed once, see InitialAssignment_t.)
  • SBML needs to place restrictions on assignment rules, for example the restriction that assignment rules cannot contain algebraic loops.
  • Some simulators do not contain numerical solvers capable of solving unconstrained algebraic equations, and providing more direct forms such as assignment rules may enable those simulators to process models they could not process if the same assignments were put in the form of general algebraic equations;
  • Those simulators that can solve these algebraic equations make a distinction between the different categories listed above; and
  • Some specialized numerical analyses of models may only be applicable to models that do not contain algebraic rules.

The approach taken to covering these cases in SBML is to define an abstract Rule_t structure containing a subelement, "math", to hold the right-hand side expression, then to derive subtypes of Rule_t that add attributes to distinguish the cases of algebraic, assignment and rate rules. The "math" subelement must contain a MathML expression defining the mathematical formula of the rule. This MathML formula must return a numerical value. The formula can be an arbitrary expression referencing the variables and other entities in an SBML model.

Each of the three subclasses of Rule_t (AssignmentRule_t, AlgebraicRule_t, RateRule_t) inherit the the "math" subelement and other fields from SBase_t. The AssignmentRule_t and RateRule_t classes add an additional attribute, "variable". See the definitions of AssignmentRule_t, AlgebraicRule_t and RateRule_t for details about the structure and interpretation of each one.

Additional restrictions on SBML rules

An important design goal of SBML rule semantics is to ensure that a model's simulation and analysis results will not be dependent on when or how often rules are evaluated. To achieve this, SBML needs to place two restrictions on rule use. The first concerns algebraic loops in the system of assignments in a model, and the second concerns overdetermined systems.

A model must not contain algebraic loops

The combined set of InitialAssignment_t, AssignmentRule_t and KineticLaw_t objects in a model constitute a set of assignment statements that should be considered as a whole. (A KineticLaw_t object is counted as an assignment because it assigns a value to the symbol contained in the "id" attribute of the Reaction_t object in which it is defined.) This combined set of assignment statements must not contain algebraic loops—dependency chains between these statements must terminate. To put this more formally, consider a directed graph in which nodes are assignment statements and directed arcs exist for each occurrence of an SBML species, compartment or parameter symbol in an assignment statement's "math" subelement. Let the directed arcs point from the statement assigning the symbol to the statements that contain the symbol in their "math" subelement expressions. This graph must be acyclic.

Similarly, the combined set of RateRule_t and Reaction_t objects constitute a set of definitions for the rates of change of various model entities (namely, the objects identified by the values of the 'variable' attributes of the RateRule_t objects, and the 'species' attributes of the SpeciesReference_t objects in each Reaction_t). In SBML Level 3 Version 2, these rates of change may be referenced directly using the rateOf csymbol, but may not thereby contain algebraic loops—dependency chains between these statements must terminate. More formally, consider a directed graph in which the nodes are the definitions of different variables' rates of change, and directed arcs exist for each occurrence of a variable referenced by a rateOf csymbol from any RateRule_t or KineticLaw_t object in the model. Let the directed arcs point from the variable referenced by the rateOf csymbol (call it x) to the variable(s) determined by the 'math' expression in which x appears. This graph must be acyclic.

SBML does not specify when or how often rules should be evaluated. Eliminating algebraic loops ensures that assignment statements can be evaluated any number of times without the result of those evaluations changing. As an example, consider the set of equations x = x + 1, y = z + 200 and z = y + 100. If this set of equations were interpreted as a set of assignment statements, it would be invalid because the rule for x refers to x (exhibiting one type of loop), and the rule for y refers to z while the rule for z refers back to y (exhibiting another type of loop). Conversely, the following set of equations would constitute a valid set of assignment statements: x = 10, y = z + 200, and z = x + 100.

A model must not be overdetermined

An SBML model must not be overdetermined; that is, a model must not define more equations than there are unknowns in a model. A valid SBML model that does not contain AlgebraicRule_t structures cannot be overdetermined.

LibSBML implements the static analysis procedure described in Appendix B of the SBML Level 3 specification for assessing whether a model is overdetermined.

(In summary, assessing whether a given continuous, deterministic, mathematical model is overdetermined does not require dynamic analysis; it can be done by analyzing the system of equations created from the model. One approach is to construct a bipartite graph in which one set of vertices represents the variables and the other the set of vertices represents the equations. Place edges between vertices such that variables in the system are linked to the equations that determine them. For algebraic equations, there will be edges between the equation and each variable occurring in the equation. For ordinary differential equations (such as those defined by rate rules or implied by the reaction rate definitions), there will be a single edge between the equation and the variable determined by that differential equation. A mathematical model is overdetermined if the maximal matchings of the bipartite graph contain disconnected vertexes representing equations. If one maximal matching has this property, then all the maximal matchings will have this property; i.e., it is only necessary to find one maximal matching.)

Rule_t types for SBML Level 1

SBML Level 1 uses a different scheme than SBML Level 2 and Level 3 for distinguishing rules; specifically, it uses an attribute whose value is drawn from an enumeration of 3 values. LibSBML supports this using methods that work a libSBML enumeration type, RuleType_t, whose values are listed below.

Examples:
printAnnotation.c, printMath.c, printNotes.c, printUnits.c, unsetAnnotation.c, and unsetNotes.c.

Public Member Functions

Rule_tRule_clone (const Rule_t *r)
 
int Rule_containsUndeclaredUnits (Rule_t *ia)
 Predicate returning 1 (true) or 0 (false) depending on whether the math expression of this Rule_t contains parameters/numbers with undeclared units. More...
 
Rule_tRule_createAlgebraic (unsigned int level, unsigned int version)
 Creates a new AlgebraicRule_t (Rule_t) structure using the given SBML level and version values. More...
 
Rule_tRule_createAlgebraicWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new AlgebraicRule_t (Rule_t) structure using the given SBMLNamespaces_t structure. More...
 
Rule_tRule_createAssignment (unsigned int level, unsigned int version)
 Creates a new AssignmentRule_t (Rule_t) structure using the given SBML level and version values. More...
 
Rule_tRule_createAssignmentWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new AssignmentRule_t (Rule_t) structure using the given SBMLNamespaces_t structure. More...
 
Rule_tRule_createRate (unsigned int level, unsigned int version)
 Creates a new RateRule_t (Rule_t) structure using the given SBML level and version values. More...
 
Rule_tRule_createRateWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new RateRule_t (Rule_t) structure using the given SBMLNamespaces_t structure. More...
 
void Rule_free (Rule_t *r)
 Destroys this Rule_t. More...
 
UnitDefinition_tRule_getDerivedUnitDefinition (Rule_t *ia)
 Calculates and returns a UnitDefinition_t that expresses the units returned by the math expression of this Rule_t. More...
 
const char * Rule_getFormula (const Rule_t *r)
 
int Rule_getL1TypeCode (const Rule_t *r)
 
const ASTNode_tRule_getMath (const Rule_t *r)
 
const XMLNamespaces_tRule_getNamespaces (Rule_t *r)
 Returns a list of XMLNamespaces_t associated with this Rule_t structure. More...
 
RuleType_t Rule_getType (const Rule_t *r)
 Returns a code representing the type of rule this is. More...
 
int Rule_getTypeCode (const Rule_t *r)
 Returns the libSBML type code for this Rule_t object. More...
 
const char * Rule_getUnits (const Rule_t *r)
 
const char * Rule_getVariable (const Rule_t *r)
 
int Rule_isAlgebraic (const Rule_t *r)
 
int Rule_isAssignment (const Rule_t *r)
 
int Rule_isCompartmentVolume (const Rule_t *r)
 This method attempts to lookup the Rule_t's variable in the Model_t's list of Compartments. More...
 
int Rule_isParameter (const Rule_t *r)
 This method attempts to lookup the Rule_t's variable in the Model_t's list of Parameters. More...
 
int Rule_isRate (const Rule_t *r)
 
int Rule_isScalar (const Rule_t *r)
 
int Rule_isSetFormula (const Rule_t *r)
 
int Rule_isSetMath (const Rule_t *r)
 
int Rule_isSetUnits (const Rule_t *r)
 
int Rule_isSetVariable (const Rule_t *r)
 
int Rule_isSpeciesConcentration (const Rule_t *r)
 This method attempts to lookup the Rule_t's variable in the Model_t's list of Species_t. More...
 
int Rule_setFormula (Rule_t *r, const char *formula)
 Sets the formula of this Rule_t to a copy of string. More...
 
int Rule_setL1TypeCode (Rule_t *r, int L1Type)
 Sets the SBML Level 1 typecode for this Rule_t. More...
 
int Rule_setMath (Rule_t *r, const ASTNode_t *math)
 Sets the math of this Rule_t to a copy of the given ASTNode_t. More...
 
int Rule_setUnits (Rule_t *r, const char *sname)
 Sets the units for this Rule_t to a copy of sname (L1 ParameterRules only). More...
 
int Rule_setVariable (Rule_t *r, const char *sid)
 Sets the variable of this Rule_t to a copy of sid. More...
 
int Rule_unsetUnits (Rule_t *r)
 Unsets the units for this Rule_t (L1 ParameterRules only). More...
 

Member Function Documentation

Rule_t * Rule_clone ( const Rule_t r)
Returns
a (deep) copy of this Rule_t.
int Rule_containsUndeclaredUnits ( Rule_t ia)

Predicate returning 1 (true) or 0 (false) depending on whether the math expression of this Rule_t contains parameters/numbers with undeclared units.

Returns
1 (true) if the math expression of this Rule_t includes parameters/numbers with undeclared units, 0 (false) otherwise.
Note
a return value of 1 (true) indicates that the UnitDefinition_t returned by the getDerivedUnitDefinition function may not accurately represent the units of the expression.
See also
Rule_getDerivedUnitDefinition()
Examples:
printUnits.c.
Rule_t * Rule_createAlgebraic ( unsigned int  level,
unsigned int  version 
)

Creates a new AlgebraicRule_t (Rule_t) structure using the given SBML level and version values.

Parameters
levelan unsigned int, the SBML Level to assign to this algebraic Rule_t.
versionan unsigned int, the SBML Version to assign to this algebraic Rule_t.
Returns
a pointer to the newly created Rule_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 * Rule_createAlgebraicWithNS ( SBMLNamespaces_t sbmlns)

Creates a new AlgebraicRule_t (Rule_t) structure using the given SBMLNamespaces_t structure.

Parameters
sbmlnsSBMLNamespaces_t, a pointer to an SBMLNamespaces_t structure to assign to this algebraic Rule_t.
Returns
a pointer to the newly created Rule_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 * Rule_createAssignment ( unsigned int  level,
unsigned int  version 
)

Creates a new AssignmentRule_t (Rule_t) structure using the given SBML level and version values.

Parameters
levelan unsigned int, the SBML Level to assign to this assignment Rule_t.
versionan unsigned int, the SBML Version to assign to this assignment Rule_t.
Returns
a pointer to the newly created Rule_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 * Rule_createAssignmentWithNS ( SBMLNamespaces_t sbmlns)

Creates a new AssignmentRule_t (Rule_t) structure using the given SBMLNamespaces_t structure.

Parameters
sbmlnsSBMLNamespaces_t, a pointer to an SBMLNamespaces_t structure to assign to this assignment Rule_t.
Returns
a pointer to the newly created Rule_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 * Rule_createRate ( unsigned int  level,
unsigned int  version 
)

Creates a new RateRule_t (Rule_t) structure using the given SBML level and version values.

Parameters
levelan unsigned int, the SBML Level to assign to this rate Rule_t.
versionan unsigned int, the SBML Version to assign to this rate Rule_t.
Returns
a pointer to the newly created Rule_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 * Rule_createRateWithNS ( SBMLNamespaces_t sbmlns)

Creates a new RateRule_t (Rule_t) structure using the given SBMLNamespaces_t structure.

Parameters
sbmlnsSBMLNamespaces_t, a pointer to an SBMLNamespaces_t structure to assign to this rate Rule_t.
Returns
a pointer to the newly created Rule_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 Rule_free ( Rule_t r)

Destroys this Rule_t.

UnitDefinition_t * Rule_getDerivedUnitDefinition ( Rule_t ia)

Calculates and returns a UnitDefinition_t that expresses the units returned by the math expression of this Rule_t.

Returns
a UnitDefinition_t that expresses the units of the math expression of this Rule_t.

Note that the functionality that facilitates unit analysis depends on the model as a whole. Thus, in cases where the structure has not been added to a model or the model itself is incomplete, unit analysis is not possible and this method will return NULL.

Note
The units are calculated by applying the mathematics from the expression to the units of the <ci> elements used within the expression. Where there are parameters/numbers with undeclared units the UnitDefinition_t returned by this function may not accurately represent the units of the expression.
See also
Rule_containsUndeclaredUnits()
Examples:
printUnits.c.
const char * Rule_getFormula ( const Rule_t r)
Note
SBML Level 1 uses a text-string format for mathematical formulas. Other levels of SBML use MathML, an XML format for representing mathematical expressions. LibSBML provides an Abstract Syntax Tree API for working with mathematical expressions; this API is more powerful than working with formulas directly in text form, and ASTs can be translated into either MathML or the text-string syntax. The libSBML methods that accept text-string formulas directly (such as this one) are provided for SBML Level 1 compatibility, but developers are encouraged to use the AST mechanisms.
Returns
the formula for this Rule_t.
int Rule_getL1TypeCode ( const Rule_t r)
Returns
the SBML Level 1 typecode for this Rule_t or SBML_UNKNOWN (default).
const ASTNode_t * Rule_getMath ( const Rule_t r)
Returns
the math for this Rule_t.
Examples:
printMath.c.
const XMLNamespaces_t * Rule_getNamespaces ( Rule_t r)

Returns a list of XMLNamespaces_t associated with this Rule_t structure.

Parameters
rthe Rule_t structure.
Returns
pointer to the XMLNamespaces_t structure associated with this structure
RuleType_t Rule_getType ( const Rule_t r)

Returns a code representing the type of rule this is.

Returns
the rule type, which will be one of the following three possible values:
Note
The attribute "type" on Rule_t objects is present only in SBML Level 1. In SBML Level 2 and later, the type has been replaced by subclassing the Rule_t object.
int Rule_getTypeCode ( const Rule_t r)

Returns the libSBML type code for this Rule_t object.

LibSBML attaches an identifying code to every kind of SBML object. These are integer constants known as SBML type codes. The names of all the codes begin with the characters SBML_. The set of possible type codes for core elements is defined in the enumeration SBMLTypeCode_t, and in addition, libSBML plug-ins for SBML Level 3 packages define their own extra enumerations of type codes (e.g., SBMLLayoutTypeCode_t for the Level 3 Layout_t package). Note that different Level 3 package plug-ins may use overlapping type codes; to identify the package to which a given object belongs, call the SBase_getPackageName() method on the object.

The exception to this is lists: all SBML-style list elements have the type SBML_LIST_OF, regardless of what package they are from.

Returns
the SBML type code for this object, either SBML_ASSIGNMENT_RULE, SBML_RATE_RULE, or SBML_ALGEBRAIC_RULE for SBML Core.
Warning
The specific integer values of the possible type codes may be reused by different libSBML plug-ins for SBML Level 3. packages, To fully identify the correct code, it is necessary to invoke both getPackageName() and getTypeCode() (or ListOf_t::getItemTypeCode()).
See also
getElementName()
getPackageName()
const char * Rule_getUnits ( const Rule_t r)
Returns
the units for this Rule_t (L1 ParameterRules only).
const char * Rule_getVariable ( const Rule_t r)
Returns
the variable for this Rule_t.
int Rule_isAlgebraic ( const Rule_t r)
Returns
1 (true) if this Rule_t is an AlgebraicRule_t, 0 (false) otherwise.
int Rule_isAssignment ( const Rule_t r)
Returns
1 (true) if this Rule_t is an AssignmentRule_t, 0 (false) otherwise.
int Rule_isCompartmentVolume ( const Rule_t r)

This method attempts to lookup the Rule_t's variable in the Model_t's list of Compartments.

Returns
1 (true) if this Rule_t is a CompartmentVolumeRule, 0 (false) otherwise.
int Rule_isParameter ( const Rule_t r)

This method attempts to lookup the Rule_t's variable in the Model_t's list of Parameters.

Returns
1 (true) if this Rule_t is a ParameterRule, 0 (false) otherwise.
int Rule_isRate ( const Rule_t r)
Returns
1 (true) if this Rule_t is a RateRule_t (L2) or has type="rate" (L1), 0 (false) otherwise.
int Rule_isScalar ( const Rule_t r)
Returns
1 (true) if this Rule_t is an AssignmentRule_t (L2) has type="scalar" (L1), 0 (false) otherwise.
int Rule_isSetFormula ( const Rule_t r)
Returns
1 (true) if the formula (or equivalently the math) for this Rule_t is set, 0 (false) otherwise.
int Rule_isSetMath ( const Rule_t r)
Returns
1 (true) if the math (or equivalently the formula) for this Rule_t is set, 0 (false) otherwise.
Examples:
printMath.c.
int Rule_isSetUnits ( const Rule_t r)
Returns
1 (true) if the units for this Rule_t is set, 0 (false) otherwise (L1 ParameterRules only).
int Rule_isSetVariable ( const Rule_t r)
Returns
1 (true) if the variable of this Rule_t is set, 0 (false) otherwise.
int Rule_isSpeciesConcentration ( const Rule_t r)

This method attempts to lookup the Rule_t's variable in the Model_t's list of Species_t.

Returns
1 (true) if this Rule_t is a species concentration Rule_t, 0 (false) otherwise.
int Rule_setFormula ( Rule_t r,
const char *  formula 
)

Sets the formula of this Rule_t to a copy of 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
SBML Level 1 uses a text-string format for mathematical formulas. Other levels of SBML use MathML, an XML format for representing mathematical expressions. LibSBML provides an Abstract Syntax Tree API for working with mathematical expressions; this API is more powerful than working with formulas directly in text form, and ASTs can be translated into either MathML or the text-string syntax. The libSBML methods that accept text-string formulas directly (such as this one) are provided for SBML Level 1 compatibility, but developers are encouraged to use the AST mechanisms.
int Rule_setL1TypeCode ( Rule_t r,
int  L1Type 
)

Sets the SBML Level 1 typecode for this Rule_t.

Parameters
rthe Rule_t structure.
L1Typethe SBML Level 1 typecode for this Rule_t (SBML_COMPARTMENT_VOLUME_RULE, SBML_PARAMETER_RULE, or SBML_SPECIES_CONCENTRATION_RULE).
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 Rule_setMath ( Rule_t r,
const ASTNode_t math 
)

Sets the math of this Rule_t to a copy of the given ASTNode_t.

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 Rule_setUnits ( Rule_t r,
const char *  sname 
)

Sets the units for this Rule_t to a copy of sname (L1 ParameterRules only).

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 sname of NULL is equivalent to unsetting the "units" attribute.
int Rule_setVariable ( Rule_t r,
const char *  sid 
)

Sets the variable of this Rule_t to a copy of sid.

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 "variable" attribute.
int Rule_unsetUnits ( Rule_t r)

Unsets the units for this Rule_t (L1 ParameterRules only).

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: