When all foreign lines are modeled as DC-links (args['foreign_lines'] = 'DC'), there is a problem in th pf_function:
File "/tmp/ipykernel_32848/2701482053.py", line 1, in <cell line: 1>
pf_post_lopf(etrago, calc_losses = True)
File "/tmp/ipykernel_32848/1323864540.py", line 546, in pf_post_lopf
drop_foreign_components(network)
File "/tmp/ipykernel_32848/1323864540.py", line 432, in drop_foreign_components
foreign_series[comp][a] = foreign_series[comp][a][
File "/home/clara/etrago_pypsa201/venv/lib/python3.8/site-packages/pandas/core/frame.py", line 3810, in __getitem__
indexer = self.columns._get_indexer_strict(key, "columns")[1]
File "/home/clara/etrago_pypsa201/venv/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 6111, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "/home/clara/etrago_pypsa201/venv/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 6174, in _raise_if_missing
raise KeyError(f"{not_found} not in index")
KeyError: "['43768 H2_for_industry', '43770 H2_for_industry', '43772 H2_for_industry', '43774 H2_for_industry', '43775 H2_for_industry', '43777 H2_for_industry', '43780 H2_for_industry'] not in index"
When all foreign lines are modeled as DC-links (
args['foreign_lines'] = 'DC'
), there is a problem in th pf_function:I used the current dev-branch.