System Model
Tessifs energy supply syste model.
Serving as primary input data harmonization.
Main Class/Functionality
Aggregate tessif's abstract components into an energy system. |
|
Transform, Optimize and PostProcess this Tessif system model. |
Alternative Ways of Creation
Create an energy system from a collection of component instances. |
Frequently Used Methods
Connect another |
|
Duplicate the energy system and return it. |
|
Transform tessif system model into networkx graph. |
|
Serialize this system model. |
|
Load from stored system. |
|
Pickle this system model. |
|
Restore a pickled energy system object. |
- class tessif.system_model.AbstractEnergySystem(uid, *args, **kwargs)[source]
Bases:
objectAggregate tessif’s abstract components into an energy system.
- Parameters
uid¶ (Hashable) – Hashable unique identifier. Usually a string aka a name.
busses¶ (Iterable) – Iterable of
Busobjects to be added to the energy systemsinks¶ (Iterable) – Iterable of
Sinkobjects to be added to the energy systemsources¶ (Iterable) – Iterable of
Sourceobjects to be added to the energy systemtransformers¶ (Iterable) – Iterable of
Transformerobjects to be added to the energy systemstorages¶ (Iterable) – Iterable of
Storageobjects to be added to the energy systemtimeframe¶ (pandas.DatetimeIndex) –
Datetime index representing the evaluated timeframe. Explicitly stating:
initial datatime (0th element of the
pandas.DatetimeIndex)number of timesteps (length of
pandas.DatetimeIndex)temporal resolution (
pandas.DatetimeIndex.freq)
For example:
idx = pd.DatetimeIndex( data=pd.date_range( '2016-01-01 00:00:00', periods=11, freq='H'))
global_constraints¶ (dict, default={'emissions': float('+inf')}) –
Dictionary of
numericvalues mapped to global constraint namingstrings.Currently recognized constraint keys are:
emissions
- property busses
Generator of the system model’s busses.
GeneratorofBusobjects part of the energy system.
- property chps
Generator of the system model’s CHPs.
GeneratorofCHPobjects part of the energy system.
- property connectors
Generator of the system model’s connectors.
GeneratorofConnectorsobjects part of the energy system.
- property sources
Generator of the system model’s sources.
GeneratorofSourceobjects part of the energy system.
- property sinks
Generator of the system model’s sinks.
GeneratorofSinkobjects part of the energy system.
- property transformers
Generator of the system model’s transformers.
GeneratorofTransformerobjects part of the energy system.
- property storages
Generator of the system model’s storages.
GeneratorofStorageobjects part of the energy system.
- property nodes
Generator yielding this system models’ components.
- property edges
Generator yielding this system model’s Graph representation edges.
GeneratorofEdgeNamedTuplesrepresenting graph like edges.
- property global_constraints
The system model’s global constraints.
Dictionaryofnumericvalues mapped to global constraint namingstringscurrently respected by the energy system.
- connect(energy_system, connecting_busses, connection_uid)[source]
Connect another
AbstractEnergySystemobject to this one.- Parameters
energy_system¶ (tessif.model.energy_system.AbstractEnergySystem) –
Energy system object to be connected to this energy system via the respective
connecting_busses.The
energy_system'sBusspecified inconnecting_busses[1]will be connected to this energy system’sBusspecified inconnecting_busses[0]. So it’suidmust be found in this energy system.connecting_busses¶ (tuple) –
Tuple of
Uidsstring representation specifying the busses with which the energy systems will be connected.The
energy_system'sBusspecified inconnecting_busses[1]will be connected to this energy system’sBusspecified inconnecting_busses[0].connection_uid¶ (tessif.frused.namedtuples.Uid) – Uid of the
Connectorobject created for connecting the energy system.
- Returns
The energy system created by connecting the
energy_systemto this energy system.- Return type
tessif.model.energy_system.AbstractEnergySystem
- duplicate(prefix='', separator='_', suffix='copy')[source]
Duplicate the energy system and return it.
Potentially modify the node names.
- Parameters
prefix¶ (str, default='') – String added to the beginning of every node’s
Uid.name, separated byseperator.separator¶ (str, default='_') – String used for adding the
prefixand thesuffixto every node’sUid.name.suffix¶ (str, default='') – String added to the beginning of every node’s
Uid.name, separated byseperator.
- property timeframe
Timeframe representing the optimization time span.
- tropp(plugins, trans_ops=None, opt_ops=None, quiet=False, parent_dir=None)[source]
Transform, Optimize and PostProcess this Tessif system model.
- Parameters
plugins¶ – Iterable of plugin strings used for tropping.
trans_ops¶ (dict, None) – Dictionairy of transformation options.
opt_ops¶ (dict, None) – Dictionairy of optimization options.
quite¶ (bool) – If True tropp logging level is set to logging.WARNING
parent_dir¶ (str, None) – Parent directory aka tessif’s main user directory. Usually established using
tessif init my_parent_dir. If default initialization is used (tessif initrecommended) then the main user directory is~/.tessif.d/and this parameter can and should be ignored.
- Returns
Dictionairy holding the
tessif.deserialize.RestoredResultskeyed by:”igr” for the restored integrated global results (restored
tessif.post_process.IntegratedGlobalResultierlike)”alr” for the the of the restored results (restored AllResultier like)
- Return type
- classmethod from_components(uid, components, timeframe, global_constraints=None, **kwargs)[source]
Create an energy system from a collection of component instances.
Particularly usefull when creating energy systems out of existing ones.
- Parameters
uid¶ (Hashable) – Hashable unique identifier. Usually a string aka a name.
components¶ (~collections.abc.Iterable) – Iterable of
tessif.model.components.AbstractEsComponentobjects the energy system will be created of.timeframe¶ (pandas.DatetimeIndex, optional) –
Datetime index representing the evaluated timeframe. Explicitly stating:
initial datatime (0th element of the
pandas.DatetimeIndex)number of timesteps (length of
pandas.DatetimeIndex)temporal resolution (
pandas.DatetimeIndex.freq)
For example:
idx = pd.DatetimeIndex( data=pd.date_range( '2016-01-01 00:00:00', periods=11, freq='H'))
global_constraints¶ (dict, default={'emissions': float('+inf')}) –
Dictionairy of
numericvalues mapped to global constraint namingstrings.Recognized constraint keys are:
emissions
- Returns
The newly constructed energy system containing each component found in
components.- Return type
- to_nxgrph()[source]
Transform tessif system model into networkx graph.
Transform the
AbstractEnergySystemobject into anetworkx.DiGraphobject.- Returns
directional_graph – Networkx Directional Graph representing the abstract energy system.
- Return type