PyPSA-EUR SolveNetwork rule throwing error using cbc solver

87 views Asked by At

Followed basic steps to setup PyPSA-Eur. Electricity only test was successful by executing

snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_Co2L-24H.nc --configfile config/test/config.electricity.yaml

but when I execute

snakemake -call solve_elec_networks

I get the following error

AssertionError: In Line cluster underground, the values of attribute underground do not agree:

I am using default config and cbc for solving the network. Do I have to make any changes in config.yaml before executing solve_elec_networks rule?

EDIT:

Traceback (most recent call last): File "/mnt/d/inc/pypsa_test/pypsa-eur/.snakemake/scripts/tmplkaoyzq0.cluster_network.py", line 515, in clustering = clustering_for_n_clusters( File "/mnt/d/inc/pypsa_test/pypsa-eur/.snakemake/scripts/tmplkaoyzq0.cluster_network.py", line 413, in clustering_for_n_clusters clustering = get_clustering_from_busmap( File "/home/john/anaconda3/envs/pypsa-eur/lib/python3.10/site-packages/pypsa/clustering/spatial.py", line 535, in get_clustering_from_busmap lines, lines_t, linemap = aggregatelines( File "/home/john/anaconda3/envs/pypsa-eur/lib/python3.10/site-packages/pypsa/clustering/spatial.py", line 436, in aggregatelines df = df.groupby(grouper, axis=0).agg(static_strategies) File "/home/john/.local/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 1269, in aggregate result = op.agg() File "/home/john/.local/lib/python3.10/site-packages/pandas/core/apply.py", line 163, in agg return self.agg_dict_like() File "/home/john/.local/lib/python3.10/site-packages/pandas/core/apply.py", line 420, in agg_dict_like results = { File "/home/john/.local/lib/python3.10/site-packages/pandas/core/apply.py", line 421, in key: obj._gotitem(key, ndim=1).agg(how) for key, how in arg.items() File "/home/john/.local/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 269, in aggregate return self._python_agg_general(func, *args, **kwargs) File "/home/john/.local/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 288, in _python_agg_general result = self.grouper.agg_series(obj, f) File "/home/john/.local/lib/python3.10/site-packages/pandas/core/groupby/ops.py", line 994, in agg_series result = self._aggregate_series_pure_python(obj, func) File "/home/john/.local/lib/python3.10/site-packages/pandas/core/groupby/ops.py", line 1015, in _aggregate_series_pure_python res = func(group) File "/home/john/.local/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 285, in f = lambda x: func(x, *args, **kwargs) File "/home/john/anaconda3/envs/pypsa-eur/lib/python3.10/site-packages/pypsa/clustering/spatial.py", line 136, in consense assert (x == v).all() or x.isnull().all(), ( AssertionError: In Line cluster underground, the values of attribute underground do not agree:

Line
1380     False
4002     False
5055     False
11429    False
9397     False
5795      True
5733     False
1376     False
Name: underground, dtype: bool
1

There are 1 answers

0
Fabian Neumann On

Now fixed in PyPSA-Eur master via https://github.com/PyPSA/pypsa-eur/pull/714.