Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:openego/eDisGo into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
gplessm committed Sep 13, 2017
2 parents fcddf0a + 368317f commit 76d03d8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions edisgo/data/import_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def _build_lv_grid(ding0_grid, network):
nominal_capacity=_.capacity,
type=_.type,
subtype=_.subtype,
grid=lv_grid) for _ in ding0_lv_grid.generators()}
grid=lv_grid,
v_level=_.v_level) for _ in ding0_lv_grid.generators()}
lv_grid.graph.add_nodes_from(generators.values(), type='generator')

# Create list of branch tee instances and add these to grid's graph
Expand Down Expand Up @@ -243,7 +244,8 @@ def _build_mv_grid(ding0_grid, network):
nominal_capacity=_.capacity,
type=_.type,
subtype=_.subtype,
grid=grid) for _ in ding0_grid.generators()}
grid=grid,
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
Expand Down Expand Up @@ -507,7 +509,8 @@ def _attach_aggregated(grid, aggregated, ding0_grid):
type=val2['type'],
subtype=subtype,
geom=grid.station.geom,
grid=grid)
grid=grid,
v_level=4)
grid.graph.add_node(gen, type='generator')

# connect generator to MV station
Expand Down
6 changes: 6 additions & 0 deletions edisgo/grid/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def __init__(self, **kwargs):
self._nominal_capacity = kwargs.get('nominal_capacity', None)
self._type = kwargs.get('type', None)
self._subtype = kwargs.get('subtype', None)
self._v_level = kwargs.get('v_level', None)

# TODO: replace below dummy timeseries
hours_of_the_year = 8760
Expand Down Expand Up @@ -257,6 +258,11 @@ def nominal_capacity(self):
""":obj:`float` : Nominal generation capacity"""
return self._nominal_capacity

@property
def v_level(self):
""":obj:`int` : Voltage level"""
return self._v_level


class Storage(Component):
"""Storage object
Expand Down

0 comments on commit 76d03d8

Please sign in to comment.