diff --git a/etrago/cluster/disaggregation.py b/etrago/cluster/disaggregation.py index 351e7863..08b2a5e3 100644 --- a/etrago/cluster/disaggregation.py +++ b/etrago/cluster/disaggregation.py @@ -761,12 +761,23 @@ def solve_partial_network( def transfer_results(self, *args, **kwargs): kwargs["bustypes"] = ["generators", "links", "storage_units", "stores"] - kwargs["series"] = { - "generators": {"p"}, - "links": {"p0", "p1"}, - "storage_units": {"p", "state_of_charge"}, - "stores": {"e", "p"}, - } + + # Only disaggregate reactive power (q) if a pf_post_lopf was performed + # and there is data in resulting q time series + if self.original_network.generators_t.q.empty: + kwargs["series"] = { + "generators": {"p"}, + "links": {"p0", "p1"}, + "storage_units": {"p", "state_of_charge"}, + "stores": {"e", "p"}, + } + else: + kwargs["series"] = { + "generators": {"p", "q"}, + "links": {"p0", "p1"}, + "storage_units": {"p", "q", "state_of_charge"}, + "stores": {"e", "p"}, + } return super().transfer_results(*args, **kwargs)