Variable¶
- class Variable¶
Class for variable information. Instances are typically obtained via
as_variable()orvariables.Methods
Attributes
Variable ID number.
Lower bound of the variable.
Variable name.
Variable type.
Upper bound of the variable.
- __init__(*args, **kwargs)¶
- property id¶
Variable ID number.
An integer assigned starting from
0in order of issuance.- 戻り値の型:
- property lower_bound¶
Lower bound of the variable.
This property is valid for Integer or Real variables.
Noneand-infboth mean \(-\infty\).infleaves no value, so it raises aValueError. A Binary or an Ising variable holds no bound. It accepts a value that keeps every value of its set, such as0for Binary, and it raises aValueErrorfor a value that narrows that set. Useequal_to()to fix a variable to one value.- 戻り値の型:
float | None
- property type¶
Variable type.
- 戻り値:
Corresponding value in
VariableType.- 戻り値の型:
- property upper_bound¶
Upper bound of the variable.
This property is valid for Integer or Real variables.
Noneandinfboth mean \(+\infty\).-infleaves no value, so it raises aValueError. A Binary or an Ising variable holds no bound. It accepts a value that keeps every value of its set, such as1for Binary, and it raises aValueErrorfor a value that narrows that set. Useequal_to()to fix a variable to one value.- 戻り値の型:
float | None