pwrs.core.dcopf_solver#

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

Solve a DC optimal power flow.

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

  • mpopt (dict) – MATPOWER options dict used to configure the QP solver and DC 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.dcopf_solver.dcopf_solver_full(om, mpopt)[source]#

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

Parameters:

mpopt (MatpowerConfig)

Return type:

tuple[dict[str, Any], float, dict[str, Any]]