Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimal Relocation of CBs #296

Open
wants to merge 9 commits into
base: features/grid_reinforcement_Batuhan
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions doc/api/edisgo.tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ edisgo.tools.config module
:undoc-members:
:show-inheritance:

edisgo.tools.edisgo\_run module
--------------------------------

.. automodule:: edisgo.tools.edisgo_run
:members:
:undoc-members:
:show-inheritance:

edisgo.tools.geo module
------------------------

Expand All @@ -33,6 +25,14 @@ edisgo.tools.geopandas\_helper module
:undoc-members:
:show-inheritance:

edisgo.tools.logger module
----------------------------------------

.. automodule:: edisgo.tools.logger
:members:
:undoc-members:
:show-inheritance:

edisgo.tools.networkx\_helper module
----------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"shapely": ("https://shapely.readthedocs.io/en/latest/manual.html#%s", "shapely."),
"ding0": ("https://dingo.readthedocs.io/en/dev/api/ding0.html#%s", "Ding0"),
"pypsa": ("https://pypsa.readthedocs.io/en/latest/components.html#%s", "pypsa"),
"plotly": ("https://plotly.com/python-api-reference/generated/#%s.html", "plotly"),
"plotly": ("https://plotly.com/python-api-reference/generated/%s.html", "plotly"),
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
2 changes: 2 additions & 0 deletions doc/whatsnew/v0-2-0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Changes
* added pre-commit hooks (flake8, black, isort, pyupgrade) `#229 <https://github.com/openego/eDisGo/pull/229>`_
* added issue and pull request templates `#220 <https://github.com/openego/eDisGo/issues/220>`_
* added Windows installation yml and documentation
* added functionality to set up different loggers with individual logging levels and where to write output `#295 <https://github.com/openego/eDisGo/issues/295>`_
* added integrity checks of eDisGo object `#231 <https://github.com/openego/eDisGo/issues/231>`_
* added functionality to save to and load from zip archive `#216 <https://github.com/openego/eDisGo/pull/216>`_
* added option to not raise error in case power flow did not converge `#207 <https://github.com/openego/eDisGo/issues/207>`_
* added pyplot `#214 <https://github.com/openego/eDisGo/pull/214>`_
* added functionality to create geopandas dataframes `#224 <https://github.com/openego/eDisGo/issues/224>`_
* added functionality to resample time series `#269 <https://github.com/openego/eDisGo/pull/269>`_
* added tests
* major refactoring of loads and time series

Expand Down
3 changes: 2 additions & 1 deletion edisgo/config/config_grid_expansion_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# Standard equipment for grid expansion measures. Source: Rehtanz et. al.: "Verteilnetzstudie für das Land Baden-Württemberg", 2017.
hv_mv_transformer = 40 MVA
mv_lv_transformer = 630 kVA
mv_line = NA2XS2Y 3x1x185 RM/25
mv_line_10kv = NA2XS2Y 3x1x185 RM/25
mv_line_20kv = NA2XS2Y 3x1x240
lv_line = NAYY 4x1x150

[grid_expansion_allowed_voltage_deviations]
Expand Down
48 changes: 47 additions & 1 deletion edisgo/edisgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class EDisGo:
def __init__(self, **kwargs):

# load configuration
self._config = Config(config_path=kwargs.get("config_path", None))
self._config = Config(config_path=kwargs.get("config_path", "default"))

# instantiate topology object and load grid data
self.topology = Topology(config=self.config)
Expand Down Expand Up @@ -2037,6 +2037,52 @@ def check_integrity(self):

logging.info("Integrity check finished. Please pay attention to warnings.")

def resample_timeseries(self, method: str = "ffill", freq: str = "15min"):
"""
Resamples all generator, load and storage time series to a desired resolution.

The following time series are affected by this:

* :attr:`~.network.timeseries.TimeSeries.generators_active_power`

* :attr:`~.network.timeseries.TimeSeries.loads_active_power`

* :attr:`~.network.timeseries.TimeSeries.storage_units_active_power`

* :attr:`~.network.timeseries.TimeSeries.generators_reactive_power`

* :attr:`~.network.timeseries.TimeSeries.loads_reactive_power`

* :attr:`~.network.timeseries.TimeSeries.storage_units_reactive_power`

Both up- and down-sampling methods are possible.

Parameters
----------
method : str, optional
Method to choose from to fill missing values when resampling.
Possible options are:

* 'ffill'
Propagate last valid observation forward to next valid
observation. See :pandas:`pandas.DataFrame.ffill<DataFrame.ffill>`.
* 'bfill'
Use next valid observation to fill gap. See
:pandas:`pandas.DataFrame.bfill<DataFrame.bfill>`.
* 'interpolate'
Fill NaN values using an interpolation method. See
:pandas:`pandas.DataFrame.interpolate<DataFrame.interpolate>`.

Default: 'ffill'.
freq : str, 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'.

"""
self.timeseries.resample_timeseries(method=method, freq=freq)


def import_edisgo_from_pickle(filename, path=""):
abs_path = os.path.abspath(path)
Expand Down
20 changes: 10 additions & 10 deletions edisgo/equipment/equipment-parameters_LV_cables.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name,U_n,I_max_th,R_per_km,L_per_km
#-,kV,kA,ohm/km,mH/km
NAYY 4x1x300,0.4,0.419,0.1,0.279
NAYY 4x1x240,0.4,0.364,0.125,0.254
NAYY 4x1x185,0.4,0.313,0.164,0.256
NAYY 4x1x150,0.4,0.275,0.206,0.256
NAYY 4x1x120,0.4,0.245,0.253,0.256
NAYY 4x1x95,0.4,0.215,0.320,0.261
NAYY 4x1x50,0.4,0.144,0.449,0.270
NAYY 4x1x35,0.4,0.123,0.868,0.271
name,U_n,I_max_th,R_per_km,L_per_km,C_per_km
#-,kV,kA,ohm/km,mH/km,uF/km
NAYY 4x1x300,0.4,0.419,0.1,0.279,0
NAYY 4x1x240,0.4,0.364,0.125,0.254,0
NAYY 4x1x185,0.4,0.313,0.164,0.256,0
NAYY 4x1x150,0.4,0.275,0.206,0.256,0
NAYY 4x1x120,0.4,0.245,0.253,0.256,0
NAYY 4x1x95,0.4,0.215,0.320,0.261,0
NAYY 4x1x50,0.4,0.144,0.449,0.270,0
NAYY 4x1x35,0.4,0.123,0.868,0.271,0
2 changes: 1 addition & 1 deletion edisgo/flex_opt/charging_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
}

logger = logging.getLogger("edisgo")
logger = logging.getLogger(__name__)


# TODO: the dummy timeseries should be as long as the simulated days and not
Expand Down
Loading