pwrs.core.cpf_qlim_event_cb#
- pwrs.core.cpf_qlim_event_cb.cpf_qlim_event_cb(k, nx, cx, px, done, rollback, evnts, cb_data, cb_args, results=None)[source]#
Handle CPF reactive-power limit events.
Implements MATPOWER’s callback logic for
QLIMevents by fixing generators at their reactive limits, converting affected buses to PQ, updating the reference/PV/PQ partitions, and restarting the continuation step when necessary.- 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