NAG CL Interfacee04ptc (handle_​solve_​socp_​ipm)

Note: this function uses optional parameters to define choices in the problem specification and in the details of the algorithm. If you wish to use default settings for all of the optional parameters, you need only read Sections 1 to 10 of this document. If, however, you wish to reset some or all of the settings please refer to Section 11 for a detailed description of the algorithm and to Section 12 for a detailed description of the specification of the optional parameters.

1Purpose

e04ptc is a solver from the NAG optimization modelling suite for large-scale second-order cone programming (SOCP) problems. It is based on an interior point method (IPM).

2Specification

 #include
void  e04ptc (void *handle, Integer nvar, double x[], Integer nnzu, double u[], Integer nnzuc, double uc[], double rinfo[], double stats[],
 void (*monit)(void *handle, const double rinfo[], const double stats[], Nag_Comm *comm, Integer *inform),
Nag_Comm *comm, NagError *fail)
The function may be called by the names: e04ptc or nag_opt_handle_solve_socp_ipm.

3Description

e04ptc solves a large-scale SOCP optimization problem in the following form
 $minimize x∈ℝn cTx subject to lA ≤ Ax ≤ uA , lx ≤ x ≤ ux , x∈K ,$ (1)
where $\mathcal{K}={\mathcal{K}}^{{n}_{1}}×\cdots ×{\mathcal{K}}^{{n}_{r}}×{ℝ}^{{n}_{l}}$ is a Cartesian product of $r$ quadratic (second-order type) cones and ${n}_{l}$-dimensional real space, and $n={\sum }_{i=1}^{r}{n}_{i}+{n}_{l}$ is the number of decision variables. Here $c$, $x$, ${l}_{x}$ and ${u}_{x}$ are $n$-dimensional vectors, $A$ is an $m$ by $n$ sparse matrix, and ${l}_{A}$ and ${u}_{A}$ are $m$-dimensional vectors. Note that $x\in \mathcal{K}$ partitions subsets of variables into quadratic cones and each ${\mathcal{K}}^{{n}_{i}}$ can be either a quadratic cone or a rotated quadratic cone. These are defined as follows:
 $K q ni ≔ z = z1,z2,…,zni ∈ ℝni : z12 ≥ ∑ j=2 ni zj2 , z1 ≥ 0 .$ (2)
 $K r ni ≔ z = z1,z2,…,zni ∈ ℝni : 2z1z2 ≥ ∑ j=3 ni zj2 , z1 ≥ 0 , z2 ≥ 0 .$ (3)
e04ptc solves SOCP problems stored as a handle. The handle points to an internal data structure which defines the problem and serves as a means of communication for functions in the NAG optimization modelling suite. First, the problem handle is initialized by calling e04rac. Then some of the functions e04rbc, e04rec, e04rfc, e04rhc or e04rjc may be called to formulate the quadratic cones, linear objective function, bounds of the variables, and the block of linear constraints, respectively. Alternatively, the whole model can be loaded from a file by e04sac. When the handle is no longer needed, e04rzc should be called to destroy it and deallocate the memory held within. See Section 4.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.
The solver method can be modified by various optional parameters (see Section 12) which can be set by e04zmc and e04zpc anytime between the initialization of the handle and a call to the solver. Once the solver has finished, options may be modified for the next solve. The solver may be called repeatedly with various optional parameters.
The optional parameter ${\mathbf{Task}}$ may be used to switch the problem to maximization or to ignore the objective function and find only a feasible point.
Several options may have significant impact on the performance of the solver. Even if the defaults were chosen to suit the majority of problems, it is recommended that you experiment in order to find the most suitable set of options for a particular problem, see Sections 11 and 12 for further details.

3.1Structure of the Lagrangian Multipliers

The algorithm works internally with estimates of both the decision variables, denoted by $x$, and the Lagrangian multipliers (dual variables), denoted by $u$ for bound and linear constraints, and $uc$ for quadratic cone constraints.
If the simple bounds have been defined (e04rhc was successfully called), the first $2n$ elements of $u$ belong to the corresponding Lagrangian multipliers, interleaving a multiplier for the lower and the upper bound for each ${x}_{i}$. If any of the bounds were set to infinity, the corresponding Lagrangian multipliers are set to $0$ and may be ignored.
Similarly, the following $2m$ elements of $u$ belong to multipliers for the linear constraints (if e04rjc has been successfully called). The organization is the same, i.e., the multipliers for each constraint for the lower and upper bounds are alternated and zeros are used for any missing (infinite bound) constraints.
Some solvers merge multipliers for both lower and upper inequality into one element whose sign determines the inequality. Negative multipliers are associated with the upper bounds and positive with the lower bounds. An equivalent result can be achieved with this storage scheme by subtracting the upper bound multiplier from the lower one. This is also consistent with equality constraints.
Finally, the elements of $uc$ are the corresponding Lagrangian multipliers for the variables in the quadratic cone constraints that have been defined by e04rbc. All multipliers are stored next to each other in array uc in the same order as the cone constraints were defined by e04rbc. For example, if the first cone constraint contains variables ${x}_{4}$, ${x}_{2}$, ${x}_{3}$ and the second cone constraint contains variables ${x}_{1}$, ${x}_{7}$, ${x}_{6}$, ${x}_{5}$, then the dimension of array uc must be $7$ and the first $3$ elements are the corresponding Lagrangian multipliers for the cone composed of ${x}_{4}$, ${x}_{2}$, ${x}_{3}$, followed by $4$ elements that are the corresponding Lagrangian multipliers for the cone of ${x}_{1}$, ${x}_{7}$, ${x}_{6}$, ${x}_{5}$.

4References

Alizadeh F and Goldfarb D (2003) Second-order cone programming Mathematical programming 95(1) 3–51
Andersen E D, Roos C and Terlaky T (2003) On implementing a primal-dual interior-point method for conic quadratic optimization Mathematical programming 95(2) 249–277
Goldfarb D and Scheinberg K (2005) Product-form Cholesky factorization in interior point methods for second-order cone programming Mathematical programming 103(1) 153–179
Goldman A J and Tucker A W (1956) Theory of linear programming Linear inequalities and related systems 38 53–97
Hogg J D and Scott J A (2011) HSL MA97: a bit-compatible multifrontal code for sparse symmetric systems RAL Technical Report. RAL-TR-2011-024
HSL (2011) A collection of Fortran codes for large-scale scientific computation http://www.hsl.rl.ac.uk/
Karypis G and Kumar V (1998) A fast and high quality multilevel scheme for partitioning irregular graphs SIAM J. Sci. Comput. 20(1) 359–392
Lobo M S, Vandenberghe L, Boyd S and Levret H (1998) Applications of second-order cone programming Linear Algebra and its Applications 284(1-3) 193–228
Lustig I J, Marsten R E and Shanno D F (1992) On implementing Mehrotra's predictor–corrector interior-point method for linear programming SIAM J. Optim. 2(3) 435–449
Mehrotra S (1992) On the implementation of a primal-dual interior point method SIAM J. Optim. 2 575–601
Nesterov Y E and Todd M J (1997) Self-scaled barriers and interior-point methods for convex programming Mathematics of Operations research 22(1) 1–42
Nesterov Y E and Todd M J (1998) Primal-dual interior-point methods for self-scaled cones SIAM J. Optim. 8(2) 324–364
Nocedal J and Wright S J (2006) Numerical Optimization (2nd Edition) Springer Series in Operations Research, Springer, New York
Sturm J F (2002) Implementation of Interior Point Methods for Mixed Semidefinite and Second Order Cone Optimization Problems Optimization Methods and Software 17(6) 151–171
Xu X, Hung P-F and Ye Y (1996) A simplified homogeneous and self-dual linear programming algorithm and its implementation Annals of Operations Research 62(1) 151–171

