openego / eTraGo

Optimization of flexibility options for transmission grids based on PyPSA
GNU Affero General Public License v3.0
30 stars 13 forks source link

Allow combining snapshot_clustering and skip_snapshots #691

Open ClaraBuettner opened 8 months ago

ClaraBuettner commented 8 months ago

It is currently not possible to use snapshot_clustering and skip_snapshots in combination. At least two things need to be changed. First, the snapshot_weigthing is currently overwritten in skipp_snapshots, so the weighting of the previous snapshot_clustering is overwritten:

https://github.com/openego/eTraGo/blob/94acf8d26b4ac6124f248aee14dfb7a2bb0ea5cc/etrago/cluster/snapshot.py#L833-L835

In addition, the constraints for the soc need to be updated. The soc_intra-rule for example wants to refer to the previous timestep using a fixed offset of one hour which results in errors when that one is skipped. It might be also needed to consider the number of skipped snapshots in these constraints: https://github.com/openego/eTraGo/blob/94acf8d26b4ac6124f248aee14dfb7a2bb0ea5cc/etrago/tools/constraints.py#L1759-L1768

For the next release, I will not fix it but implement a check that makes sure that those methods are not combined.