BooleanValue

(class from pyomo.core.expr.boolean_value)

class pyomo.core.expr.boolean_value.BooleanValue[source]

Bases: PyomoObject

This is the base class for Boolean values used in Pyomo.

__init__()

Methods

__init__()

equivalent_to(other)

Construct an EquivalenceExpression between this BooleanValue and its operand.

getname([fully_qualified, name_buffer])

If this is a component, return the component's name on the owning block; otherwise return the value converted to a string

implies(other)

Construct an ImplicationExpression using method "implies"

is_component_type()

Return True if this class is a Pyomo component

is_constant()

Return True if this Logical value is a constant value

is_expression_type([expression_system])

Return True if this numeric value is an expression

is_fixed()

Return True if this is a non-constant value that has been fixed

is_indexed()

Return True if this Logical value is an indexed object

is_logical_type()

Return True if this class is a Pyomo Boolean object.

is_named_expression_type()

Return True if this numeric value is a named expression

is_numeric_type()

Boolean values are not numeric.

is_parameter_type()

Return False unless this class is a parameter object

is_reference()

Return True if this object is a reference.

is_relational()

DEPRECATED.

is_variable_type()

Return False unless this class is a variable object

land(other)

Construct an AndExpression (Logical And) between this BooleanValue and other.

lor(other)

Construct an OrExpression (Logical OR) between this BooleanValue and other.

to_string([verbose, labeler, smap, ...])

Return a string representation of the expression tree.

xor(other)

Construct an XorExpression using method "xor"

Attributes

local_name

name

Member Documentation

equivalent_to(other)[source]

Construct an EquivalenceExpression between this BooleanValue and its operand.

getname(fully_qualified=False, name_buffer=None)[source]

If this is a component, return the component’s name on the owning block; otherwise return the value converted to a string

implies(other)[source]

Construct an ImplicationExpression using method “implies”

is_component_type()

Return True if this class is a Pyomo component

is_constant()[source]

Return True if this Logical value is a constant value

is_expression_type(expression_system=None)

Return True if this numeric value is an expression

is_fixed()[source]

Return True if this is a non-constant value that has been fixed

is_indexed()[source]

Return True if this Logical value is an indexed object

is_logical_type()[source]

Return True if this class is a Pyomo Boolean object.

Boolean objects include constants, variables, or logical expressions.

is_named_expression_type()

Return True if this numeric value is a named expression

is_numeric_type()[source]

Boolean values are not numeric.

is_parameter_type()

Return False unless this class is a parameter object

is_reference()

Return True if this object is a reference.

is_relational()[source]

DEPRECATED.

Return True if this Logical value represents a relational expression.

Deprecated since version 6.4.3: is_relational() is deprecated in favor of is_expression_type(ExpressionType.RELATIONAL)

is_variable_type()

Return False unless this class is a variable object

land(other)[source]

Construct an AndExpression (Logical And) between this BooleanValue and other.

lor(other)[source]

Construct an OrExpression (Logical OR) between this BooleanValue and other.

to_string(verbose=None, labeler=None, smap=None, compute_values=False)[source]

Return a string representation of the expression tree.

Parameters:
  • verbose (bool) – If True, then the the string representation consists of nested functions. Otherwise, the string representation is an algebraic equation. Defaults to False.

  • labeler – An object that generates string labels for variables in the expression tree. Defaults to None.

Returns:

A string representation for the expression tree.

xor(other)[source]

Construct an XorExpression using method “xor”