SolveReport#

class popo.powerflow.SolveReport(records, diverged_steps, total_steps, bus_records=None)#

Bases: object

The result of a time-series solve, including whether it converged.

Variables:
  • records – One row per step and monitored transformer.

  • diverged_steps – Steps at which the solver did not converge.

  • total_steps – Steps attempted.

  • bus_records – One row per step and requested bus, with columns step, bus and vmag_pu (the mean across the bus’s connected phases), or None when no buses were requested. A diverged step is recorded as NaN rather than as the solver’s last iterate.

property converged: bool#

True when every step converged.

property diverged_fraction: float#

Share of steps that did not converge.

voltage_traces()#

One voltage series per requested bus, in step order.

Return type:

dict[str, ndarray]

Returns:

Bus name to per-unit voltage array, ready for popo.standards.VoltageLimits.event_summary().

Raises:

ValueError – If the solve recorded no buses.

require_convergence(tolerance=0.0)#

Raise unless the diverged share is within tolerance.

Parameters:

tolerance (float) – Permitted share of diverged steps, 0.0 for none.

Raises:

ConvergenceError – If more steps diverged than the tolerance allows.

Return type:

None