You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception has occurred: InconsistentUnitsErrorError in units found in expression: dxdt[1] - (x[1] - x[0]): mole / second not compatible with mole. File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\core\base\units_container.py", line 482, in _get_unit_for_equivalent_children raise InconsistentUnitsError( File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\core\base\units_container.py", line 929, in exitNode return node_func(self, node, data) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\core\expr\visitor.py", line 481, in _process_node_bx return self.exitNode(node, data) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\core\expr\visitor.py", line 268, in walk_expression result = self._process_node(root, RECURSION_LIMIT) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\core\base\units_container.py", line 1206, in _get_pint_units return self._pintUnitExtractionVisitor.walk_expression(expr=expr) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\util\check_units.py", line 165, in _assert_units_consistent_expression pint_unit = units._get_pint_units(expr) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\util\check_units.py", line 249, in assert_units_consistent _assert_units_consistent_expression(obj) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\util\check_units.py", line 121, in _assert_units_consistent_constraint_data assert_units_consistent(*args) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\util\check_units.py", line 270, in assert_units_consistent handler(cdata) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\util\check_units.py", line 193, in _assert_units_consistent_block assert_units_consistent(component) File "C:\Users\[REDACTED]\Repos\pyomo\pyomo\util\check_units.py", line 275, in assert_units_consistent handler(obj) File "C:\Users\[REDACTED]\Desktop\discretization_units.py", line 14, in <module> assert_units_consistent(m)pyomo.core.base.units_container.InconsistentUnitsError: Error in units found in expression: dxdt[1] - (x[1] - x[0]): mole / second not compatible with mole.
The text was updated successfully, but these errors were encountered:
Summary
Units aren't involved in
pyomo.dae
discretization transformations, which leads to inconsistent unit errors.Steps to reproduce the issue
Error Message
The text was updated successfully, but these errors were encountered: