Skip to content

Commit

Permalink
Merge branch 'dev' into features/#21-import-connect-genos
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed Sep 13, 2017
2 parents ce6f97d + bfa7186 commit cbb217a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions edisgo/grid/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,9 @@ class ETraGoSpecs:
_battery_active_power : :pandas:`pandas.Series<series>`
Time series of active power the (virtual) battery (at Transition Point)
is charged (negative) or discharged (positive) with
_curtailment : :obj:`dict` of :obj:`dict` of :pandas:`pandas.Series<series>`
Time series of active power curtailment of generators for technologies
_dispatch : :obj:`dict` of :obj:`dict` of :pandas:`pandas.Series<series>`
Time series of actual dispatch and a time series of power generation
potential (without curtailment) for technologies
and sub-technologies, format::
{
Expand Down Expand Up @@ -474,7 +475,7 @@ def __init__(self, **kwargs):
self._reactive_power = kwargs.get('reactive_power', None)
self._battery_capacity = kwargs.get('battery_capacity', None)
self._battery_active_power = kwargs.get('battery_active_power', None)
self._curtailment = kwargs.get('curtailment', None)
self._dispatch = kwargs.get('dispatch', None)


class Results:
Expand Down
6 changes: 4 additions & 2 deletions edisgo/tools/pypsa_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,10 @@ def process_pfa_results(network, pypsa):
q1 = abs(pypsa.lines_t['q1'])
p0 = abs(pypsa.lines_t['p0'])
p1 = abs(pypsa.lines_t['p1'])
network.results.pfa_p = p0.where(p0 > p1, p1)
network.results.pfa_q = q0.where(q0 > q1, q1)
s0 = (p0 ** 2 + q0 ** 2).applymap(sqrt)
s1 = (p1 ** 2 + q1 ** 2).applymap(sqrt)
network.results.pfa_p = p0.where(s0 > s1, p1)
network.results.pfa_q = q0.where(s0 > s1, q1)

# process results at nodes
generators_names = [repr(g) for g in
Expand Down

0 comments on commit cbb217a

Please sign in to comment.