loadcase(casefile,
return_as_obj=True,
expect_gencost=True,
expect_areas=True)
| source code
|
Returns the individual data matrices or an dict containing them as
values.
Here casefile is either a dict containing the keys
baseMVA , bus , gen ,
branch , areas , gencost , or a
string containing the name of the file. If casefile contains
the extension '.mat' or '.py', then the explicit file is searched. If
casefile containts no extension, then loadcase
looks for a '.mat' file first, then for a '.py' file. If the file does
not exist or doesn't define all matrices, the function returns an exit
code as follows:
-
all variables successfully defined
-
input argument is not a string or dict
-
specified extension-less file name does not exist
-
specified .mat file does not exist
-
specified .py file does not exist
-
specified file fails to define all matrices or contains syntax error
If the input data is not a dict containing a 'version' key, it is
assumed to be a PYPOWER case file in version 1 format, and will be
converted to version 2 format.
- Authors:
-
Carlos E. Murillo-Sanchez (PSERC Cornell & Universidad
Autonoma de Manizales),
Ray Zimmerman (PSERC Cornell),
Richard Lincoln
|