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

Gas clustering is failing #730

Closed CarlosEpia closed 4 months ago

CarlosEpia commented 4 months ago

The function etrago.spatial_clustering_gas() fails with this error message:

Traceback (most recent call last):

  File ~/env/etrago_710_fail-fix/lib/python3.10/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File ~/git/eTraGo/etrago/appl.py:766
    etrago = run_etrago(args, json_path=None)

  File ~/git/eTraGo/etrago/appl.py:731 in run_etrago
    etrago.spatial_clustering_gas()

  File ~/git/eTraGo/etrago/cluster/gas.py:970 in run_spatial_clustering_gas
    gas_network, weight, n_clusters = preprocessing(self)

  File ~/git/eTraGo/etrago/cluster/gas.py:130 in preprocessing
    raise ValueError(msg)

ValueError: The number of clusters for the gas sector (14) must be higher than the number of neighboring country gas buses (23).