Variable

class Variable

Class for variable information. Instances are typically obtained via as_variable() or variables.

Methods

Attributes

id

Variable ID number.

lower_bound

Lower bound of the variable.

name

Variable name.

type

Variable type.

upper_bound

Upper bound of the variable.

__eq__(self, arg: object, /) bool

__eq__

パラメータ:

arg (object)

戻り値の型:

bool

__init__(*args, **kwargs)
__ne__(self, arg: object, /) bool

__ne__

パラメータ:

arg (object)

戻り値の型:

bool

__repr__(self) str

Return a developer-friendly string representation of the variable.

戻り値の型:

str

__str__(self) str

Return a human-readable string representation of the variable.

戻り値の型:

str

property id

Variable ID number.

An integer assigned starting from 0 in order of issuance.

戻り値の型:

int

property lower_bound

Lower bound of the variable.

This property is valid for Integer or Real variables. None means \(-\infty\).

戻り値の型:

float | None

property name

Variable name.

戻り値の型:

str

property type

Variable type.

戻り値:

Corresponding value in VariableType.

戻り値の型:

VariableType

property upper_bound

Upper bound of the variable.

This property is valid for Integer or Real variables. None means \(+\infty\).

戻り値の型:

float | None