Skip to content

Commit

Permalink
merge dev into features/#21-import-connect-genos
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed Oct 16, 2017
2 parents 1eada48 + cf53b8f commit e0855cf
Show file tree
Hide file tree
Showing 20 changed files with 787 additions and 364 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ eDisGo.egg-info/
/edisgo/examples/Exemplary_PyPSA_line_results.csv

# exclude directories
/edisgo/examples/edisgo2pypsa_export/*
/edisgo/examples/edisgo2pypsa_export/*
/edisgo/examples/data/

# exclude check scripts
/edisgo/examples/compare_graphs.py
/edisgo/examples/compare_pypsa_network.py
4 changes: 3 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.. _api:

API
~~~
===

.. make doc-string generated documentation appear here
Expand Down
9 changes: 9 additions & 0 deletions doc/data_sources.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _data-sources:

Data sources
============


Input parameter
---------------

2 changes: 2 additions & 0 deletions doc/dev_notes.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _dev-notes:

Notes to developers
===================

Expand Down
10 changes: 10 additions & 0 deletions doc/features_in_detail.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _features-in-detail:

Features in detail
==================

Data import
-----------

Power flow analysis
-------------------
5 changes: 5 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ eDisGo -- Optimization of flexibility options and grid expansion for distributio
.. toctree::
:maxdepth: 2

start_page
quickstart
usage_details
features_in_detail
data_sources
dev_notes
definitions_and_units
api
Expand Down
4 changes: 4 additions & 0 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. _quickstart:

Quickstart
==========
46 changes: 46 additions & 0 deletions doc/start_page.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
eDisGo
======

The python package eDisGo provides a toolbox for analysis and optimization of
distribution grids. This software lives in the context of the research project
`open_eGo <https://openegoproject.wordpress.com>`_. It is closely related to the
python project `Ding0 <https://github.com/openego/ding0>`_ as this project
is currently the single data source for eDisGo providing synthetic grid data
for whole Germany.

The toolbox currently includes

* Data import from data sources of the open_eGo project
* Power flow analysis for grid issue identification (enabled by `PyPSA <https://pypsa.org>`_)
* Automatic grid reinforced solving overloading and overvoltage issues

Features to be included

* Battery storage integration
* Grid operation optimized curtailment
* Cluster based analyses

See :ref:`quickstart` for the first steps. A deeper guide is provided in :ref:`usage-details`.
We explain in detail how things are done in :ref:`features-in-detail`.
:ref:`data-sources` details on how to import and suitable available data sources.
For those of you who want to contribute see :ref:`dev-notes` and the
:ref:`api` reference.


LICENSE
-------

Copyright (C) 2017 Reiner Lemoine Institut gGmbH

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program. If not, see https://www.gnu.org/licenses/.
22 changes: 22 additions & 0 deletions doc/usage_details.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _usage-details:

Usage details
=============

The fundamental data structure
------------------------------

Identify grid issues
--------------------

Grid extension
--------------

.. Battery storages
.. ----------------
.. Curtailment
.. -----------
Retrieve results
----------------
63 changes: 16 additions & 47 deletions edisgo/config/config_costs_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,19 @@

# the key refers to column 'name' in equipment files

[costs_lv_cables]

NAYY 4x1x300 = 0
NAYY 4x1x240 = 0
NAYY 4x1x185 = 0
NAYY 4x1x150 = 0
NAYY 4x1x120 = 0
NAYY 4x1x95 = 0
NAYY 4x1x50 = 0
NAYY 4x1x35 = 0

[costs_mv_cables]

NA2XS2Y 3x1x185 RM/25 = 0
NA2XS2Y 3x1x240 RM/25 = 0
NA2XS2Y 3x1x300 RM/25 = 0
NA2XS2Y 3x1x400 RM/35 = 0
NA2XS2Y 3x1x500 RM/35 = 0
NA2XS2Y 3x1x150 RE/25 = 0
NA2XS2Y 3x1x240 = 0
NA2XS(FL)2Y 3x1x300 RM/25 = 0
NA2XS(FL)2Y 3x1x400 RM/35 = 0
NA2XS(FL)2Y 3x1x500 RM/35 = 0

[costs_mv_overhead_lines]

48-AL1/8-ST1A = 0
94-AL1/15-ST1A = 0
122-AL1/20-ST1A = 0

[costs_lv_transformers]

50 kVA = 0
100 kVA = 0
160 kVA = 0
250 kVA = 0
400 kVA = 0
630 kVA = 0
800 kVA = 0
1000 kVA = 0

[costs_mv_transformers]

20 MVA = 0
32 MVA = 0
40 MVA = 0
63 MVA = 0
[costs_cables]

# costs in kEUR/km, source: DENA Verteilnetzstudie
# costs depend on population density according to DENA Verteilnetzstudie
# here "rural" corresponds to a population density of <= 500 people/km²
# and "urban" corresponds to a population density of > 500 people/km²
lv rural = 60
lv urban = 100
mv rural = 80
mv urban = 140

[costs_transformers]

# costs in kEUR, source: DENA Verteilnetzstudie
lv = 10
mv = 1000
2 changes: 1 addition & 1 deletion edisgo/config/config_flexopt_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ lv_feedin_case_max_v_deviation = 0.03
# ============
load_factor_hv_mv_transformer = 1.0
load_factor_mv_lv_transformer = 1.0
load_factor_mv_line = 0.6
load_factor_mv_line = 1.0
load_factor_lv_line = 1.0
22 changes: 17 additions & 5 deletions edisgo/data/import_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
if not 'READTHEDOCS' in os.environ:
from ding0.tools.results import load_nd_from_pickle
from ding0.core.network.stations import LVStationDing0
from ding0.core.network.grids import CircuitBreakerDing0
from ding0.core.structure.regions import LVLoadAreaCentreDing0

import logging
Expand Down Expand Up @@ -75,9 +74,6 @@ def import_from_ding0(file, network):

ding0_mv_grid = ding0_nd._mv_grid_districts[0].mv_grid

# Make sure circuit breakers (respectively the rings) are closed
ding0_mv_grid.close_circuit_breakers()

# Import medium-voltage grid data
network.mv_grid = _build_mv_grid(ding0_mv_grid, network)

Expand Down Expand Up @@ -271,6 +267,15 @@ def _build_mv_grid(ding0_grid, network):
v_level=_.v_level) for _ in ding0_grid.generators()}
grid.graph.add_nodes_from(generators.values(), type='generator')

# Create list of diconnection point instances and add these to grid's graph
disconnecting_points = {_: MVDisconnectingPoint(id=_.id_db,
geom=_.geo_data,
state=_.status,
grid=grid)
for _ in ding0_grid._circuit_breakers}
grid.graph.add_nodes_from(disconnecting_points.values(),
type='disconnection_point')

# Create list of branch tee instances and add these to grid's graph
branch_tees = {_: BranchTee(id=_.id_db,
geom=_.geo_data,
Expand Down Expand Up @@ -322,6 +327,7 @@ def _build_mv_grid(ding0_grid, network):
# Merge node above defined above to a single dict
nodes = {**loads,
**generators,
**disconnecting_points,
**branch_tees,
**stations,
**{ding0_grid.station(): mv_station}}
Expand Down Expand Up @@ -556,7 +562,7 @@ def _attach_aggregated(network, grid, aggregated, ding0_grid):

# connect generator to MV station
line = Line(id='line_aggr_generator_vlevel_{v_level}_'
'{subtype}'.format(
'{type}_{subtype}'.format(
v_level=v_level,
subtype=subtype),
type=aggr_line_type,
Expand Down Expand Up @@ -649,6 +655,12 @@ def _validate_ding0_mv_grid_import(grid, ding0_grid):
data_integrity['branch_tee']['edisgo'] = len(
grid.graph.nodes_by_attribute('branch_tee'))

# Check number of disconnecting points
data_integrity['disconnection_point']['ding0'] = len(
ding0_grid._circuit_breakers)
data_integrity['disconnection_point']['edisgo'] = len(
grid.graph.nodes_by_attribute('disconnection_point'))

# Check number of MV transformers
data_integrity['mv_transformer']['ding0'] = len(
list(ding0_grid.station().transformers()))
Expand Down
Loading

0 comments on commit e0855cf

Please sign in to comment.