(function from pyomo.common.numeric_types)
pyomo.common.numeric_types
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 maps 1 and 2 both to the same equivalent instance. If that works, then we register the type in native_logical_types.
^
|
&
1
2
native_logical_types