Skip to content

Commit

Permalink
Add links to "clustered - disaggregated" checks
Browse files Browse the repository at this point in the history
This code prints the differences of the sum of all values of a certain
attribute or timeseries in the clustered network to the sum of the
corresponding disaggregated values in the original network.
Usually these should be close to zero. For `links`'s "p0" and "p1"
timeseries these aren't close to zero, but that's OK as these include
values from the CH4 links, which aren't disaggregated.
But it's probably still a good idea to have those printed in order to be
able to check whether these differences are in the correct ballpark.
Maybe the check can later be extended to be filtered so that they are
close to zero again.
  • Loading branch information
gnn committed Apr 23, 2023
1 parent b45c1d3 commit 71e2f8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions etrago/cluster/disaggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def solve(self, scenario, solver):
for bt, ts in (
("generators", {"p": fs, "q": fs}),
("storage_units", {"p": fs, "state_of_charge": fs, "q": fs}),
("links", {"p0": fs, "p1": fs}),
):
log.info(f"Attribute sums, {bt}, clustered - disaggregated:")
cnb = getattr(self.clustered_network, bt)
Expand Down

0 comments on commit 71e2f8c

Please sign in to comment.