assert_units_equivalent

(function from pyomo.util.check_units)

pyomo.util.check_units.assert_units_equivalent(*args)[source]

Raise an exception if the units are inconsistent within an expression, or not equivalent across all the passed expressions.

Parameters:

args (an argument list of Pyomo expressions) – The Pyomo expressions to test

Raises:

pyomo.core.base.units_container.UnitsError