linopy.variables.ScalarVariable#
- class linopy.variables.ScalarVariable(label, model)#
A scalar variable container.
In contrast to the Variable class, a ScalarVariable only contains one label. Use this class to create a expression or constraint in a rule.
- __init__(label, model)#
Methods
__init__(label, model)to_linexpr([coeff])to_scalar_linexpr([coeff])Attributes
labelGet the label of the variable.
lowerGet the lower bound of the variable.
modelGet the model to which the variable belongs.
upperGet the upper bound of the variable.