energia.dimensions.time#

Time

Functions

dataclass([cls, init, repr, eq, order, ...])

Add dunder methods based on the fields defined in the class.

Classes

Modes([size, sample, parent, n])

Represents a discrete choice to be taken within a spatiotemporal disposition.

Periods([size, of, n, label, citations])

A discretization of Time.

Time(model)

Temporal representation of a system.

class Time(model: Model)[source]#

Bases: _Dimension

Temporal representation of a system.

All time periods are attached to this object.

Parameters:

model (Model) – Model to which the representation belongs.

Variables:
  • name (str) – Name of the dimension, generated based on the class and model name.

  • periods (list[Periods]) – List of time periods. Defaults to [].

  • modes (list[Modes]) – List of modes. Defaults to [].

Note

  • name is generated based on the Class and Model name

  • periods are populated as the program is built.

  • _indexed is made the first time Time is indexed.

property tree: dict[int | float, Periods]#

Return the tree of periods

property sorted_periods: list[Periods]#

Sorted periods from densest to sparsest

property densest: Periods#

The densest period

property sparsest: Periods#

The sparsest period

property horizon: Periods#

The sparsest scale is treated as the horizon

find(size: int | float) Periods[source]#

Find the period that has the length

split(period: Periods) tuple[list[Periods], list[Periods]][source]#

Gives a list of periods which are denser and sparser than period

model: Model#