message_ix_models.model.transport.factor.Constant
- class message_ix_models.model.transport.factor.Constant(value: float | AttrSeries, dims: str | Sequence[str])[source]
Bases:
LayerA value that is constant across 1 or more
dims.- Parameters:
value (
genno.core.attrseries.AttrSeries) – If notQuantity, it is transformed to one.dims (
tuple[str,]) – Either a sequence ofstr, or a singlestrexpression like “x y z” or “x-y-z”, which is split to a sequence.
Methods
__init__(value, dims)apply(other, coords)quantify()this layer and combine it with other.operation(b, /)Same as a * b.
quantify(coords)Return a quantification of the layer.
Attributes
Units.
Fixed value.
Dimensions of the result.
- apply(other: AttrSeries, coords: Mapping[str, Any]) AttrSeries
quantify()this layer and combine it with other.Subclasses may override this method. The default implementation combines other with the results of
quantify()usingoperation.
- operation(b, /)
Same as a * b.
- quantify(coords)[source]
Return a quantification of the layer.
The returned value:
May have any of the dimensions indicated by coords.
For such dimensions, should have some or all of the labels in coords.
Subclasses must implement this method.
- value: AttrSeries
Fixed value.