edisgo.network.electromobility
¶
Module Contents¶
Classes¶
Data container for all electromobility data. |
- class edisgo.network.electromobility.Electromobility(**kwargs)[source]¶
Data container for all electromobility data.
This class holds data on charging processes (how long cars are parking at a charging station, how much they need to charge, etc.) necessary to apply different charging strategies, as well as information on potential charging sites and integrated charging parks.
- property charging_processes_df¶
DataFrame with all charging processes.
- Returns
DataFrame with AGS, car ID, trip destination, charging use case, netto charging capacity, charging demand, charge start, charge end, grid connection point and charging point ID. The columns are:
- agsint
8-digit AGS (Amtlicher Gemeindeschlüssel, eng. Community Identification Number). Leading zeros are missing.
- car_idint
Car ID to differentiate charging processes from different cars.
- destinationstr
SimBEV driving destination.
- use_casestr
SimBEV use case. Can be “hpc”, “home”, “public” or “work”.
- nominal_charging_capacity_kWfloat
Vehicle charging capacity in kW.
- grid_charging_capacity_kWfloat
Grid-sided charging capacity including charging infrastructure losses (nominal_charging_capacity_kW / eta_cp) in kW.
- chargingdemand_kWhfloat
Charging demand in kWh.
- park_time_timestepsint
Number of parking time steps.
- park_start_timestepsint
Time step the parking event starts.
- park_end_timestepsint
Time step the parking event ends.
- charging_park_idint
Designated charging park ID from potential_charging_parks_gdf. Is NaN if the charging demand is not yet distributed.
- charging_point_idint
Designated charging point ID. Is used to differentiate between multiple charging points at one charging park.
- Return type
- property potential_charging_parks_gdf¶
GeoDataFrame with all potential charging parks.
- Returns
GeoDataFrame with ID as index, AGS, charging use case (home, work, public or hpc), user-centric weight and geometry. Columns are:
- indexint
Charging park ID.
- use_casestr
TracBEV use case. Can be “hpc”, “home”, “public” or “work”.
- user_centric_weightflaot
User centric weight used in distribution of charging demand. Weight is determined by TracBEV but normalized from 0 .. 1.
- geometryGeoSeries
Geolocation of charging parks.
- Return type
- property potential_charging_parks¶
Potential charging parks within the AGS.
- Returns
List of potential charging parks within the AGS.
- Return type
list(
PotentialChargingParks
)
- property simbev_config_df¶
Dictionary containing configuration data.
- Returns
DataFrame with used regio type, charging point efficiency, stepsize in minutes, start date, end date, minimum SoC for hpc, grid timeseries setting, grid timeseries by use case setting and the number of simulated days. Columns are:
- regio_typestr
RegioStaR 7 ID used in SimBEV.
- eta_cpfloat or int
Charging point efficiency used in SimBEV.
- stepsizeint
Stepsize in minutes the driving profile is simulated for in SimBEV.
- start_datedatetime64
Start date of the SimBEV simulation.
- end_datedatetime64
End date of the SimBEV simulation.
- soc_minfloat
Minimum SoC when an HPC event is initialized in SimBEV.
- grid_timeseriesbool
Setting whether a grid timeseries is generated within the SimBEV simulation.
- grid_timeseries_by_usecasebool
Setting whether a grid timeseries by use case is generated within the SimBEV simulation.
- daysint
Timedelta between the end_date and start_date in days.
- Return type
- property integrated_charging_parks_df¶
Mapping DataFrame to map the charging park ID to the internal eDisGo ID.
The eDisGo ID is determined when integrating components using
add_component()
orintegrate_component_based_on_geolocation()
method.- Returns
Mapping DataFrame to map the charging park ID to the internal eDisGo ID.
- Return type
- property simulated_days¶
Number of simulated days in SimBEV.
- Returns
Number of simulated days
- Return type
- property eta_charging_points¶
Charging point efficiency.
- Returns
Charging point efficiency in p.u..
- Return type
- property flexibility_bands¶
Dictionary with flexibility bands (lower and upper energy band as well as upper power band).
- Parameters
flex_dict (dict(str, pandas.DataFrame)) – Keys are ‘upper_power’, ‘lower_energy’ and ‘upper_energy’. Values are dataframes containing the corresponding band per each charging point. Columns of the dataframe are the charging point names as in
loads_df
. Index is a time index.- Returns
See input parameter flex_dict for more information on the dictionary.
- Return type
dict(str, pandas.DataFrame)
- get_flexibility_bands(edisgo_obj, use_case, resample=True, tol=1e-06)[source]¶
Method to determine flexibility bands (lower and upper energy band as well as upper power band).
Besides being returned by this function, flexibility bands are written to
flexibility_bands
.- Parameters
edisgo_obj (
EDisGo
) –use_case (str or list(str)) – Charging point use case(s) to determine flexibility bands for.
resample (bool (optional)) – If True, flexibility bands are resampled to the same frequency as time series data in
TimeSeries
object. If False, original frequency is kept. Default: True.tol (float) – Tolerance to reduce or increase flexibility band values by to fix possible rounding errors that may lead to failing integrity checks and infeasibility when used to optimise charging. See
fix_flexibility_bands_rounding_errors
for more information. To avoid this behaviour, set tol to 0.0. Default: 1e-6.
- Returns
Keys are ‘upper_power’, ‘lower_energy’ and ‘upper_energy’. Values are dataframes containing the corresponding band for each charging point of the specified use case. Columns of the dataframe are the charging point names as in
loads_df
. Index is a time index.- Return type
dict(str, pandas.DataFrame)
- fix_flexibility_bands_rounding_errors(tol=1e-06)[source]¶
Fixes possible rounding errors that may lead to failing integrity checks.
Due to rounding errors it may occur, that e.g. the upper energy band is lower than the lower energy band. This does in some cases lead to infeasibilities when used to optimise charging processes.
This function increases or reduces a flexibility band by the specified tolerance in case an integrity check fails as follows:
If there are cases where the upper power band is not sufficient to meet the charged upper energy, the upper power band is increased for all charging points and all time steps.
If there are cases where the lower energy band is larger than the upper energy band, the lower energy band is reduced for all charging points and all time steps.
If there are cases where upper power band is not sufficient to meet charged lower energy, the upper power band is increased for all charging points and all time steps.
- Parameters
tol (float) – Tolerance to reduce or increase values by to fix rounding errors. Default: 1e-6.
- resample(freq: str = '15min')[source]¶
Resamples flexibility bands.
- Parameters
freq (str or pandas.Timedelta, optional) – Frequency that time series is resampled to. Offset aliases can be found here: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases. Default: ‘15min’.
- check_integrity()[source]¶
Method to check the integrity of the Electromobility object.
Raises an error in case any of the checks fails.
Currently only checks integrity of flexibility bands.
- to_csv(directory, attributes=None)[source]¶
Exports electromobility data to csv files.
The following attributes can be exported:
‘charging_processes_df’ : Attribute
charging_processes_df
is saved to charging_processes.csv.‘potential_charging_parks_gdf’ : Attribute
potential_charging_parks_gdf
is saved to potential_charging_parks.csv.‘integrated_charging_parks_df’ : Attribute
integrated_charging_parks_df
is saved to integrated_charging_parks.csv.‘simbev_config_df’ : Attribute
simbev_config_df
is saved to simbev_config.csv.‘flexibility_bands’ : The three flexibility bands in attribute
flexibility_bands
are saved to flexibility_band_upper_power.csv, flexibility_band_lower_energy.csv, and flexibility_band_upper_energy.csv.