pwrs.core.cpf_nose_event_cb#

pwrs.core.cpf_nose_event_cb.cpf_nose_event_cb(k, nx, cx, px, done, rollback, evnts, cb_data, cb_args, results=None)[source]#

Handle CPF nose-point events.

Implements the MATPOWER callback logic for the NOSE event, updating the event messages and marking the CPF run complete when the configured stop mode requests termination at the steady-state loading limit.

Parameters:
  • k (int) – Current continuation step index.

  • nx (dict) – Next-step CPF state struct.

  • cx (dict) – Current-step CPF state struct.

  • px (dict) – Previous-step CPF state struct.

  • done (dict) – CPF completion flag/message struct.

  • rollback (bool) – Whether the current step is being rolled back.

  • evnts (dict or list of dict) – Detected CPF events for the current step.

  • cb_data (dict) – CPF callback data struct.

  • cb_args (dict) – Callback arguments struct.

  • results (dict, optional) – CPF results accumulator.

Returns:

Updated (nx, cx, done, rollback, evnts, cb_data, results).

Return type:

tuple