Beginning with version 4, Matpowerincludes a new primal-dual interior point
solver called MIPS, for MatpowerInterior Point Solver. It is implemented in
pure-Matlabcode, derived from the MEX implementation of the algorithms described
in [8, 43].

This solver has application outside of Matpowerto general nonlinear optimization
problems of the following form:

(A.1)

subject to

where , and .

The solver is implemented by the mips function, which can be called as follows,

[x, f, exitflag, output, lambda] = ... mips(f_fcn, x0, A, l, u, xmin, xmax, gh_fcn, hess_fcn, opt);

where the input and output arguments are described in Tables A-1 and A-2, respectively.
Alternatively, the input arguments can be packaged as ﬁelds in a problem struct
and passed in as a single argument, where all ﬁelds except f_fcn and x0 are
optional.

[x, f, exitflag, output, lambda] = mips(problem);

Table A-1:Input Arguments for mips^{†}

name

description

f_fcn

Handle to a function that evaluates the objective function, its gradients and Hessian^{‡}for a given value of. Calling syntax for this function:

[f, df, d2f] = f_fcn(x)

x0

Starting value of optimization vector.

A, l, u

Deﬁne the optional linear constraints. Default values for the elementsof l and u are -Inf and Inf, respectively.

xmin, xmax

Optional lower and upper bounds on thevariables, defaults are -Inf and Inf,respectively.

gh_fcn

Handle to function that evaluates the optional nonlinear constraints and theirgradients for a given value of. Calling syntax for this function is:

[h, g, dh, dg] = gh_fcn(x)

hess_fcn

Handle to function that computes the Hessian^{‡}of the Lagrangian for given values of,and, whereandare the multipliers on the equality and inequalityconstraints,and, respectively. The calling syntax for this function is:

Lxx = hess_fcn(x, lam, cost_mult),

where= lam.eqnonlin,= lam.ineqnonlin and cost_mult is a parameterused to scale the objective function

opt

Optional options structure with ﬁelds, all of which are also optional, described inTableA-3.

problem

Alternative, single argument input struct with ﬁelds corresponding to argumentsabove.

^{†}All inputs are optional except f_fcn and x0.^{‡}If gh_fcn is provided then hess_fcn is also required. Speciﬁcally, if there are nonlinear constraints, the Hessian informationmust provided by the hess_fcn function and it need not be computed in f_fcn.

Table A-2:Output Arguments for mips

name

description

x

solution vector

f

ﬁnal objective function value

exitflag

exit ﬂag

1 –

ﬁrst order optimality conditions satisﬁed

0 –

maximum number of iterations reached

-1 –

numerically failed

–

output

output struct with ﬁelds

iterations

number of iterations performed

hist

struct array with trajectories of the following: feascond,gradcond, compcond, costcond, gamma, stepsize, obj, alphap,alphad

message

exit message

lambda

struct containing the Langrange and Kuhn-Tucker multipliers on theconstraints, with ﬁelds:

eqnonlin

nonlinear equality constraints

ineqnonlin

nonlinear inequality constraints

mu_l

lower (left-hand) limit on linear constraints

mu_u

upper (right-hand) limit on linear constraints

lower

lower bound on optimization variables

upper

upper bound on optimization variables

Table A-3:Options for mips^{†}

name

default

description

opt.verbose

0

controls level of progress output displayed

0 –

print no progress info

1 –

print a little progress info

2 –

print a lot of progress info

3 –

print all progress info

–

opt.feastol

termination tolerance for feasibility condition

opt.gradtol

termination tolerance for gradient condition

opt.comptol

termination tolerance for complementarity condition

opt.costtol

termination tolerance for cost condition

opt.max_it

150

maximum number of iterations

opt.step_control

0

set to 1 to enable step-size control

opt.sc.red_it

20

max number of step-size reductions if step-control is on

opt.cost_mult

1

cost multiplier used to scale the objective function for improvedconditioning. Note: This value is also passed as the 3^{rd}argument to the Hessian evaluation function so that it canappropriately scale the objective function term in the Hessian ofthe Lagrangian.

Kuhn-Tucker multipliers smaller than this value for non-bindingconstraints are forced to zero

opt.max_stepsize

algorithm returns “Numerically Failed” if the 2-norm of theNewton stepfrom(A.45)exceeds this value

The calling syntax is nearly identical to that used by fmincon from Matlab’s
Optimization Toolbox. The primary diﬀerence is that the linear constraints are speciﬁed in
terms of a single doubly-bounded linear function () as opposed to separate
equality constrained () and upper bounded () functions. Internally,
equality constraints are handled explicitly and determined at run-time based on the values
of and .

The user-deﬁned functions for evaluating the objective function, constraints and
Hessian are identical to those required by fmincon, with one exception described below for
the Hessian evaluation function. Speciﬁcally, f_fcn should return f as the scalar objective
function value , df as an vector equal to and, unless gh_fcn is
provided and the Hessian is computed by hess_fcn, d2f as an matrix
equal to the Hessian . Similarly, the constraint evaluation function gh_fcn
must return the vector of nonlinear equality constraint violations ,
the vector of nonlinear inequality constraint violations along with
their gradients in dg and dh. Here dg is an matrix whose column is
and dh is , with column equal to . Finally, for cases with
nonlinear constraints, hess_fcn returns the Hessian of the Lagrangian
function

(A.6)

for given values of the multipliers and , where is the cost_mult scale factor for
the objective function. Unlike fmincon, mips passes this scale factor to the Hessian
evaluation function in the 3^{rd} argument.

The use of nargout in f_fcn and gh_fcn is recommended so that the gradients and
Hessian are only computed when required.