5Arguments

1: $\mathbf{handle}$void * Input
On entry: the handle to the problem. It needs to be initialized by e04rac and the problem formulated by some of the functions e04rbc, e04rec, e04rfc, e04rhc and e04rjc. It must not be changed between calls to the NAG optimization modelling suite.
2: $\mathbf{nvar}$Integer Input
On entry: $n$, the number of variables in the problem.
3: $\mathbf{x}\left[{\mathbf{nvar}}\right]$double Input/Output
On entry: the input of x is reserved for future releases of the NAG Library and it is ignored at the moment.
On exit: the final values of the variables $x$.
4: $\mathbf{nnzu}$Integer Input
On entry: the dimension of array u.
If ${\mathbf{nnzu}}=0$, u will not be referenced; otherwise it needs to match the dimension of constraints defined by e04rhc and e04rjc as explained in Section 3.1.
Constraint: ${\mathbf{nnzu}}\ge 0$.
5: $\mathbf{u}\left[{\mathbf{nnzu}}\right]$double Input/Output
Note: if ${\mathbf{nnzu}}>0$, u holds Lagrange multipliers (dual variables) for the bound constraints and linear constraints. If ${\mathbf{nnzu}}=0$, u will not be referenced and may be NULL.
On entry: the input of u is reserved for future releases of the NAG Library and it is ignored at the moment.
On exit: the final values of the variables $u$.
6: $\mathbf{nnzuc}$Integer Input
On entry: the dimension of array uc.
If ${\mathbf{nnzuc}}=0$, uc will not be referenced; otherwise it needs to match the total number of cone variables defined by e04rbc as explained in Section 3.1.
Constraint: ${\mathbf{nnzuc}}\ge 0$.
7: $\mathbf{uc}\left[{\mathbf{nnzuc}}\right]$double Input/Output
Note: if ${\mathbf{nnzuc}}>0$, uc holds Lagrange multipliers (dual variables) for second-order cones as defined by e04rbc. If ${\mathbf{nnzuc}}=0$, uc will not be referenced and may be NULL.
On entry: the input of uc is reserved for future releases of the NAG Library and it is ignored at the moment.
On exit: the final values of the variables $\mathit{uc}$.
8: $\mathbf{rinfo}\left[100\right]$double Output
On exit: error measures and various indicators of the algorithm (see Section 11 for details) as given in the table below:
 $0$ Value of the primal objective. $1$ Value of the dual objective. $2$ Flag indicating the system formulation used by the solver, $0$: augmented system, $1$: normal equation. $3$ Factorization type, $3$: Cholesky, $4$: Bunch–Parlett. $4$–$13$ Not referenced in this solver. $14$ Relative primal infeasibility, see Section 11.5.1. $15$ Relative duality gap, see Section 11.5.1. $16$ Relative dual infeasibility, see Section 11.5.1. $17$ Accuracy, see Section 11.5.1. $18$ $\tau$, see (23). $19$ $\kappa$, see (23). $20$ Step length. $21$–$99$ Reserved for future use.
9: $\mathbf{stats}\left[100\right]$double Output
On exit: solver statistics as given in the table below. Note that times are measured in seconds, see optional parameter ${\mathbf{Stats Time}}$.
 $0$ Number of iterations. $1$ Not referenced. $2$ Total number of iterative refinements performed. $3$ Value of the perturbation added to the diagonal in the normal equation formulation or the augmented system formulation. $4$ Total number of factorizations performed. $5$ Total time spent in the solver. $6$ Time spent in the presolve phase. $7$ Time spent in the last iteration. $8$ Total time spent factorizing the system matrix. $9$ Total time spent backsolving the system matrix. $10$ Not referenced. $11$ Time spent in the initialization phase. $12$ Number of nonzeros in the system matrix. $13$ Number of nonzeros in the system matrix factor. $14$ Maximum error of the backsolve. $15$ Number of columns in $A$ considered dense by the solver. $16$ Number of conic constraints considered dense by the solver. $17$–$99$ Reserved for future use.
10: $\mathbf{monit}$function, supplied by the user External Function
monit is provided to enable you to monitor the progress of the optimization and optionally to terminate the solver early if necessary, using argument inform. It is invoked at the end of every $i$th iteration where $i$ is given by the optional parameter ${\mathbf{SOCP Monitor Frequency}}$ (the default is $0$, monit is not called).
monit may be specified as NULLFN.
The specification of monit is:
 void monit (void *handle, const double rinfo[], const double stats[], Nag_Comm *comm, Integer *inform)
