openego / eTraGo

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

Integrate rural heat stores into clustering #555

Closed ClaraBuettner closed 1 year ago

ClaraBuettner commented 1 year ago

When I run eTraGo with the data model I dumped today from the most recent CI-run I run into this error in the clustering:


Traceback (most recent call last):

  File "/tmp/ipykernel_16284/1504181011.py", line 1, in <cell line: 1>
    etrago.spatial_clustering()

  File "/home/clara/etrago_pypsa201/eTraGo/etrago/cluster/electrical.py", line 753, in run_spatial_clustering
    self.clustering, busmap = postprocessing(self, busmap, medoid_idx)

  File "/home/clara/etrago_pypsa201/eTraGo/etrago/cluster/electrical.py", line 604, in postprocessing
    network, busmap = adjust_no_electric_network(

  File "/home/clara/etrago_pypsa201/eTraGo/etrago/cluster/electrical.py", line 124, in adjust_no_electric_network
    & (network2.links["carrier"] == map_carrier[carry])

KeyError: 'rural_heat_store'

rural_heat_stores where missing in the previous data model, so this error doesn't show up when using data from 14.11.2022.

@CarlosEpia: I hope it is just an additional carrier that needs to be added to the map_carrier list. I will try that out and let you know if it works. As soon as I checked the new data model I will create a backup and tell you where you can find it.

ClaraBuettner commented 1 year ago

@CarlosEpia I tried to only add'rural_heat_store' : 'rural_heat_store_charger' to map_carriers. Although it is not failing, there are warnings about unconnected buses and it looks like the aggregation didn't worked properly. Can you take care of it or should I do that?

CarlosEpia commented 1 year ago

Hi Clara, I will take care of this.