namedtuples
Labeling Concept
Unique IDentifiers for each energy system component. |
|
Provide possible internal node label representation styles. |
|
Geospatial coordinates. |
Tessif’s Energy System Parameters
Corespondent minimum and maximum value pair. |
|
Corespondent value pair for describing parameters dependent on a boolean status. |
|
Corespondent inflow outflow value pair. |
|
Corespondent value pair for describing parameters dependent on directions expressed as positive or negative. |
Result Parsing
Node color groups mapped by format like |
|
Energy system graph attribute groupings. |
|
Simulation meta data result container. |
|
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
- class tessif.frused.namedtuples.Uid(name, latitude=None, longitude=None, region=None, sector=None, carrier=None, component=None, node_type=None)[source]
Bases:
UidBaseUnique 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_styleswhich can be selected usingconfigurations.node_uid_style.NamedTuplecontaining meta and geospatial information.Note
Used for internal results mapping. See
node_uid_styleandnode_uid_stylesfor 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 degreelongitude¶ (
Number, default None) – Geospatial longitude in degreeregion¶ (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_nodesto avoid circular imports!- Returns:
uid – Namedtuple instance object serving as uid
- Return type:
- classmethod reconstruct(string_representation)[source]
Reconstruct a
Uidfrom 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:
tupleEdge of an energy system graph. (source, target)
As of tessif’s convention an Edge is describe as directional going from
sourcetotarget.- Parameters:
source¶ (str) – Uid representation of the energy system component representing the edges start.
target¶ (str) – Uid representation of the energy system component representing the edges end.
- source
Alias for field number 0
- target
Alias for field number 1
- class tessif.frused.namedtuples.MinMax(min, max)
Bases:
tupleCorespondent 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:
tupleCorespondent 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:
tupleCorespondent 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:
tupleCorespondent 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:
tupleGeospatial 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:
tupleNode color groups mapped by format like
ESTransformerobjects.Mapping colors are defined in
tessif.frused.themes. Unique energy system component identifier (uid) parts are specified inenergy_system_component_identifiers.- Parameters:
component¶ (defaultdict(list)) – Dictionairy of node colors with component searched for in
energy_system_component_identifierslabel¶ (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:
tupleEnergy system graph attribute groupings. (Mainly used for filtering purposes).
- Parameters:
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:
tupleSimulation meta data result container. (Mainly used by
tessif.analyze.Comparatier).- Parameters:
- memory
Alias for field number 0
- time
Alias for field number 1
- class tessif.frused.namedtuples.MemoryTimeConstraints(memory, time, constraints)
Bases:
tupleSimulation meta data result container. (Mainly used by
tessif.analyze.Comparatier).- Parameters:
- 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:
tupleDetailed 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