pwrs.mp_opt_model.nlps_master#

pwrs.mp_opt_model.nlps_master.nlps_master_full(f_fcn, x0=None, A=None, l=None, u=None, xmin=None, xmax=None, gh_fcn=None, hess_fcn=None, opt=None)[source]#

Nonlinear programming solver wrapper.

Solves the NLP

min F(X) subject to nonlinear equalities/inequalities, linear constraints, and variable bounds.

Parameters:
  • f_fcn (callable or dict) – Objective callback [f, df, d2f] = f_fcn(x) or a problem dict containing the full solver inputs.

  • x0 (array_like, optional) – Initial point.

  • A (array_like, optional) – Linear constraints l <= A*x <= u.

  • l (array_like, optional) – Linear constraints l <= A*x <= u.

  • u (array_like, optional) – Linear constraints l <= A*x <= u.

  • xmin (array_like, optional) – Variable bounds.

  • xmax (array_like, optional) – Variable bounds.

  • gh_fcn (callable, optional) – Nonlinear constraint callback [h, g, dh, dg] = gh_fcn(x).

  • hess_fcn (callable, optional) – Lagrangian Hessian callback Lxx = hess_fcn(x, lam).

  • opt (dict, optional) – Solver options dict. opt["alg"] selects MIPS or IPOPT in the current Python port.

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

Returns:

Returns (x, f, eflag, output, lambda_) or the leading subset requested by nargout.

Return type:

tuple or ndarray

pwrs.mp_opt_model.nlps_master.nlps_master(f_fcn, x0=None, A=None, l=None, u=None, xmin=None, xmax=None, gh_fcn=None, hess_fcn=None, opt=None, nargout=1)[source]#

MATPOWER-compatible NLP dispatcher; use nlps_master_full in typed code.

Parameters:

nargout (int)