Post-Process

Wrapping the tessif-oemof post-processing.

class tessif_oemof_4_4.post_process.OmfResultier(optimized_es, **kwargs)[source]

Bases: tessif.post_process.Resultier

Transform nodes and edges into their name representation. Child of Resultier and mother of all oemof Resultiers.

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

dct_repr()[source]

Extend the base dict reprsentation.

class tessif_oemof_4_4.post_process.IntegratedGlobalResultier(optimized_es, **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.OmfResultier, tessif.post_process.IntegratedGlobalResultier

Extracting the integrated global results out of the energy system and conveniently aggregating them (rounded to unit place) inside a dictionairy keyed by result name.

Integrated global results (IGR) mapped by result name.

Integrated global results currently consist of meta and non-meta results. the meta results are handled by the analyze module (see tessif.analyze.Comparatier.integrated_global_results) and consist of:

  • time

  • memory

results. whereas the non-meta results usually consist of:

  • emissions

  • costs

results, which are handled here. Tessif’s energy system, however, allow to formulate a number of global_constraints which then would automatically be post processed here.

The befornamed strings serve as key insidethe mapping.

Note

In regard to global constraints (mainly emissions), Oemof calls these generic_integral_limit(). Labeling them as global_constraints and therfor generating results the IntegratedGlobalResultier can extract, is only done if one of the two folloing conditions are met:

  1. A tessif energy system is used and beeing transformed into an oemof energy system.

  2. A native oemof energy system is used in conjunction with tessif.simulate.omf_from_es() provided the constraints are defined using a dictionairy as in tessif.model.energy_system.AbstractEnergySystem.global_constraints

    Meaing if you have got an energy system object in es adding an emission constraint would look like:

    es.global_constraints = {'emissions': 42}
    

See the following example

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.ScaleResultier(optimized_es, **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.OmfResultier, tessif.post_process.ScaleResultier

Extract number of constraints.

Parameters

optimized_esModel specific, optimized energy system containing its results.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.LoadResultier(optimized_es, **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.OmfResultier, tessif.post_process.LoadResultier

Transforming flow results into dictionairies keyed by node.

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.CapacityResultier(optimized_es, **kwargs)[source]

Bases: tessif.post_process.CapacityResultier, tessif_oemof_4_4.post_process.LoadResultier

Transforming installed capacity results dictionairies keyed by node.

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For functionality documentation see the respective base class.

property node_characteristic_value

Map node label to characteristic value.

Components of variable size have a characteristic value of None.

Characteristic value in this context means:

  • \(cv = \frac{\text{sum}\left(\text{characteristic flow} \right)}{\text{installed capacity}}\) for:

    • Source objects

    • Sink objects

    • Transformer objects

    • ExtractionTurbineCHP objects

    • GenericCHP objects

    • OffsetTransformer objects

  • \(cv = \frac{\text{sum}\left(\text{SOC}\right)} {\text{capacity}}\) for:

    • GenericStorage

Characteristic flow in this context means:

  • \(\text{sum}\left(\text{all flows}\right)\) for:

    • Source objects

    • Sink objects

  • \(\text{sum}\left(\text{outflow}\right)\) for:

    • OffsetTransformer objects

  • \(\text{sum}\left(0\text{th outflow}\right)\) for:

    • Transformer objects

    • ExtractionTurbineCHP objects

  • \(\text{sum}\left(\text{power outflow}\right)\) for:

    • GenericCHP objects

The node fillsize of integrated component results graphs scales with the characteristic value. If no capacity is defined (i.e for nodes of variable size, like busses or excess sources and sinks, node size is set to it’s default ( nxgrph_visualize_defaults[node_fill_size]).

Note

This specific property is overridden to provide a more oemof-specific description on what is deemed a characteristic_value.

class tessif_oemof_4_4.post_process.StorageResultier(optimized_es, **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.OmfResultier, tessif.post_process.StorageResultier

Transforming storage results into dictionairies keyed by node.

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.NodeCategorizer(optimized_es, **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.OmfResultier, tessif.post_process.NodeCategorizer

Categorizing the nodes of an optimized oemof energy system.

Categorization utilizes Uid.

Nodes are categorized by:

  • Energy component (One of the ‘Bus’, ‘Sink’, etc..)

  • Energy sector (‘power’, ‘heat’, ‘mobility’, ‘coupled’)

  • Region (‘arbitrary label’)

  • Coordinates (latitude, longitude in degree)

  • Energy carrier (‘solar’, ‘wind’, ‘electricity’, ‘steam’ …)

  • Node type (‘arbitrary label’)

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.FlowResultier(optimized_es, **kwargs)[source]

Bases: tessif.post_process.FlowResultier, tessif_oemof_4_4.post_process.LoadResultier

Transforming flow results into dictionairies keyed by edges.

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.AllResultier(optimized_es, **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.CapacityResultier, tessif_oemof_4_4.post_process.FlowResultier, tessif_oemof_4_4.post_process.StorageResultier

Transforming energy system results into a dictionary keyed by attribute. Incorporates all the functionalities from its bases.

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

Note

This class allows interfacing with ALL framework processing utilities. It extracts every bit of info the author ever needed in his postprocessing.

It is meant to be a “one fits all” solution. Perfectly fit for showing “proof of concepts” or debugging energy system components.

Potentially Unfit For Large System Models.

class tessif_oemof_4_4.post_process.LabelFormatier(optimized_es, **kwargs)[source]

Bases: tessif.post_process.LabelFormatier, tessif_oemof_4_4.post_process.FlowResultier, tessif_oemof_4_4.post_process.CapacityResultier

Generate component summaries as multiline label dictionairy entries.

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.NodeFormatier(optimized_es, cgrp='name', drawutil='nx', **kwargs)[source]

Bases: tessif.post_process.NodeFormatier, tessif_oemof_4_4.post_process.CapacityResultier

Transforming energy system results into node visuals.

Parameters
  • optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

  • cgrp (str, default='name') –

    Which group of color attribute(s) to return. One of:

    {'name', 'carrer', 'sector'}
    

    Color related attributes are grouped by tessif.frused.namedtuples.NodeColorGroupings and are thus returned as a typing.NamedTuple. Certain api functionalities expect those attributes to be dicts. (Usually those working only on ESTransformer input). Use this parameter on Formatier creation to provide the expected dictionairy.

  • drawutil (str, default='nx') – Which drawuing utility backend to format node size, fil_size and shape to. 'dc' for plotly-dash-cytoscape or 'nx' for networkx-matplotlib.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.MplLegendFormatier(optimized_es, cgrp='all', markers='formatier', **kwargs)[source]

Bases: tessif.post_process.MplLegendFormatier, tessif_oemof_4_4.post_process.CapacityResultier

Generating visually enhanced matplotlib legends for nodes and edges.

Parameters
  • optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

  • cgrp (str, default='name') –

    Which group of color attribute(s) to return. One of:

    {'name', 'carrer', 'sector'}
    

    Color related attributes are grouped by tessif.frused.namedtuples.NodeColorGroupings and are thus returned as a typing.NamedTuple. Certain api functionalities expect those attributes to be dicts. (Usually those working only on ESTransformer input). Use this parameter on Formatier creation to provide the expected dictionairy.

  • markers (str, default='formatier') –

    What marker to use for legend entries. Either 'formatier' or one of the matplotlib.markers.

    If 'formatier' is used, markers will be inferred from NodeFormatier.node_shape.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.EdgeFormatier(optimized_es, drawutil='nx', cls=None, **kwargs)[source]

Bases: tessif.post_process.EdgeFormatier, tessif_oemof_4_4.post_process.FlowResultier

Transforming energy system results into edge visuals.

Parameters
  • optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

  • drawutil (str, default='nx') – Which drawuing utility backend to format node size, fil_size and shape to. 'dc' for plotly-dash-cytoscape or 'nx' for networkx-matplotlib.

  • cls (tuple, default=None) –

    2-Tuple / CLS namedtuple defining the relative flow cost thresholds and the respective style specifications. Used to map specific flow costs to edge line style representations.

    If None, default implementation is used based on drawutil.

    For drawutil='nx' Networkx-Matplotlib:

    cls = ([0, .33, .66], ['dotted', 'dashed', 'solid'])
    

    For drawutil='dc' Dash-Cytoscape styles are used:

    cls = ([0, .33, .66], ['dotted', 'dashed', 'solid'])
    

    Translating to all edges of relative specific flows costs, between 0 and .33 are correlated to have a ':'/'dotted' linestyle.

See also

For functionality documentation see the respective base class.

class tessif_oemof_4_4.post_process.AllFormatier(optimized_es, cgrp='all', markers='formatier', drawutil='nx', cls=None, **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.LabelFormatier, tessif_oemof_4_4.post_process.NodeFormatier, tessif_oemof_4_4.post_process.MplLegendFormatier, tessif_oemof_4_4.post_process.EdgeFormatier

Transforming ES results into visual expression dicts keyed by attribute. Incorporates all the functionalities from its parents.

Parameters
  • optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

  • cgrp (str, default='name') –

    Which group of color attribute(s) to return. One of:

    {'name', 'carrier', 'sector'}
    

    Color related attributes are grouped by tessif.frused.namedtuples.NodeColorGroupings and are thus returned as a typing.NamedTuple. Certain api functionalities expect those attributes to be dicts. (Usually those working only on ESTransformer input). Use this parameter on Formatier creation to provide the expected dictionary.

    Used by NodeFormatier and MplLegendFormatier

  • markers (str, default='formatier') –

    What marker to use for legend entries. Either 'formatier' or one of the matplotlib.markers.

    If 'formatier' is used, markers will be inferred from NodeFormatier.node_shape.

    Used by MplLegendFormatier

  • drawutil (str, default='nx') – Which drawuing utility backend to format node size, fil_size and shape to. 'dc' for plotly-dash-cytoscape or 'nx' for networkx-matplotlib.

  • cls (tuple, default=None) –

    2-Tuple / CLS namedtuple defining the relative flow cost thresholds and the respective style specifications. Used to map specific flow costs to edge line style representations.

    If None, default implementation is used based on drawutil.

    For drawutil='nx' Networkx-Matplotlib:

    cls = ([0, .33, .66], ['dotted', 'dashed', 'solid'])
    

    For drawutil='dc' Dash-Cytoscape styles are used:

    cls = ([0, .33, .66], ['dotted', 'dashed', 'solid'])
    

    Translating to all edges of relative specific flows costs, between 0 and .33 are correlated to have a ':'/'dotted' linestyle.

Note

This class allows interfacing with ALL framework processing utilities. It extracts every bit of info the author ever needed in his postprocessing.

It is meant to be a “one fits all” solution for small energy systems. Perfectly fit for showing “proof of concepts” or debugging energy system components.

Potentially Unfit For Large System Models.

class tessif_oemof_4_4.post_process.ICRHybridier(optimized_es, colored_by='name', **kwargs)[source]

Bases: tessif_oemof_4_4.post_process.OmfResultier, tessif.post_process.ICRHybridier

Aggregate numerical and visual information for visualizing the Integrated_Component_Results (ICR).

Parameters

optimized_es (EnergySystem) – An optimized oemof energy system containing its results.

See also

For non model specific attributes see the respective base class.

property node_characteristic_value

Map node label to characteristic value.

Components of variable size have a characteristic value of None.

Characteristic value in this context means:

  • \(cv = \frac{\text{sum}\left(\text{characteristic flow} \right)}{\text{installed capacity}}\) for:

    • Source objects

    • Sink objects

    • Transformer objects

    • ExtractionTurbineCHP objects

    • GenericCHP objects

    • OffsetTransformer objects

  • \(cv = \frac{\text{sum}\left(\text{SOC}\right)} {\text{capacity}}\) for:

    • GenericStorage

Characteristic flow in this context means:

  • \(\text{sum}\left(\text{all flows}\right)\) for:

    • Source objects

    • Sink objects

  • \(\text{sum}\left(\text{outflow}\right)\) for:

    • OffsetTransformer objects

  • \(\text{sum}\left(0\text{th outflow}\right)\) for:

    • Transformer objects

    • ExtractionTurbineCHP objects

    • Link objects

  • \(\text{sum}\left(\text{power outflow}\right)\) for:

    • GenericCHP objects

The node fillsize of integrated component results graphs scales with the characteristic value. If no capacity is defined (i.e for nodes of variable size, like busses or excess sources and sinks, node size is set to it’s default ( nxgrph_visualize_defaults[node_fill_size]).