1: $\mathbf{handle}$void * Input
On entry: the handle to the problem as provided on entry to e04ptc. It may be used to query the model during the solve, and extract the current approximation of the solution by e04rxc.
2: $\mathbf{rinfo}\left[100\right]$const double Input
On entry: error measures and various indicators at the end of the current iteration as described in rinfo.
3: $\mathbf{stats}\left[100\right]$const double Input
On entry: solver statistics at the end of the current iteration as described in stats, however, elements $3$, $5$, $9$, $10$ and $15$ refer to the quantities in the last iteration rather than accumulated over all iterations through the whole algorithm run.
4: $\mathbf{comm}$Nag_Comm *
Pointer to structure of type Nag_Comm; the following members are relevant to monit.
userdouble *
iuserInteger *
pPointer
The type Pointer will be void *. Before calling e04ptc you may allocate memory and initialize these pointers with various quantities for use by monit when called from e04ptc (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
5: $\mathbf{inform}$Integer * Input/Output
On entry: a non-negative value.
On exit: must be set to a value describing the action to be taken by the solver on return from monit. Specifically, if the value is negative the solution of the current problem will terminate immediately with ${\mathbf{fail}}\mathbf{.}\mathbf{code}=$ NE_USER_STOP; otherwise, computations will continue.
11: $\mathbf{comm}$Nag_Comm *
The NAG communication argument (see Section 3.1.1 in the Introduction to the NAG Library CL Interface).
12: $\mathbf{fail}$NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument $〈\mathit{\text{value}}〉$ had an illegal value.
NE_DIM_MATCH
On entry, ${\mathbf{nnzu}}=〈\mathit{\text{value}}〉$.
nnzu does not match the size of the Lagrangian multipliers for constraints.
The correct value is $0$ for no constraints.
On entry, ${\mathbf{nnzu}}=〈\mathit{\text{value}}〉$.
nnzu does not match the size of the Lagrangian multipliers for constraints.
The correct value is either $0$ or $〈\mathit{\text{value}}〉$.
On entry, ${\mathbf{nnzuc}}=〈\mathit{\text{value}}〉$.
nnzuc does not match the size of the Lagrangian multipliers for second-order cone constraints.
${\mathbf{nnzuc}}=0$ when there are no second-order cone constraints.
On entry, ${\mathbf{nnzuc}}=〈\mathit{\text{value}}〉$.
nnzuc does not match the size of the Lagrangian multipliers for second-order cone constraints.
The correct value is either $0$ or $〈\mathit{\text{value}}〉$.
NE_HANDLE
The supplied handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been initialized by e04rac or it has been corrupted.
NE_INFEASIBLE
The problem was found to be primal infeasible.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_IMPROVEMENT
No progress, stopping early.
The solver predicted that it is unable to make further progress and stopped prematurely. This might be due to the scaling of the problem, its conditioning or numerical difficulties.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_PHASE
The problem is already being solved.
NE_REF_MATCH
On entry, ${\mathbf{nvar}}=〈\mathit{\text{value}}〉$, expected $\mathrm{value}=〈\mathit{\text{value}}〉$.
Constraint: nvar must match the value given during initialization of handle.
NE_SETUP_ERROR
This solver does not support the model defined in the handle.
NE_TIME_LIMIT
The solver terminated after the maximum time allowed was exceeded.
Maximum number of seconds exceeded. Use optional parameter ${\mathbf{Time Limit}}$ to reset the limit.
NE_TOO_MANY_ITER
Maximum number of iterations exceeded.
NE_UNBOUNDED
The problem was found to be dual infeasible.
This error indicates that the primal problem is unbounded or infeasible.
NE_USER_STOP
User requested termination during a monitoring step.
NW_NOT_CONVERGED
Suboptimal solution.
The solver predicted that it is unable to reach a better estimate of the solution. However, the error measures indicate that the point is a reasonable approximation.

7Accuracy

The accuracy of the solution is determined by optional parameters ${\mathbf{SOCP Stop Tolerance}}$ and ${\mathbf{SOCP Stop Tolerance 2}}$
If ${\mathbf{fail}}\mathbf{.}\mathbf{code}=$ NE_NOERROR on the final exit, the returned point satisfies Karush–Kuhn–Tucker (KKT) conditions to the requested accuracy (under the default settings close to $\sqrt{\epsilon }$) and thus it is a good estimate of the solution. If ${\mathbf{fail}}\mathbf{.}\mathbf{code}=$ NW_NOT_CONVERGED, some of the convergence conditions were not fully satisfied but the point is a reasonable estimate and still usable. Please refer to Section 11.5 and the description of the particular options.

8Parallelism and Performance

e04ptc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
e04ptc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9.1Formulating Problems as SOCPs

This SOCP solver can solve several common convex problems covering a large variety of applications. However, in this release, the cone constraints need to be specified explicitly which means that in certain cases a reformulation is needed. In this section, we cover QCQP, norm minimization problems and robust linear programming, see Alizadeh and Goldfarb (2003) and Lobo et al. (1998) for further details.

Convex quadratically constrained quadratic programming (QCQP) appears in applications such as modern portfolio theory and wireless sensor network localization. The general convex QCQP problem has the following form
 $minimize x∈ℝn 12 xT P0 x + q0T x + r0 subject to 12 xT Pi x + qiT x + ri ≤ 0 , i=1 ,…, p ,$ (4)
where ${P}_{i}\in {ℝ}^{n×n}$, for $i=0,\dots ,p$, are symmetric and positive semidefinite matrices, hence there exist matrices ${F}_{i}\in {ℝ}^{{k}_{i}×n}$ such that
 $Pi = FiT Fi , i=0,1,…,p .$
In many practical problems this decomposition is already available. Otherwise it needs to be computed, for example, via Cholesky or eigenvalue decomposition, such as f07fdc for positive definite matrices, and f07kdc or f08fcc for positive semidefinite matrices. Let's introduce new artificial variables ${t}_{i}$ such that ${t}_{i}+{q}_{i}^{\mathrm{T}}x+{r}_{i}=0$, then we have an equivalent characterization of cone constraints as
 $12 xT Pi x + qiT x + ri ≤ 0 ⟷ ti + qiT x + ri = 0 and 12 Fix2 ≤ ti .$
By the definition of rotated quadratic cone (3) we have
 $12 Fi2 ≤ ti ⟷ ti,1,Fix ∈ K r ki+2 .$
Therefore, model (4) can be transformed equivalently to the following SOCP problem
 $minimize x∈ℝn , t∈ℝp+1 t0 + q0T x + r0 subject to ti + qiT x + ri =0 , i=1 ,…, p , ti,1,Fix ∈ K r ki+2 , i=0 ,…, p .$ (5)
See Section 10 for an example of how to formulate and solve a QCQP problem.

9.1.2Norm Minimization Problems

Consider the following problem that minimizes the sum of Euclidean norms
 $minimize x∈ℝn ∑ i=1 r Ai x+bi 2 ,$ (6)
where ${A}_{i}\in {ℝ}^{{n}_{i}×n}$ and ${b}_{i}\in {ℝ}^{{n}_{i}}$. Problem (6) can be formulated as SOCP by introducing $r$ auxiliary variables ${t}_{i}$, for $i=1,\dots ,r$, and adding constraints
 $Ai x + bi 2 ≤ ti ⟷ ti, Ai x + bi ∈ K q ni+1 , i=1 ,…, r .$
Then the resulting SOCP is
 $minimize x∈ℝn , t∈ℝr ∑ i=1 r ti subject to ti,Aix+bi ∈ K q ni+1 , i=1 ,…,r .$ (7)
Observe that if (6) had non-negative weights in the sum, the problem would still be an SOCP.
Similarly, minimizing the maximum of Euclidean norms can be expressed as SOCPs. By introducing one auxiliary variable $t\in ℝ$, the problem
 $minimize x∈ℝn max i=1,…,r Ai x + bi 2 ,$ (8)
is equivalent to
 $minimize x∈ℝn, t∈ℝ t subject to Ai x + bi 2 ≤ t , i=1 ,…, r .$ (9)
Hence, problem (8) can be cast as the following SOCP
 $minimize x∈ℝn , t∈ℝ t subject to t, Ai x + bi ∈ K q ni+1 , i=1 ,…, r .$ (10)
As an interesting special case, an ${l}_{1}$-norm minimization problem can also be solved by SOCP. Consider the following unconstrained problem
 $minimize x∈ℝn Ax+b1 ,$ (11)
where $A\in {ℝ}^{m×n}$ and $b\in {ℝ}^{m}$, introduce an auxiliary variable $u\in {ℝ}^{m}$ such that $Ax+b=u$, then problem (11) is transformed to
 $minimize x∈ℝn , u∈ℝm u1 subject to Ax+b=u .$ (12)
By adding an auxiliary variable $t\in {ℝ}^{m}$, the above problem is equivalent to
 $minimize x∈ℝn , u∈ℝm , t∈ℝm ∑i=1m ti subject to Ax+b=u , ui ≤ ti , i=1 ,…, m .$ (13)
Note that the inequality $\left|{u}_{i}\right|\le {t}_{i}$ is equivalent to $\left({t}_{i},{u}_{i}\right)\in {\mathcal{K}}_{q}^{2}$, therefore the final SOCP is
 $minimize x∈ℝn , u∈ℝm , t∈ℝm ∑ i=1 m ti subject to Ax+b=u , ti,ui ∈ K q 2 , i=1 ,…, m .$ (14)

9.1.3Robust Linear Programming

Consider a linear programming problem
 $minimize x∈ℝn cTx subject to aiT x ≤ bi , i=1 ,…, r ,$ (15)
where $c$ and ${b}_{i}$ are given but there is some uncertainty in parameter ${a}_{i}$. In such a situation you might want to solve problem (15) in the worst-case sense, i.e., find the best solution $x$ with respect to the most adverse choice of ${a}_{i}$. Introducing uncertainty set to some or all your data and solving the problem in the worst-case scenario helps to avoid high sensitivity of your results even for a small perturbation in the input data. Assume ${a}_{i}$ are known to lie in given ellipsoids around its known centre ${\overline{a}}_{i}$
 $ai ∈ Ei ≔ a¯i + Pi u | u2≤1 ,$
where ${P}_{i}\in {ℝ}^{n×n}$ are positive semidefinite matrices, this problem is also known as robust linear programming which can be modelled as
 $minimize x∈ℝn cT x subject to aiT x ≤ bi , for all ai ∈ Ei , i=1 ,…, r .$ (16)
Constraints
 $aiT x ≤ bi , for all ai ∈ Ei , i=1 ,…, r$
are equivalent to
 $maximize u∈ℝn a¯iT x + Pi x T u | u ≤ 1 ≤ bi ,$
 $a¯iT x + maximize u∈ℝn Pi x T u | u ≤ 1 ≤ bi .$
Using the definition of the dual norm of the Euclidean norm we can write down the equivalent for problem (16) as
 $minimize x∈ℝn cTx subject to a¯iT x + Pix ≤ bi , i=1 ,…, r .$ (17)
By adding auxiliary variables ${t}_{i}$, $i=1,\dots ,r$ that ${\overline{a}}_{i}^{\mathrm{T}}x+{t}_{i}={b}_{i}$, we have the final equivalent SOCP as
 $minimize x∈ℝn , t∈ℝr cT x subject to a¯iT x + ti = bi , i=1 ,…, r , ti,Pix ∈ K q n+1 , i=1 ,…, r .$ (18)
Note we can also get SOCP formulation if there is some uncertainty or variation in the parameters $c$ and ${b}_{i}$ following a similar procedure.

9.2Description of the Printed Output

The solver can print information to give an overview of the problem and of the progress of the computation. The output may be sent to two independent streams (files) which are set by optional parameters ${\mathbf{Print File}}$ and ${\mathbf{Monitoring File}}$. Optional parameters ${\mathbf{Print Level}}$, ${\mathbf{Monitoring Level}}$, ${\mathbf{Print Solution}}$ and ${\mathbf{Print Options}}$ determine the exposed level of detail. This allows, for example, a detailed log file to be generated while the condensed information is displayed on the screen.
By default (${\mathbf{Print File}}=6$, ${\mathbf{Print Level}}=2$), six sections are printed to the standard output:
• Optional parameters list (if ${\mathbf{Print Options}}=\mathrm{YES}$)
• Problem statistics
• Iteration log
• Summary
• Solution (if ${\mathbf{Print Solution}}=\mathrm{YES}$)
The header is a message indicating the start of the solver. It should look like:
```------------------------------------------------
E04PT, Interior point method for SOCP problems
------------------------------------------------```
Optional parameters list
The list shows all options of the solver, each displayed on one line. The output contains the option name, its current value and an indicator for how it was set. The options unchanged from the default setting are noted by ‘d’, options you set are noted by ‘U’, and options reset by the solver are noted by ‘S’. Note that the output format is compatible with the file format expected by e04zpc. The output might look as follows:
```Stats Time                    =                 Yes     * U
Socp Iteration Limit          =                 100     * d
Socp Presolve                 =                 Yes     * d```
Problem statistics
If ${\mathbf{Print Level}}\ge 2$, statistics on the original and the presolved problems are printed. More detailed statistics, as well as a list of the presolve operations, are also printed for ${\mathbf{Print Level}}$ $3$ or above, for example:
```Original Problem Statistics

Number of variables                        2111
Number of linear constraints               2110
Number of nonzeros                         3428
Number of cones                              20

Presolved Problem Statistics

Number of variables                        1268
Number of linear constraints               1199
Number of nonzeros                         1676
Number of cones                              20```
Iteration log
If ${\mathbf{Print Level}}\ge 2$, the solver prints the status of each iteration.
If ${\mathbf{Print Level}}=2$, the output shows the iteration number ($0$ represents the starting point), the current primal and dual objective value, convergence measures (primal infeasibility, dual infeasibility and duality gap defined in Section 11.5.1) and the value of the additional variable $\tau$ (see Section 11.1). The output might look as follows:
```------------------------------------------------------------------------
it|    pobj    |    dobj    |  p.inf  |  d.inf  |  d.gap  |   tau  | I
------------------------------------------------------------------------
0  2.34871E+00  0.00000E+00  8.89E-01  1.09E-01  1.80E-01  1.0E+00
1  5.95233E+00  7.97442E+00  1.49E-01  1.83E-02  3.00E-02  1.9E-01
2  1.71247E+01  1.59748E+01  1.10E-01  1.35E-02  2.22E-02  3.0E-01
3  2.55291E+01  2.53467E+01  1.61E-02  1.98E-03  3.25E-03  2.9E-01```
If ${\mathbf{Print Level}}=3$, the solver also prints for each iteration ${\rho }_{A}$ (defined in Section 11.5.1), the value of the variable $\kappa$ (see Section 11.1), the step size, the maximum error of the backsolves performed as well as the total number of iterative refinements performed. The output takes the following form:
```----------------------------------------------------------------------------------------------------------------------
it|    pobj    |    dobj    |  p.inf  |  d.inf  |  d.gap  |  rhoa  |   tau  |  kappa |   step  |  errbs  | nrefi | I
----------------------------------------------------------------------------------------------------------------------
0  2.34871E+00  0.00000E+00  8.89E-01  1.09E-01  1.80E-01  2.3E+00
1  5.95233E+00  7.97442E+00  1.49E-01  1.83E-02  3.00E-02  2.3E-01  1.9E-01  9.5E-01  8.44E-01  1.07E-14   9
2  1.71247E+01  1.59748E+01  1.10E-01  1.35E-02  2.22E-02  6.8E-02  3.0E-01  6.5E-02  4.30E-01  9.24E-15   9
3  2.55291E+01  2.53467E+01  1.61E-02  1.98E-03  3.25E-03  6.9E-03  2.9E-01  7.9E-03  8.67E-01  3.04E-14   7```
Occasionally, when numerical instabilities are too big, the solver will restart the iteration and switch to an augmented system formulation. In such cases the letters RS will be printed in the information column (I).
If ${\mathbf{Print Level}}>3$, each iteration produces more information that expands over several lines. This additional information contains:
• the method used (normal equation, augmented system);
• the number of factorizations performed at the current iteration;
• the type of factorization performed (Cholesky, Bunch–Parlett);
• the value of the perturbation added to the diagonal in the normal equation formulation or on the zero block in the augmented system formulation;
• the total time spent in the iteration if ${\mathbf{Stats Time}}$ is not set to $\mathrm{NO}$.
The output might look as follows:
```------------ Details of Iteration   1 ------------
method                           Augmented System
iterative refinements                           9
factorizations                                  1
matrix type                         Bunch-Parlett
diagonal perturbation                    7.00E-08
time iteration                           0.05 sec
--------------------------------------------------```
Summary
Once the solver finishes, a detailed summary is produced:
```-------------------------------------------------
Status: converged, an optimal solution found
-------------------------------------------------
Final primal objective value         2.688878E+01
Final dual objective value           2.688878E+01
Absolute primal infeasibility        2.264154E-07
Relative primal infeasibility        6.788104E-09
Absolute dual infeasibility          7.639479E-09
Relative dual infeasibility          1.371539E-09
Absolute complementarity gap         2.558237E-08
Relative complementarity gap         8.342957E-10
Iterations                                      8```
It starts with the status line of the overall result which matches the fail value and is followed by the final primal and dual objective values as well as the error measures and iteration count.
Optionally, if ${\mathbf{Stats Time}}=\mathrm{YES}$, the timings of the different parts of the algorithm are displayed. It might look as follows:
```Timing
Total time                             0.16 sec
Presolver                              0.00 sec   (  1.3%)
Core                                   0.15 sec   ( 98.7%)
Initialization                       0.00 sec   (  1.4%)
Factorization                        0.13 sec   ( 88.2%)
Compute directions                   0.02 sec   ( 10.4%)
Iterative refinement                   0.01 sec   (  9.7%)```
Solution
If ${\mathbf{Print Solution}}=\mathrm{X}$, the values of the primal variables and their bounds on the primary and secondary outputs. It might look as follows:
```Primal variables:
x_idx   Lower bound        Value      Upper bound
1   0.00000E+00    1.02411E-08         inf
2   0.00000E+00    1.43619E-08         inf
3   4.00000E+00    1.00000E+01    1.00000E+01
4   0.00000E+00    2.05523E+00    4.00000E+00
5  -1.00000E+01   -6.28719E+00    1.00000E+01
6  -8.00000E+00   -7.49982E+00    8.00000E+00
7   1.00000E+00    2.08866E+00    3.00000E+00
8   5.00000E-01    2.52602E+00    5.00000E+00```
If ${\mathbf{Print Solution}}=\mathrm{YES}$ or $\mathrm{ALL}$, the values of the dual variables are also printed. It should look as follows:
```Box bounds dual variables:
x_idx   Lower bound        Value      Upper bound        Value
1   0.00000E+00    1.03294E+01         inf       0.00000E+00
2   0.00000E+00    4.77419E+00         inf       0.00000E+00
3   4.00000E+00    0.00000E+00    1.00000E+01    4.00326E+00
4   0.00000E+00    0.00000E+00    4.00000E+00    1.88512E-08
5  -1.00000E+01    9.77434E-09    1.00000E+01    0.00000E+00
6  -8.00000E+00    1.18996E-07    8.00000E+00    0.00000E+00
7   1.00000E+00    0.00000E+00    3.00000E+00    2.13077E-08
8   5.00000E-01    2.00243E-09    5.00000E+00    0.00000E+00

Linear constraints dual variables:
idx   Lower bound        Value      Upper bound        Value
1   7.00000E+00    0.00000E+00    9.00000E+00    1.73118E+00
2  -1.00000E+01    0.00000E+00   -8.00000E+00    1.20039E+00
3  -1.50000E+01    0.00000E+00   -1.10000E+01    4.30107E-02

Cone constraints dual variables:
idgroup       x_idx       Value
1             6    2.02570E+00
5   -2.02453E-01
4   -2.50000E-01
7    1.99999E+00

2             8    7.11750E+00
2   -7.11749E+00```

10Example

As described in Section 9.1, second-order cone programming has many applications, however, a reformulation might be needed. This example demonstrates how to formulate and solve a quadratically constrained quadratic programming problem via SOCP. See also Section 10 in e04rbc for a simpler example where the cone constraints are explicitly defined, and Section 10 in e04sac where the input is read from a file.
 $minimize x∈ℝ3 12 xT P0 x + q0T x subject to 12 xT P1 x + q1T x + r1 ≤ 0 ,$
where
 $P0= 0.4930.3820.270 0.3820.4750.448 0.2700.4480.515 P1= 0.7370.4531.002 0.4530.3160.635 1.0020.6351.590 , q0= 0.847 0.08 0.505 q1= 0.065 0.428 0.097$
and ${r}_{1}=1.276$. We factorize ${P}_{0}={F}_{0}^{\mathrm{T}}{F}_{0}$ and ${P}_{1}={F}_{1}^{\mathrm{T}}{F}_{1}$ using an eigenvalue decomposition, then we have the following second-order cone programming problem
 $minimize x∈ℝ3 , t∈ℝ2 t0 + q0T x + r0 subject to t1 + q1T x + r1 = 0 , t0,1, F0 x ∈ Kr5 , t1,1, F1 x ∈ Kr5$
as in Section 9.1.1. By adding artificial variables $u={F}_{0}x$, $v={F}_{1}x$, ${y}_{0}=1$, and ${y}_{1}=1$ to the above formulation, we have the following standard SOCP problem
 $minimize x∈ℝ3 , t∈ℝ2 , u∈ℝ3 , v∈ℝ3 , y∈ℝ2 t0 + q0T x subject to t1 + q1T x + r1 = 0 , F0x=u, F1x=v, y0=1, y1=1, t0,y0,u ∈ Kr5 , t1,y1,v ∈ Kr5 .$

10.1Program Text

Program Text (e04ptce.c)

10.2Program Data

Program Data (e04ptce.d)

10.3Program Results

Program Results (e04ptce.r)

11Algorithmic Details

This section contains the description of the underlying algorithms used in e04ptc, which implements the standard primal-dual path-following interior point method with Nesterov–Todd scaling and self-dual embedding. For further details, see Nesterov and Todd (1998), Nesterov and Todd (1997) and Andersen et al. (2003).
For simplicity, we consider the following primal second-order cone programming formulation
 $minimize x∈ℝn cTx subject to Ax=b , x∈K¯ ,$ (19)
where $c$, $x\in {ℝ}^{n}$, $b\in {ℝ}^{m}$, $A\in {ℝ}^{m×n}$ with full row rank, and $\overline{\mathcal{K}}={\mathcal{K}}^{{n}_{1}}×\cdots ×{\mathcal{K}}^{{n}_{r}}×{ℝ}_{+}^{{n}_{l}}$. The dual formulation for problem (19) is given by
 $maximize y∈ℝm , z∈ℝn bTy subject to ATy+z=c , z∈K¯ ,$ (20)
where $y$ and $z$ denote the dual variables and $\overline{\mathcal{K}}$ is as defined above (it is a self-dual cone). Solutions of the primal (19) and dual (20) problem are connected by the strong duality theory (see, for example, Nocedal and Wright (2006)) and are characterized by the first-order optimality conditions, the so-called Karush–Kuhn–Tucker (KKT) conditions, which are stated as follows:
 $Ax=b , x∈K¯ (primal feasibility) ATy+z=c , z∈K¯ (dual feasibility) x∘z=0 (complementarity),$ (21)
where $\circ$ is the multiplication operator defined in a special case of a so-called Euclidean Jordan algebra $\left({ℝ}^{n},\circ \right)$ with the following definition
 $x∘y ≔ xTy x0y1 + y0x1 ⋮ x0yn + y0xn .$ (22)
If (19) and (20) have a strictly feasible solution (i.e., there is a feasible solution $\left(\stackrel{^}{x},\left(\stackrel{^}{y},\stackrel{^}{z}\right)\right)$ such that $\stackrel{^}{x}\in \mathrm{int}\overline{\mathcal{K}}$ and $\stackrel{^}{z}\in \mathrm{int}\overline{\mathcal{K}}$), then they both have optimal solutions and the duality gap is zero. Moreover, a feasible solution pair $\left({x}^{*},{y}^{*},{z}^{*}\right)$ is optimal if, and only if, the KKT conditions (21) hold at this point, see Alizadeh and Goldfarb (2003) for more details.
The underlying algorithm applies an iterative method to find an optimal solution $\left({x}^{*},{y}^{*},{z}^{*}\right)$ of the system (21) employing variants of Newton's method and modifying the search direction and step length so that the cone constraints are preserved at every iteration.

11.1Homogeneous Self-Dual Algorithm

The homogeneous and self-dual (HSD) model was first studied by Goldman and Tucker (1956) for linear programming and simplified by Xu et al. (1996). Then a generalization of HSD was employed to solve SOCP problems by Andersen et al. (2003) and Sturm (2002). As its name suggests, the HSD model and its dual are equivalent. Self-dual formulations embed the original problem (19) in a larger conic optimization problem such that the latter is primal and dual feasible, with known feasible points, and from which solution we can extract optimal solutions or certificates of infeasibility of the original problem.
We define the homogeneous and self-dual model for problem (19) as follows:
 $Ax-bτ =0, ATy + z-cτ = 0 , -cTx + bTy-κ = 0 , x;τ ∈ K~ , z;κ ∈ K~ .$ (23)
Here $\tau$ and $\kappa$ are two additional variables and we use the notation that
 $K~ ≔ K¯ × ℝ+ .$
The model (23) can be viewed as a self-dual optimization problem with a zero objective function. If $\left(\stackrel{^}{x},\stackrel{^}{\tau },\stackrel{^}{y},\stackrel{^}{z},\stackrel{^}{\kappa }\right)$ is any feasible solution to (23), then if $\stackrel{^}{\tau }>0$, a primal-dual optimal solution to (19) and (20) is given by
 $x*,y*,z* = x^,y^,z^ / τ^ ,$
and the duality gap is given by ${c}^{\mathrm{T}}{x}^{*}-{b}^{\mathrm{T}}{y}^{*}=\stackrel{^}{\kappa }/\stackrel{^}{\tau }=0$. The homogeneous algorithm is an application of the primal-dual method for the computation of a feasible solution to (23). In order to achieve this, we follow the guideline of path-following interior point method and define a central path that is a smooth curve connecting an initial interior point and a complementary solution. So the set of nonlinear equations
 $Ax-bτ = γ Ax0 - bτ0 , ATy + z-cτ = γ ATy0 + z0 - cτ0 , -cTx + bTy - κ = γ -cTx0 + bTy0 - κ0 , x∘z = γμ0e , τκ = γμ0 ,$ (24)
defines the central path of the homogeneous model parameterized by $\gamma \in \left[0,1\right]$, $\left({x}^{0},{z}^{0},{y}^{0},{\tau }^{0},{\kappa }^{0}\right)$ is an initial feasible point and $\mu$ has the expression $\mu ≔\frac{{x}^{\mathrm{T}}s+\tau \kappa }{r+1}$ where $r$ is the number of cones.

11.2The Nesterov–Todd Search Direction

The Newton search direction is only guaranteed to be well-defined in a narrow neighbourhood around the central path. The search direction corresponds to applying Newton's method to (24) in a scaled space and then scaling the resulting search direction back to the original space so that it is well-defined. A matrix $W$ is a scaling matrix if it satisfies the conditions $W\succ 0$ and $WQW=Q$ where $W\succ 0$ means $W$ is symmetric and positive definite and $Q$ is a symmetric block diagonal matrix composed by so called reflection matrices ${Q}_{i}$ with the following definition:
 $Qi≔ 1 0 ⋯ 0 0 -1 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ -1 for quadratic cone, Qi≔ 0 1 0 ⋯ 0 1 0 0 ⋯ 0 0 0 -1 ⋯ 0 ⋮ ⋮ ⋮ ⋱ ⋮ 0 0 0 ⋯ -1 for rotated quadratic cone.$
It is easy to see that if we scale $x$ to $Wx$, $z$ to ${W}^{-1}z$, $A$ to $A{W}^{-1}$, and $c$ to ${W}^{-1}c$, the resulting primal and dual pair is equivalent to (19) and (20), see Alizadeh and Goldfarb (2003) for more details.
An important issue is the choice of the scaling matrix $W$. According to Andersen et al. (2003), the best results are obtained for the Nesterov–Todd (NT) scaling suggested by Nesterov and Todd (1997). In the NT scaling, $W$ is chosen such that
 $Wx= x¯= z¯= W-1z .$
Then the resulting Newton system to be solved to get direction $\left(\Delta x,\Delta \tau ,\Delta y,\Delta z,\Delta \kappa \right)$ is
 $AΔx-bΔτ = γ-1 Ax0 - bτ0 , ATΔy + Δz-cΔτ = γ-1 AT y0 + z0 - cτ0 , -cTΔx + bTΔy - Δκ = γ-1 -cTx0 + bTy0 - κ0 , Wx0 ∘ W-1Δz + W-1z0 ∘ WΔx = -Wx0 ∘ W-1z0 + γμ0e , τ0Δκ + κ0Δτ = -τ0κ0 + γμ0 .$ (25)

11.3Mehrotra's Predictor-Corrector Method

When Newton's method is applied to the perturbed complementarity conditions in (24), the quadratic terms are neglected. Instead of neglecting the quadratic term Mehrotra (1992) suggested using a second-order correction of the search direction which increases the efficiency of the algorithm significantly in practice (Lustig et al. (1992)).
To implement this idea, we first solve (24) for $\gamma =0$ to get an affine scaling direction and a maximum step size ${\alpha }_{n}^{\text{max}}$ to the boundary. Then use these directions to estimate the quadratic terms
 $WΔx ∘ W-1Δz and ΔτΔκ$
from (24) and use ${\alpha }_{n}^{\text{max}}$ to choose
 $γ = minδ, 1 - αnmax 2 1 - αnmax ,$
where $\delta \in \left(0,1\right)$ is a constant. Therefore we can choose $\gamma$ dynamically depending on how much progress can be made in the pure Newton (affine scaling) direction.

11.4Solving the KKT System

The solution of the Newton system of equations (25) is the most computationally costly operation. To reduce the system, we need the following definition. Associated with each vector $x=\left({x}_{0};\overline{x}\right)\in {ℝ}^{n}$ there is an arrow-shaped matrix $\mathit{Arw}\left(x\right)$ defined as:
 $Arwx ≔ x0 x¯T x¯ x0I ,$
where $I$ is the identity matrix of dimension $n-1$. Together with the definition in (22), it is not hard to see that
 $x∘z = Arwxz .$
In practice, system (25) is reduced to the augmented system by eliminating $\Delta z$ and $\Delta \kappa$ from the system as follows:
 $-W2 AT A 0 g1 g2 = r2 - W ArwWx0 -1 r4 r1$ (26)
and
 $-W2 AT A 0 h1 h2 = c b '$ (27)
where ${r}_{1},\dots ,{r}_{4}$ (${r}_{5}$ eliminated) are the corresponding right-hand side in (25) and we have that
 $Δτ = r3 - cT g1 + bT g2 τ0 -1 κ0 + cT h1 - bT h2$
and
 $Δx Δy = g1 g2 + h1 h2 Δτ .$
Linear systems (26) and (27) are systems of $m+n$ variables, symmetric and indefinite. Submatrix $W$ is block diagonal and positive definite. Note that systems (26) and (27) have the same coefficient matrix so we only need to perform factorization once per iteration.
The system (27) can be further reduced by eliminating ${g}_{1}$ and ${h}_{1}$, to a positive definite system usually called normal equations defined as
 $AW-2AT h2 = b+AW-2c ,$ (28)
also system (26) can be reduced similarly.
Typically, formulation (28) is preferred for many problems as the system matrix can be factorized by a sparse Cholesky. However, this brings some well-known disadvantages: ill-conditioning of the system is often observed during the final stages of the algorithm. If matrix $A$ contains dense columns (columns with relatively many nonzeros), then $A{W}^{-2}{A}^{\mathrm{T}}$ has many nonzeros, which in turn makes the factorization expensive. On the other hand, solving the augmented system by Bunch–Parlett type factorization is usually slower, but it normally avoids the fill-in caused by dense columns.
e04ptc can detect and handle dense columns in the KKT system effectively. Since matrix ${W}^{-2}$ in (28) is block diagonal, so dense columns also come as a linear combination of some columns in $A$. Depending on the number and the density of the ‘dense’ columns, the solver may either choose to directly use an augmented system formulation or to treat these columns separately in a product-form Cholesky factorization as described by Goldfarb and Scheinberg (2005). It is also possible to manually override the automatic choice via the optional parameter ${\mathbf{SOCP System Formulation}}$ and let the solver use a normal equations or an augmented system formulation.
Badly scaled optimal solutions may present numerical challenges, therefore iterative refinement is employed for reducing the roundoff errors produced during the solution of the system. When the condition number of the system $A{W}^{-2}{A}^{\mathrm{T}}$ prevents the satisfactory use of iterative refinement, e04ptc switches automatically to an augmented system formulation, reporting RS (Restart) in the last column of the iteration log (I). Furthermore, e04ptc provides several scaling techniques to adjust the numerical characteristics of the problem data, see optional parameter ${\mathbf{SOCP Scaling}}$.
Finally, factorization of the system matrix can degrade sparsity, so the resulting fill-in can be large, therefore several ordering techniques are included to minimize it. e04ptc uses Harwell packages MA97 (see Hogg and Scott (2011) and HSL (2011)) for the underlying sparse linear algebra factorization and MC68 approximate minimum degree algorithm, and METIS (Karypis and Kumar (1998)) nested dissection algorithm for the ordering.

11.5Stopping Criteria

11.5.1Convergence-optimal termination

To measure the infeasibility, the following measures
 $ρP ≔ Ax-bτ ∞ max1, A,b ∞ , relative primal feasibility, ρD ≔ ATy + z - cτ ∞ max1, AT,I,-c ∞ , relative dual feasibility, ρG ≔ -cTx + bTy - κ max1, -cT , bT , 1 ∞ , relative duality gap$
are defined to measure the relative reduction in the primal, dual and gap infeasibility, respectively. In addition, an extra measure is considered to quantify the accuracy in the objective function, which is given by
 $ρA ≔ cTx - bTy τ + bTy .$
The iteration is considered nearly feasible and optimal, and the interior point algorithm is stopped when the following conditions
 $maxρP,ρD ≤ ε1 and ρA ≤ ε2$
are satisfied. Here ${\epsilon }_{1}$ and ${\epsilon }_{2}$ may be set using ${\mathbf{SOCP Stop Tolerance}}$ and ${\mathbf{SOCP Stop Tolerance 2}}$, respectively.
Premature termination is triggered and the returned solution is considered as an optimal solution if the current iteration exhibits fast convergence and the optimality measures lie within a small range of desired precision. In particular, the self-dual algorithm is stopped if the above termination conditions are met within a small factor and $\tau >1000\kappa$. This measure is tracked after the first $10$ iterations.
In addition, the solver stops prematurely and reports suboptimal solution when it predicts that the current estimate of the solution will not be improved in subsequent iterations. In most cases the returned solution should be acceptable.

11.5.2Infeasibility/Unboundedness Detection

The problem is concluded to be primal or dual infeasible if one of the following conditions hold:
1. 1.$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({\rho }_{P},{\rho }_{D},{\rho }_{G}\right)\le {\epsilon }_{1}\text{ and }\tau \le {\epsilon }_{2}\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,\kappa \right)$.
2. 2.$\mu \le {\epsilon }_{2}{\mu }_{0}\text{ and }\tau \le {\epsilon }_{2}\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,\kappa \right)$.
Then the problem is declared dual infeasible if ${c}^{\mathrm{T}}x<0$ or primal infeasible otherwise.

