check_if_logical_type
(function from pyomo.common.numeric_types)
- pyomo.common.numeric_types.check_if_logical_type(obj)[source]
Test if the argument behaves like a logical type.
We check for “logical types” by checking if the type returns sane results for Boolean operators (
^,|,&) and if it maps1and2both to the same equivalent instance. If that works, then we register the type innative_logical_types.