namedtuples

Labeling Concept

UidBase

Uid

Unique IDentifiers for each energy system component.

node_uid_styles

Provide possible internal node label representation styles.

Coordinates

Geospatial coordinates.

Tessif’s Energy System Parameters

MinMax

Corespondent minimum and maximum value pair.

OnOff

Corespondent value pair for describing parameters dependent on a boolean status.

InOut

Corespondent inflow outflow value pair.

PositiveNegative

Corespondent value pair for describing parameters dependent on directions expressed as positive or negative.

Result Parsing

NodeColorGroupings

Node color groups mapped by format like ESTransformer objects.

AttributeGroupings

Energy system graph attribute groupings.

MemoryTime

Simulation meta data result container.

SimulationProcessStepResults

Detailed meta data result container holding inrformation on the various simulation process steps.

namedtuples is a tessif subpackage aggregating utility objects for cleaner and more verbose code in the context of naming things.

class tessif.frused.namedtuples.UidBase(name, latitude, longitude, region, sector, carrier, component, node_type)[source]

Bases: tuple

name: str

Alias for field number 0

latitude: float

Alias for field number 1

longitude: float

Alias for field number 2

region: str

Alias for field number 3

sector: str

Alias for field number 4

carrier: str

Alias for field number 5

component: str

Alias for field number 6

node_type: str

Alias for field number 7

class tessif.frused.namedtuples.Uid(name, latitude=None, longitude=None, region=None, sector=None, carrier=None, component=None, node_type=None)[source]

Bases: UidBase

Unique IDentifiers for each energy system component.

Essential part of tessif’s labeling concept.

For an energy system component to be unique, the compination of the uid components beeing used must be unique. Which combination is used internally depends on on the used node_uid_styles which can be selected using configurations.node_uid_style.

NamedTuple containing meta and geospatial information.

Note

Used for internal results mapping. See node_uid_style and node_uid_styles for more details. Especially when having issues with non-unique uid solver issues.

Note

A UID’s components are the Parameters of this class. For recognized variations of these during data parsing see also: Unique Identifiers Components (Parts making up the UID)

Parameters:
  • name (str) – Identifier replacing the original label. i.e: ‘PV’, ‘Gas_CHP’, …

  • latitude (Number, default None) – Geospatial latitude in degree

  • longitude (Number, default None) – Geospatial longitude in degree

  • region (str, default None) – Arbitrary regional categorization string. ‘Europe’, ‘global’, …

  • sector (str, default None) – Arbitrary sector categorization string.

  • carrier (str, default None) – Arbitrary energy carrier categorization string.

  • component (str, default None) – One of the energy system component identifiers.

  • node_type (str, default None) – Arbitrary node type categorization string. i.e. “Combined_Cycle”, “Renewable”, …

Warning

Uid component defaults have to be set manually, according to defaults.energy_system_nodes to avoid circular imports!

Returns:

uid – Namedtuple instance object serving as uid

Return type:

NamedTuple

classmethod reconstruct(string_representation)[source]

Reconstruct a Uid from its string representation.

tessif.frused.namedtuples.node_uid_styles = {'carrier': ['name', 'carrier'], 'component': ['name', 'component'], 'coords': ['name', 'latitude', 'longitude'], 'name': ['name'], 'node_type': ['name', 'node_type'], 'qualname': ['name', 'latitude', 'longitude', 'region', 'sector', 'carrier', 'component', 'node_type'], 'region': ['name', 'region'], 'sector': ['name', 'sector']}

Provide possible internal node label representation styles. Use configurations.node_uid_style. For selecting a particular style.

Currently supported styles are (first column identifies the mapping key):

class tessif.frused.namedtuples.Edge(source, target)

Bases: tuple

Edge of an energy system graph. (source, target)

As of tessif’s convention an Edge is describe as directional going from source to target.

Parameters:
source

Alias for field number 0

target

Alias for field number 1

class tessif.frused.namedtuples.MinMax(min, max)

Bases: tuple

Corespondent minimum and maximum value pair. Usually used for energy system value parings like flow limits (i.e: minimum and maximum flow boundaries).

max

Alias for field number 1

min

Alias for field number 0

class tessif.frused.namedtuples.OnOff(on, off)

Bases: tuple