11.6Further Details

e04ptc includes an advance preprocessing phase (called presolve) to reduce the dimensions of the problem before passing it to the solver. The reduction in problem size generally improves the behaviour of the solver, shortening the total computation time. In addition, infeasibility may also be detected during preprocessing. The default behaviour of the presolve can be modified by optional parameter ${\mathbf{SOCP Presolve}}$.

12Optional Parameters

Several optional parameters in e04ptc define choices in the problem specification or the algorithm logic. In order to reduce the number of formal arguments of e04ptc these optional parameters have associated default values that are appropriate for most problems. Therefore, you need only specify those optional parameters whose values are to be different from their default values.
The remainder of this section can be skipped if you wish to use the default values for all optional parameters.
The optional parameters can be changed by calling e04zmc anytime between the initialization of the handle and the call to the solver. Modification of the optional parameters during intermediate monitoring stops is not allowed. Once the solver finishes, the optional parameters can be altered again for the next solve.
The option values can be retrieved by calling e04znc.
The following is a list of the optional parameters available. A full description of each optional parameter is provided in Section 12.1.

12.1Description of the Optional Parameters

For each option, we give a summary line, a description of the optional parameter and details of constraints.
The summary line contains:
• the keywords;
• a parameter value, where the letters $a$, $i$ and $r$ denote options that take character, integer and real values respectively;
• the default value, where the symbol $\epsilon$ is a generic notation for machine precision (see X02AJC).
All options accept the value $\mathrm{DEFAULT}$ to return single options to their default states.
Keywords and character values are case and white space insensitive.
 Defaults
