pwrs.core.savecase#

pwrs.core.savecase.savecase(*args, nargout=None)[source]#

Save a MATPOWER case to .m or .mat format.

Deprecated since version 0.1.1: Use pwrs.save() for JSON, MAT, NPZ, and Excel case IO. This compatibility function remains available for MATLAB .m output.

Mirrors MATPOWER’s savecase entry point for the struct form of case data. It writes either a MATLAB case file or a MAT-file, preserving the requested MATPOWER version layout where supported.

Parameters:
  • *args – MATPOWER-style savecase inputs beginning with the output file name, followed by an optional comment block, the case struct, and an optional version selector.

  • nargout (int, optional) – MATLAB compatibility flag controlling whether the output file name is returned.

Returns:

Output file name when nargout == 1, otherwise None.

Return type:

str or None