Note that it is possible the "math" expression in the Rule contains pure numbers or parameters with undeclared units. In those cases, it is not possible to calculate the units of the overall expression without making assumptions. LibSBML does not make assumptions about the units, and Rule::getDerivedUnitDefinition() only returns the units as far as it is able to determine them. For example, in an expression X + Y, if X has unambiguously-defined units and Y does not, it will return the units of X. It is important that callers also invoke the methodRule::containsUndeclaredUnits()to determine whether this situation holds. Callers may wish to take suitable actions in those scenarios.
Visit SBML.org for more information
about SBML and libSBML.