This special keyword may be used to reset all optional parameters to their default values. Any argument value given with this keyword will be ignored.
 Infinite Bound Size $r$ Default $\text{}={10}^{20}$
This defines the ‘infinite’ bound $\mathit{bigbnd}$ in the definition of the problem constraints. Any upper bound greater than or equal to $\mathit{bigbnd}$ will be regarded as $+\infty$ (and similarly any lower bound less than or equal to $-\mathit{bigbnd}$ will be regarded as $-\infty$). Note that a modification of this optional parameter does not influence constraints which have already been defined; only the constraints formulated after the change will be affected.
Constraint: ${\mathbf{Infinite Bound Size}}\ge 1000$.
 Monitoring File $i$ Default $=-1$
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
If $i\ge 0$, the Nag_FileID number (as returned from x04acc) for the secondary (monitoring) output. If set to $-1$, no secondary output is provided. The following information is output to the unit:
• a listing of the optional parameters;
• problem statistics, the iteration log, and the final status as set by ${\mathbf{Monitoring Level}}$;
• the solution if set by ${\mathbf{Print Solution}}$.
Constraint: ${\mathbf{Monitoring File}}\ge -1$.
 Monitoring Level $i$ Default $=4$
This parameter sets the amount of information detail that will be printed by the solver to the secondary output. The meaning of the levels is the same as with ${\mathbf{Print Level}}$.
Constraint: $0\le {\mathbf{Monitoring Level}}\le 5$.
 Print File $i$ Default $=\mathrm{Nag_FileID number associated with stdout}$
