Skip to content

Commit

Permalink
fix merge and some minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed Sep 11, 2017
1 parent 0c82684 commit ce6f97d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions edisgo/data/import_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ def _build_mv_grid(ding0_grid, network):
la_centers = [_ for _ in ding0_grid._graph.nodes()
if isinstance(_, LVLoadAreaCentreDing0)]
if la_centers:
aggregated, aggr_stations = _determine_aggregated_nodes(la_centers)
aggregated, aggr_stations, dingo_import_data = _determine_aggregated_nodes(la_centers)
network.dingo_import_data = dingo_import_data
else:
aggregated = aggr_stations = []

Expand Down Expand Up @@ -866,7 +867,7 @@ def _validate_load_generation(mv_grid, ding0_mv_grid):
edisgo=v2['edisgo']))


def import_generators(network, data_source):
def import_generators(network, data_source=None):
"""
Import generator data from source.
Expand Down Expand Up @@ -899,7 +900,7 @@ def import_generators(network, data_source):
"""

if data_source == 'oedb':
return _import_genos_from_oedb(network)
_import_genos_from_oedb(network)
else:
logger.error("Invalid data source {} provided. Please re-check the file "
"`config_db_tables.cfg`".format(data_source))
Expand Down
2 changes: 1 addition & 1 deletion edisgo/grid/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +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)
self._v_level = kwargs.get('v_level', None)

# TODO: replace below dummy timeseries
hours_of_the_year = 8760
Expand Down
4 changes: 2 additions & 2 deletions edisgo/grid/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def import_generators(self):
:func:`edisgo.data.import_data.import_generators`
"""
data_source = data_source=self.config['data']['data_source']
return import_generators(network=self,
data_source=data_source)
import_generators(network=self,
data_source=data_source)

def analyze(self, mode=None):
"""Analyzes the grid by power flow analysis
Expand Down

0 comments on commit ce6f97d

Please sign in to comment.