as_boolean
(function from pyomo.core.expr.boolean_value
)
- pyomo.core.expr.boolean_value.as_boolean(obj)[source]
A function that creates a BooleanConstant object that wraps Python Boolean values.
- Parameters:
obj – The logical value that may be wrapped.
- Raises: TypeError if the object is in native_types and not in
native_logical_types
Returns: A true or false BooleanConstant or the original object