(See Section 3.1.1 in the Introduction to the NAG Library CL Interface for further information on NAG data types.)
If $i\ge 0$, the Nag_FileID number (as returned from x04acc, stdout as the default) for the primary output of the solver. If ${\mathbf{Print File}}=-1$, the primary output is completely turned off independently of other settings. The following information is output to the unit:
• a listing of optional parameters if set by ${\mathbf{Print Options}}$;
• problem statistics, the iteration log, and the final status from the solver as set by ${\mathbf{Print Level}}$;
• the solution if set by ${\mathbf{Print Solution}}$.
Constraint: ${\mathbf{Print File}}\ge -1$.
 Print Level $i$ Default $=2$
This parameter defines how detailed information should be printed by the solver to the primary output.
 $\mathbit{i}$ Output $0$ No output from the solver $1$ Only the final status and the primal and dual objective value $2$ Problem statistics, one line per iteration showing the progress of the solution with respect to the convergence measures, final status and statistics $3$ As level $2$ but each iteration line is longer, including step lengths and errors $4,5$ As level $3$ but further details of each iteration are presented
Constraint: $0\le {\mathbf{Print Level}}\le 5$.
 Print Options $a$ Default $=\mathrm{YES}$
If ${\mathbf{Print Options}}=\mathrm{YES}$, a listing of optional parameters will be printed to the primary output.
Constraint: ${\mathbf{Print Options}}=\mathrm{YES}$ or $\mathrm{NO}$.
 Print Solution $a$ Default $=\mathrm{NO}$
