message_ix_models.model.transport.factor.Constant

class message_ix_models.model.transport.factor.Constant(value: float | AttrSeries, dims: str | Sequence[str])[source]

Bases: Layer

A value that is constant across 1 or more dims.

Parameters:
__init__(value: float | AttrSeries, dims: str | Sequence[str])[source]

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

Units.

value

Fixed value.

dims

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() using operation.

dims: Tuple[str, ...]

Dimensions of the result.

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.

units: str = 'dimensionless'

Units.

value: AttrSeries

Fixed value.