message_ix_models.model.transport.factor.Layer
- class message_ix_models.model.transport.factor.Layer[source]
Bases:
ABC
Base class for layered assumptions used to build up a factor quantification.
- __init__()
Methods
__init__
()apply
(other, coords)quantify()
this layer and combine it with other.quantify
(coords)Return a quantification of the layer.
Attributes
Operation for combining the quantification of this layer with the quantification of the previous layer.
- apply(other: AttrSeries, coords: Mapping[str, Any]) AttrSeries [source]
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: Callable
Operation for combining the quantification of this layer with the quantification of the previous layer. Used by
apply()
.Choices might include:
operator.mul()
: take the product of this layer and previous layer’s values.operator.pow()
: raise the previous layer’s values to the values from this layer. This can be used with0
and1
to replace certain values in other with 1.0, sinceother ** 0 = 1.0
andother ** 1 = other
.