If ${\mathbf{Print Solution}}=\mathrm{X}$, the final values of the primal variables are printed on the primary and secondary outputs.
If ${\mathbf{Print Solution}}=\mathrm{YES}$ or $\mathrm{ALL}$, in addition to the primal variables, the final values of the dual variables are printed on the primary and secondary outputs.
Constraint: ${\mathbf{Print Solution}}=\mathrm{YES}$, $\mathrm{NO}$, $\mathrm{X}$ or $\mathrm{ALL}$.
 SOCP Iteration Limit $i$ Default $\text{}=100$
The maximum number of iterations to be performed by e04ptc. Setting the option too low might lead to ${\mathbf{fail}}\mathbf{.}\mathbf{code}=$ NE_TOO_MANY_ITER.
Constraint: ${\mathbf{SOCP Iteration Limit}}\ge 1$.
 SOCP Monitor Frequency $i$ Default $\text{}=0$
This parameter defines the frequency of how often function monit is called. If $i>0$, the solver calls monit at the end of every $i$th iteration. If it is set to $0$, the function is not called at all.
Constraint: ${\mathbf{SOCP Monitor Frequency}}\ge 0$.
 SOCP Presolve $a$ Default $=\mathrm{FULL}$
This parameter allows you to reduce the level of presolving of the problem or turn it off completely. If the presolver is turned off, the solver will try to handle the problem as given by you. In such a case, the presence of fixed variables or linear dependencies in the constraint matrix can cause numerical instabilities to occur. In normal circumstances, it is recommended to use the full presolve which is the default.
Constraint: ${\mathbf{SOCP Presolve}}=\mathrm{FULL}$, $\mathrm{BASIC}$ or $\mathrm{NO}$.
 SOCP Scaling $a$ Default $=\mathrm{NONE}$
