Merge pull request #340 from PyPSA/skip-if-no-lv
skip iterations if no lines are expandable
This commit is contained in:
commit
297ae04d5f
@ -62,6 +62,8 @@ Upcoming Release
|
||||
|
||||
* New network topology extracted from the ENTSO-E interactive map.
|
||||
|
||||
* Iterative solving with impedance updates is skipped if there are no expandable lines.
|
||||
|
||||
* Switch from Germany to Belgium for continuous integration and tutorial to save resources.
|
||||
|
||||
* Use updated SARAH-2 and ERA5 cutouts with slightly wider scope to east and additional variables.
|
||||
|
@ -254,7 +254,12 @@ def solve_network(n, config, opts='', **kwargs):
|
||||
n.config = config
|
||||
n.opts = opts
|
||||
|
||||
if cf_solving.get('skip_iterations', False):
|
||||
skip_iterations = cf_solving.get('skip_iterations', False)
|
||||
if not n.lines.s_nom_extendable.any():
|
||||
skip_iterations = True
|
||||
logger.info("No expandable lines found. Skipping iterative solving.")
|
||||
|
||||
if skip_iterations:
|
||||
network_lopf(n, solver_name=solver_name, solver_options=solver_options,
|
||||
extra_functionality=extra_functionality, **kwargs)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user