Sienna-Platform / Sienna-Platform/PowerOperationsModels.jl

PF in-the-loop and convergence failure

Open
#273 4 comments 0 reactions 1 assignee View on GitHub

@luke-kiernan is already working on this.

Since Sep 16, 2026.

  • #309 by @luke-kiernan — open
bug
Dominant language
Julia
Stars
2
Forks
1
Avg merge
1d 16h
Merged PRs (30d)
26

Description

With multi-period power flow in the loop, how should we handle non-convergence?

Right now, solve_power_flow! in power_flow_evaluation.jl sets pf_e_data.is_solved to true, even if some (or all) time steps failed to converge. PowerFlows.jl writes NaNs to certain fields when the power flow fails to converge. Side effects:

  • The NaNs in the bus_angle and bus_magnitude fields infect power flows in subsequent simulation steps: PSI re-uses the same PowerFlowData object and clear_injection_data! only zeroes out the power-related fields.
  • calculate_aux_variable_value! on the power flow related variables produces NaNs. The code fetches the values from the most recent simulation step for which is_solved == true, but that's all of them.

PSI has a single variable: pf_e_data.is_solved. PF has pf_data.converged::Vector{Bool}, with one true/false per time step. What should be the relationship between the two? is_solved = all(converged)? is_solved = any(converged)?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.