Skip to content

Commit

Permalink
Update diagnostic.py - fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jkisse authored Jan 17, 2025
1 parent 1ac38cc commit d5a35a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pandapipes/diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ def pipeflow_alpha_sweep(net, **kwargs):
for alpha in alphas:
kwargs.update({"alpha": alpha})
try:
pps.pipeflow(net, **kwargs)
pp.pipeflow(net, **kwargs)
except Exception as e:
logger.debug(f"Pipeflow did not converge with alpha = {alpha}.\nError: {e}")
if net.converged:
logger.info(f"Pipeflow did converge with alpha = {alpha}.")
return
logger.warn(f"Pipeflow did not converge with any alpha in {alphas}.")
logger.warning(f"Pipeflow did not converge with any alpha in {alphas}.")

0 comments on commit d5a35a6

Please sign in to comment.