InconsistentUnitsError

(class from pyomo.core.base.units_container)

class pyomo.core.base.units_container.InconsistentUnitsError(exp1, exp2, msg)[source]

Bases: UnitsError

An exception indicating that inconsistent units are present on an expression.

E.g., x == y, where x is in units of kg and y is in units of meter

__init__(exp1, exp2, msg)[source]

Member Documentation

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.