pwrs.core.nlpopf_solver#

pwrs.core.nlpopf_solver.nlpopf_solver(om, mpopt, nargout=1)[source]#

Solve AC optimal power flow using MP-Opt-Model.

Parameters:
  • om (OPFModel) – OPF model object for the AC OPF problem.

  • mpopt (dict) – MATPOWER options dict used to configure the NLP solver and AC OPF formulation.

  • nargout (int, optional) – Number of outputs to emulate from the MATLAB interface.

Returns:

(results, success, raw) in MATLAB-compatible form. results is a MATPOWER case dict containing solved bus, gen, branch, shadow price, and optimization fields.

Return type:

dict or tuple

pwrs.core.nlpopf_solver.nlpopf_solver_full(om, mpopt)[source]#

Return nonlinear OPF results, success flag and raw solver data.

Parameters:

mpopt (MatpowerConfig)

Return type:

tuple[dict[str, object], float, dict[str, object]]