This parameter controls the type of scaling to be applied on the constraint matrix $A$ before solving the problem. More precisely, the scaling procedure will try to find diagonal matrices ${D}_{1}$ and ${D}_{2}$ such that the values in ${D}_{1}A{D}_{2}$ are of a similar order of magnitude. The solver is less likely to run into numerical difficulties when the constraint matrix is well scaled.
Constraint: ${\mathbf{SOCP Scaling}}=\mathrm{ARITHMETIC}$, $\mathrm{GEOMETRIC}$ or $\mathrm{NONE}$.
 SOCP Stop Tolerance $r$ Default $=\sqrt{\epsilon }$
This parameter sets the value ${\epsilon }_{1}$ which is the tolerance for the convergence measures in the stopping criteria, see Section 11.5.
Constraint: ${\mathbf{SOCP Stop Tolerance}}>\epsilon$.
 SOCP Stop Tolerance 2 $r$ Default $=\sqrt{\epsilon }$
This parameter sets the additional tolerance ${\epsilon }_{2}$ used in the stopping criteria, see Section 11.5.
Constraint: ${\mathbf{SOCP Stop Tolerance 2}}>\epsilon$.
 SOCP System Formulation $a$ Default $=\mathrm{AUTO}$
As described in Section 11.4, e04ptc can internally work either with the normal equations formulation (28) or with the augmented system (26) and (27). A brief discussion of advantages and disadvantages is presented in (27). Setting the option value to $\mathrm{AUTO}$ leaves the decision to the solver based on the structure of the constraints and it is the recommended value. This will typically lead to the normal equations formulation unless there are many dense columns or the system is significantly cheaper to factorize as the augmented system. Note that in some cases even if ${\mathbf{SOCP System Formulation}}=\mathrm{NORMAL EQUATIONS}$ the solver might switch the formulation through the computation to the augmented system due to numerical instabilities or computational cost.
Constraint: ${\mathbf{SOCP System Formulation}}=\mathrm{AUTO}$, $\mathrm{AUGMENTED SYSTEM}$, $\mathrm{AS}$, $\mathrm{NORMAL EQUATIONS}$ or $\mathrm{NE}$.
 Stats Time $a$ Default $=\mathrm{NO}$
This parameter allows you to turn on timings of various parts of the algorithm to give a better overview of where most of the time is spent. This might be helpful for a choice of different solving approaches. It is possible to choose between CPU and wall clock time. Choice $\mathrm{YES}$ is equivalent to $\mathrm{WALL CLOCK}$.
Constraint: ${\mathbf{Stats Time}}=\mathrm{YES}$, $\mathrm{NO}$, $\mathrm{CPU}$ or $\mathrm{WALL CLOCK}$.
 Task $a$ Default $=\mathrm{MINIMIZE}$
This parameter specifies the required direction of the optimization. If ${\mathbf{Task}}=\mathrm{FEASIBLE POINT}$, the objective function (if set) is ignored and the algorithm stops as soon as a feasible point is found with respect to the given tolerance. If no objective function is set, ${\mathbf{Task}}$ reverts to $\mathrm{FEASIBLE POINT}$ automatically.
Constraint: ${\mathbf{Task}}=\mathrm{MINIMIZE}$, $\mathrm{MAXIMIZE}$ or $\mathrm{FEASIBLE POINT}$.
 Time Limit $r$ Default $\text{}={10}^{6}$
A limit to the number of seconds that the solver can use to solve one problem. If during the convergence check this limit is exceeded, the solver will terminate with ${\mathbf{fail}}\mathbf{.}\mathbf{code}=$ NE_TIME_LIMIT.
Constraint: ${\mathbf{Time Limit}}>0$.