A MIPS – Matpower Interior Point Solver

Beginning with version 4, Matpower includes a new primal-dual interior point solver called MIPS, for Matpower Interior Point Solver. It is implemented in pure-Matlab code, derived from the MEX implementation of the algorithms described in [843].

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

mixn f(x)
(A.1)

subject to

    g(x) = 0                                (A.2 )

    h(x) ≤ 0                                (A.3 )
  l ≤ Ax  ≤ u                               (A.4 )

xmin ≤ x ≤ xmax                             (A.5 )
where f: ℝn →  ℝ  , g : ℝn →  ℝm  and h : ℝn →  ℝp  .

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 fields in a problem struct and passed in as a single argument, where all fields 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 x  . Calling syntax for this function:

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

x0

Starting value of optimization vector x  .

A, l, u

Define the optional linear constraints l ≤ Ax ≤ u  . Default values for the elements of l and u are -Inf and Inf, respectively.

xmin, xmax

Optional lower and upper bounds on the x  variables, defaults are -Inf and Inf, respectively.

gh_fcn

Handle to function that evaluates the optional nonlinear constraints and their gradients for a given value of x  . 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 x  , λ  and μ  , where λ  and μ  are the multipliers on the equality and inequality constraints, g  and h  , 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 parameter used to scale the objective function

opt

Optional options structure with fields, all of which are also optional, described in Table A-3.

problem

Alternative, single argument input struct with fields corresponding to arguments above.

All inputs are optional except f_fcn and x0. If gh_fcn is provided then hess_fcn is also required. Specifically, if there are nonlinear constraints, the Hessian information must 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

final objective function value

exitflag

exit flag

1 – first order optimality conditions satisfied
0 – maximum number of iterations reached
-1 – numerically failed
output

output struct with fields

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 the constraints, with fields:

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 10−6

termination tolerance for feasibility condition

opt.gradtol   −6
10

termination tolerance for gradient condition

opt.comptol   −6
10

termination tolerance for complementarity condition

opt.costtol 10−6

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 improved conditioning. Note: This value is also passed as the 3rd argument to the Hessian evaluation function so that it can appropriately scale the objective function term in the Hessian of the Lagrangian.

opt.xi 0.99995

ξ  constant used in α  updates in (A.46) and (A.47)

opt.sigma 0.1

centering parameter σ  used in γ  update in (A.52)

opt.z0 1

used to initialize elements of slack variable Z

opt.alpha_min 10−8

algorithm returns “Numerically Failed” if the αp  or αd  from (A.46) and (A.47) become smaller than this value

opt.rho_min 0.95

lower bound on ρt  corresponding to 1− η  in Fig. 5 in [8]

opt.rho_max 1.05

upper bound on ρ
 t  corresponding to 1 + η  in Fig. 5 in [8]

opt.mu_threshold 10−5

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

opt.max_stepsize 1010

algorithm returns “Numerically Failed” if the 2-norm of the Newton step [   ]
 ΔX
 Δλ from (A.45) exceeds this value

The calling syntax is nearly identical to that used by fmincon from Matlab’s Optimization Toolbox. The primary difference is that the linear constraints are specified in terms of a single doubly-bounded linear function (l ≤ Ax  ≤ u  ) as opposed to separate equality constrained (Aeqx = beq  ) and upper bounded (Ax  ≤ b  ) functions. Internally, equality constraints are handled explicitly and determined at run-time based on the values of l  and u  .

The user-defined 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. Specifically, f_fcn should return f as the scalar objective function value f(x)  , df as an n × 1  vector equal to ∇f  and, unless gh_fcn is provided and the Hessian is computed by hess_fcn, d2f as an n × n  matrix equal to the Hessian ∂2f
∂x2   . Similarly, the constraint evaluation function gh_fcn must return the m × 1  vector of nonlinear equality constraint violations g(x)  , the p × 1  vector of nonlinear inequality constraint violations h(x)  along with their gradients in dg and dh. Here dg is an n × m  matrix whose jth   column is ∇gj  and dh is n × p  , with  th
j   column equal to ∇hj  . Finally, for cases with nonlinear constraints, hess_fcn returns the n × n  Hessian  2
∂∂xℒ2   of the Lagrangian function

                         T        T
ℒ (x,λ,μ, σ) = σf(x ) + λ g(x) + μ h(x )
(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 3rd argument.

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

 A.1 Example 1
 A.2 Example 2
 A.3 Quadratic Programming Solver
 A.4 Primal-Dual Interior Point Algorithm
  A.4.1 Notation
  A.4.2 Problem Formulation and Lagrangian
  A.4.3 First Order Optimality Conditions
  A.4.4 Newton Step