Corespondent value pair for describing parameters dependent on a boolean status. . Usually used for energy system value parings describing nonconvex behaviour like i.e: minimum uptime and downtime.

off

Alias for field number 1

on

Alias for field number 0

class tessif.frused.namedtuples.InOut(inflow, outflow)

Bases: tuple

Corespondent inflow outflow value pair. Usually used for energy system value parings describing different behaviours of the same component depending on in or outflow like i.e: Storage efficiency

inflow

Alias for field number 0

outflow

Alias for field number 1

class tessif.frused.namedtuples.PositiveNegative(positive, negative)

Bases: tuple

Corespondent value pair for describing parameters dependent on directions expressed as positive or negative. Usually used for energy system value parings describing changes between timesteps like i.e: power production gradients.

negative

Alias for field number 1

positive

Alias for field number 0

class tessif.frused.namedtuples.Coordinates(latitude, longitude)

Bases: tuple

Geospatial coordinates. (latitude [°], longitude[°])

latitude

Alias for field number 0

longitude

Alias for field number 1

class tessif.frused.namedtuples.NodeColorGroupings(component, name, carrier, sector)

Bases: tuple

Node color groups mapped by format like ESTransformer objects.

Mapping colors are defined in tessif.frused.themes. Unique energy system component identifier (uid) parts are specified in energy_system_component_identifiers.

Parameters:
  • component (defaultdict(list)) – Dictionairy of node colors with component searched for in energy_system_component_identifiers

  • label (defaultdict(list)) – Dictionairy of node colors with tags searched for in str(node.label)

  • carrier (defaultdict(list)) – Dictionairy of node colors with tags searched for in node.label.carrier

  • sector (defaultdict(list)) – Dictionairy of node colors with tags searched for in node.label.sector

carrier

Alias for field number 2

component

Alias for field number 0

name

Alias for field number 1

sector

Alias for field number 3

class tessif.frused.namedtuples.AttributeGroupings(node, edge, legend)

Bases: tuple

Energy system graph attribute groupings. (Mainly used for filtering purposes).

Parameters:
  • node (str) – String to tag node related attributes

  • edge (str) – String to tag edge related attributes

  • legend (str) – String to tag legend related attributes

See also

kwargs, parameter, Implementation, nxgrph_visualize_defaults

edge

Alias for field number 1

legend

Alias for field number 2

node

Alias for field number 0

class tessif.frused.namedtuples.MemoryTime(memory, time)

Bases: tuple

Simulation meta data result container. (Mainly used by tessif.analyze.Comparatier).

Parameters:
  • memory (str) – String to tag memory related result data.

  • time (str) – String to tag timing related result data.

memory

Alias for field number 0

time

Alias for field number 1

class tessif.frused.namedtuples.MemoryTimeConstraints(memory, time, constraints)

Bases: tuple

Simulation meta data result container. (Mainly used by tessif.analyze.Comparatier).

Parameters:
  • memory (str) – String to tag memory related result data.

  • time (str) – String to tag timing related result data.

  • constraints (str) – String to tag constraints related result data.

constraints

Alias for field number 2

memory

Alias for field number 0

time

Alias for field number 1

class tessif.frused.namedtuples.SimulationProcessStepResults(reading, parsing, transformation, simulation, post_processing, result)

Bases: tuple

Detailed meta data result container holding inrformation on the various simulation process steps.

Parameters:
  • reading (Number) – Number representing the quantity needed for reading in the data during the simulation process.

  • parsing (Number) – Number representing the quantity needed for parsing the read in data during the simulation process.

  • transformation (Number) – Number representing the quantity needed for transforming the parsed data during the simulation process.

  • solving (Number) – Number representing the quantity needed for solving during the the simulation process.

  • post_processing (Number) – Number representing the quantity needed for post precessing the solving results during the simulation process.

parsing

Alias for field number 1

post_processing

Alias for field number 4

reading

Alias for field number 0

result

Alias for field number 5

simulation

Alias for field number 3

transformation

Alias for field number 2

class tessif.frused.namedtuples.CLS(thresholds, styles)

Bases: tuple

Line style thresholds and style correlation.

See tessif.transform.es2mapping.base.EdgeFormatier.cls for more details.

styles

Alias for field number 1

thresholds

Alias for field number 0