pwrs.core.apply_changes#

pwrs.core.apply_changes.apply_changes(label, mpc, chgtab)[source]#

Apply a labeled change set from a MATPOWER change table.

Mirrors MATPOWER’s apply_changes helper by selecting all rows in chgtab matching label and applying the corresponding table, area-wide, load, and cost modifications to the case struct mpc.

Parameters:
  • label (float or array_like) – Change-table label identifying the rows to apply.

  • mpc (dict) – MATPOWER case struct to modify.

  • chgtab (array_like) – MATPOWER change table.

  • nargout (int, optional) – MATLAB compatibility flag.

Returns:

Updated MATPOWER case struct with the selected changes applied.

Return type:

dict