pwrs.core.opf_setup#
- pwrs.core.opf_setup.opf_setup(mpc, mpopt, nargout=1)[source]#
Construct an OPF model object from a MATPOWER case dict.
- Parameters:
mpc (dict) – MATPOWER case dict with internal indexing and in-service equipment, typically produced by
ext2int().mpopt (dict) – MATPOWER options dict controlling AC/DC model selection, solver family, and OPF formulation options.
nargout (int, optional) – Number of outputs to emulate from the MATLAB interface.
- Returns:
OPF model object ready to be passed to
opf_execute().- Return type:
- pwrs.core.opf_setup.opf_setup_model(mpc, mpopt)[source]#
Build and return an OPF model object.
- Parameters:
mpopt (MatpowerConfig)