electrical_neighbours
The central module containing all code dealing with electrical neighbours
- class ElectricalNeighbours(dependencies)[source]
Bases:
egon.data.datasets.DatasetAdd lines, loads, generation and storage for electrical neighbours
This dataset creates data for modelling the considered foreign countries and writes that data into the database tables that can be read by the eTraGo tool. Neighbouring countries are modelled in a lower spatial resolution, in general one node per country is considered. Defined load timeseries as well as generatrion and storage capacities are connected to these nodes. The nodes are connected by AC and DC transmission lines with the German grid and other neighbouring countries considering the grid topology from ENTSO-E.
- Dependencies
PypsaEurSec
- Resulting tables
grid.egon_etrago_busis extendedgrid.egon_etrago_linkis extendedgrid.egon_etrago_lineis extendedgrid.egon_etrago_loadis extendedgrid.egon_etrago_load_timeseriesis extendedgrid.egon_etrago_storageis extendedgrid.egon_etrago_generatoris extendedgrid.egon_etrago_generator_timeseriesis extendedgrid.egon_etrago_transformeris extended
- name: str = 'ElectricalNeighbours'
- version: str = '0.0.11'
- buses(scenario, sources, targets)[source]
Insert central buses in foreign countries per scenario
- Parameters
sources (dict) – List of dataset sources
targets (dict) – List of dataset targets
- Returns
central_buses (geoapndas.GeoDataFrame) – Buses in the center of foreign countries
- calc_capacities()[source]
Calculates installed capacities from TYNDP data
- Returns
pandas.DataFrame – Installed capacities per foreign node and energy carrier
- central_buses_pypsaeur(sources, scenario)[source]
Returns buses in the middle of foreign countries based on prepared pypsa-eur network
- Parameters
sources (dict) – List of sources
- Returns
pandas.DataFrame – Buses in the center of foreign countries
- central_transformer(scenario, sources, targets, central_buses, new_lines)[source]
Connect central foreign buses with different voltage levels
- Parameters
sources (dict) – List of dataset sources
targets (dict) – List of dataset targets
central_buses (geopandas.GeoDataFrame) – Buses in the center of foreign countries
new_lines (geopandas.GeoDataFrame) – Lines that connect cross-border lines to central bus per country
- Returns
None.
- choose_transformer(s_nom)[source]
Select transformer and parameters from existing data in the grid model
It is assumed that transformers in the foreign countries are not limiting the electricity flow, so the capacitiy s_nom is set to the minimum sum of attached AC-lines. The electrical parameters are set according to already inserted transformers in the grid model for Germany.
- Parameters
s_nom (float) – Minimal sum of nominal power of lines at one side
- Returns
int – Selected transformer nominal power
float – Selected transformer nominal impedance
- cross_border_lines(scenario, sources, targets, central_buses)[source]
Adds lines which connect border-crossing lines from osmtgmod to the central buses in the corresponding neigbouring country
- Parameters
sources (dict) – List of dataset sources
targets (dict) – List of dataset targets
central_buses (geopandas.GeoDataFrame) – Buses in the center of foreign countries
- Returns
new_lines (geopandas.GeoDataFrame) – Lines that connect cross-border lines to central bus per country
- fill_by_backup_data_from_former_runs(df_sq, file_path, not_retrieved)[source]
Fills missing data from former runs :Parameters: * df_sq (pd.DataFrame)
file_path (str, Path)
not_retrieved (list)
- Returns
df_sq, not_retrieved
- foreign_dc_lines(scenario, sources, targets, central_buses)[source]
Insert DC lines to foreign countries manually
- Parameters
sources (dict) – List of dataset sources
targets (dict) – List of dataset targets
central_buses (geopandas.GeoDataFrame) – Buses in the center of foreign countries
- Returns
None.
- get_cross_border_buses(scenario, sources)[source]
Returns buses from osmTGmod which are outside of Germany.
- Parameters
sources (dict) – List of sources
- Returns
geopandas.GeoDataFrame – Electricity buses outside of Germany
- get_cross_border_lines(scenario, sources)[source]
Returns lines from osmTGmod which end or start outside of Germany.
- Parameters
sources (dict) – List of sources
- Returns
geopandas.GeoDataFrame – AC-lines outside of Germany
- get_foreign_bus_id(scenario)[source]
Calculte the etrago bus id from Nodes of TYNDP based on the geometry
- Returns
pandas.Series – List of mapped node_ids from TYNDP and etragos bus_id
- get_map_buses()[source]
Returns a dictonary of foreign regions which are aggregated to another
- Returns
Combination of aggregated regions
- insert_generators_sq(scn_name='status2019')[source]
Insert generators for foreign countries based on ENTSO-E data
- Parameters
gen_sq (pandas dataframe) – df with all the foreign generators produced by the function entsoe_historic_generation_capacities
scn_name (str) – The default is “status2019”.
- Returns
None.
- insert_generators_tyndp(capacities)[source]
Insert generators for foreign countries based on TYNDP-data
- Parameters
capacities (pandas.DataFrame) – Installed capacities per foreign node and energy carrier
- Returns
None.
- insert_loads_sq(scn_name='status2019')[source]
Copy load timeseries data from entso-e.
- Returns
None.
- insert_storage_tyndp(capacities)[source]
Insert storage units for foreign countries based on TYNDP-data
- Parameters
capacities (pandas.DataFrame) – Installed capacities per foreign node and energy carrier
- Returns
None.
- insert_storage_units_sq(scn_name='status2019')[source]
Insert storage_units for foreign countries based on ENTSO-E data
- Parameters
scn_name (str) – Scenario to which the foreign storage units will be assigned. The default is “status2019”.
- Returns
None.
- map_carriers_entsoe()[source]
Map carriers from entsoe-data to carriers used in eGon :returns: dict – Carrier from entsoe to eGon
- map_carriers_tyndp()[source]
Map carriers from TYNDP-data to carriers used in eGon :returns: dict – Carrier from TYNDP and eGon