check_units_equivalent

(function from pyomo.util.check_units)

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

Returns True if the units associated with each of the expressions passed as arguments are all equivalent (and False otherwise).

Note that this method will raise an exception if the units are inconsistent within an expression (since the units for that expression are not valid).

Parameters:

args (an argument list of Pyomo expressions)

Returns:

bool

Return type:

True if all the expressions passed as arguments have the same units