message_ix_models.model.transport.factor.Factor

class message_ix_models.model.transport.factor.Factor(layers: list[~message_ix_models.model.transport.factor.Layer] = <factory>)[source]

Bases: object

Representation of assumptions used to construct a factor.

The assumptions are stored as a sequence of layers, and combined one by one to produce a multi-dimensional Quantity.

Factor quantifications can be used in multiplicative, additive, or in other, possibly more complicated ways.

__init__(layers: list[~message_ix_models.model.transport.factor.Layer] = <factory>) None

Methods

__init__([layers])

add_tasks(c, key, *inputs, scenario_expr)

Add a task to c to return the quantified Factor.

quantify(**coords)

Return a quantification.

Attributes

layers

Ordered list of Layer.

add_tasks(c: Computer, key: genno.core.key.KeyLike, *inputs: genno.Key, scenario_expr: str) genno.core.key.KeyLike[source]

Add a task to c to return the quantified Factor.

layers: list[Layer]

Ordered list of Layer.

quantify(**coords) AttrSeries[source]

Return a quantification.

The result will have at least the dimensions and labels in coords, and may may have additional dimensions not from coords.

Parameters:

coords – Target xarray-style coords: dimension IDs mapped to lists of labels.