The units are calculated based on the mathematical expression in the Rule and the model quantities referenced by <ci> elements used within that expression. The method Rule::getDerivedUnitDefinition() returns the calculated units, to the extent that libSBML can compute them.
Visit SBML.org for more information
about SBML and libSBML.