second-order cone programming#Solvers and scripting (programming) languages

{{Short description|Convex optimization problem}}

{{Technical|date=October 2011}}

A second-order cone program (SOCP) is a convex optimization problem of the form

:minimize \ f^T x \

:subject to

::\lVert A_i x + b_i \rVert_2 \leq c_i^T x + d_i,\quad i = 1,\dots,m

::Fx = g \

where the problem parameters are f \in \mathbb{R}^n, \ A_i \in \mathbb{R}^{{n_i}\times n}, \ b_i \in \mathbb{R}^{n_i}, \ c_i \in \mathbb{R}^n, \ d_i \in \mathbb{R}, \ F \in \mathbb{R}^{p\times n}, and g \in \mathbb{R}^p. x\in\mathbb{R}^n is the optimization variable.

\lVert x \rVert_2 is the Euclidean norm and ^T indicates transpose.{{cite book |last1=Boyd |first1=Stephen |last2=Vandenberghe |first2=Lieven |title=Convex Optimization |publisher=Cambridge University Press |year=2004 |isbn=978-0-521-83378-3 |url=https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf |accessdate=July 15, 2019}} The "second-order cone" in SOCP arises from the constraints, which are equivalent to requiring the affine function (A x + b, c^T x + d) to lie in the second-order cone in \mathbb{R}^{n_i + 1}.

SOCPs can be solved by interior point methods{{cite journal|last1=Potra|first1=lorian A.|last2=Wright|first2=Stephen J.|date=1 December 2000|title=Interior-point methods|journal=Journal of Computational and Applied Mathematics|volume=124|issue=1–2|pages=281–302|doi=10.1016/S0377-0427(00)00433-7|bibcode=2000JCoAM.124..281P|doi-access=}} and in general, can be solved more efficiently than semidefinite programming (SDP) problems. Some engineering applications of SOCP include filter design, antenna array weight design, truss design, and grasping force optimization in robotics.{{Cite journal|last1=Lobo|first1=Miguel Sousa|last2=Vandenberghe|first2=Lieven|last3=Boyd|first3=Stephen|last4=Lebret|first4=Hervé|date=1998|title=Applications of second-order cone programming|journal=Linear Algebra and Its Applications|language=en|volume=284|issue=1–3|pages=193–228|doi=10.1016/S0024-3795(98)10032-0|doi-access=free}} Applications in quantitative finance include portfolio optimization; some market impact constraints, because they are not linear, cannot be solved by quadratic programming but can be formulated as SOCP problems.{{cite web |title=Solving SOCP |url=https://docs.mosek.com/slides/2017/shanghai/talk.pdf}}{{cite web |title=portfolio optimization |url=https://nmfin.tech/wp-content/uploads/2020/06/new-technologies-in-portfolio-optimization.20200612.pdf}}{{cite book |last1=Li |first1=Haksun |title=Numerical Methods Using Java: For Data Science, Analysis, and Engineering |date=16 January 2022 |publisher=APress |pages=Chapter 10 |isbn=978-1484267967 }}

Second-order cone

The standard or unit second-order cone of dimension n+1 is defined as

\mathcal{C}_{n+1}=\left\{ \begin{bmatrix} x \\ t \end{bmatrix} \Bigg| x \in \mathbb{R}^n,

t\in \mathbb{R}, \|x\|_2\leq t \right\}.

The second-order cone is also known by quadratic cone or ice-cream cone or Lorentz cone. The standard second-order cone in \mathbb{R}^3 is \left\{(x,y,z) \Big| \sqrt{x^2 + y^2} \leq z \right\}.

The set of points satisfying a second-order cone constraint is the inverse image of the unit second-order cone under an affine mapping:

\lVert A_i x + b_i \rVert_2 \leq c_i^T x + d_i \Leftrightarrow

\begin{bmatrix} A_i \\ c_i^T \end{bmatrix} x + \begin{bmatrix} b_i \\ d_i \end{bmatrix} \in

\mathcal{C}_{n_i+1}

and hence is convex.

The second-order cone can be embedded in the cone of the positive semidefinite matrices since

||x||\leq t \Leftrightarrow \begin{bmatrix} tI & x \\ x^T & t \end{bmatrix} \succcurlyeq 0,

i.e., a second-order cone constraint is equivalent to a linear matrix inequality (Here M\succcurlyeq 0 means M is semidefinite matrix). Similarly, we also have,

\lVert A_i x + b_i \rVert_2 \leq c_i^T x + d_i \Leftrightarrow

\begin{bmatrix} (c_i^T x+d_i)I & A_i x+b_i \\ (A_i x + b_i)^T & c_i^T x + d_i \end{bmatrix} \succcurlyeq 0.

Relation with other optimization problems

File:Hierarchy compact convex.png

When A_i = 0 for i = 1,\dots,m, the SOCP reduces to a linear program. When c_i = 0 for i = 1,\dots,m, the SOCP is equivalent to a convex quadratically constrained linear program.

Convex quadratically constrained quadratic programs can also be formulated as SOCPs by reformulating the objective function as a constraint. Semidefinite programming subsumes SOCPs as the SOCP constraints can be written as linear matrix inequalities (LMI) and can be reformulated as an instance of semidefinite program. The converse, however, is not valid: there are positive semidefinite cones that do not admit any second-order cone representation.{{Cite journal|last=Fawzi|first=Hamza|date=2019|title=On representing the positive semidefinite cone using the second-order cone|journal=Mathematical Programming|language=en|volume=175|issue=1–2|pages=109–118|doi=10.1007/s10107-018-1233-0|issn=0025-5610|arxiv=1610.04901|s2cid=119324071}}

Any closed convex semialgebraic set in the plane can be written as a feasible region of a SOCP,.{{cite arXiv|last=Scheiderer|first=Claus|date=2020-04-08|title=Second-order cone representation for convex subsets of the plane|class=math.OC|eprint=2004.04196}} However, it is known that there exist convex semialgebraic sets of higher dimension that are not representable by SDPs; that is, there exist convex semialgebraic sets that can not be written as the feasible region of a SDP (nor, a fortiori, as the feasible region of a SOCP).{{Cite journal|last=Scheiderer|first=Claus|date=2018|title=Spectrahedral Shadows|journal=SIAM Journal on Applied Algebra and Geometry|language=en|volume=2|issue=1|pages=26–44|doi=10.1137/17M1118981|issn=2470-6566|doi-access=free}}

Examples

= Quadratic constraint =

Consider a convex quadratic constraint of the form

: x^T A x + b^T x + c \leq 0.

This is equivalent to the SOCP constraint

: \lVert A^{1/2} x + \frac{1}{2}A^{-1/2}b \rVert \leq \left(\frac{1}{4}b^T A^{-1} b - c \right)^{\frac{1}{2}}

=Stochastic linear programming=

Consider a stochastic linear program in inequality form

:minimize \ c^T x \

:subject to

::\mathbb{P}(a_i^Tx \leq b_i) \geq p, \quad i = 1,\dots,m

where the parameters a_i \ are independent Gaussian random vectors with mean \bar{a}_i and covariance \Sigma_i \ and p\geq0.5. This problem can be expressed as the SOCP

:minimize \ c^T x \

:subject to

:: \bar{a}_i^T x + \Phi^{-1}(p) \lVert \Sigma_i^{1/2} x \rVert_2 \leq b_i , \quad i = 1,\dots,m

where \Phi^{-1}(\cdot) \ is the inverse normal cumulative distribution function.

=Stochastic second-order cone programming=

We refer to second-order cone programs

as deterministic second-order cone programs since data defining them are deterministic.

Stochastic second-order cone programs are a class of optimization problems that are defined to handle uncertainty in data defining deterministic second-order cone programs.{{Cite journal |last=Alzalg |first=Baha M. |date=2012-10-01 |title=Stochastic second-order cone programming: Applications models |url=https://www.sciencedirect.com/science/article/pii/S0307904X11008547 |journal=Applied Mathematical Modelling |language=en |volume=36 |issue=10 |pages=5122–5134 |doi=10.1016/j.apm.2011.12.053 |issn=0307-904X|url-access=subscription }}

= Other examples =

Other modeling examples are available at the MOSEK modeling cookbook.{{Cite web |title=MOSEK Modeling Cookbook - Conic Quadratic Optimization |url=https://docs.mosek.com/modeling-cookbook/cqo.html}}

Solvers and scripting (programming) languages

class="wikitable sortable"
Name

!License

!Brief info

ALGLIBfree/commercialA dual-licensed C++/C#/Java/Python numerical analysis library with parallel SOCP solver.
AMPLcommercialAn algebraic modeling language with SOCP support
Artelys Knitrocommercial
CPLEXcommercial
FICO Xpresscommercial
Gurobi Optimizercommercial
MATLABcommercialThe coneprog function solves SOCP problems{{cite web | title=Second-order cone programming solver - MATLAB coneprog | website=MathWorks | date=2021-03-01 | url=https://www.mathworks.com/help/optim/ug/coneprog.html | access-date=2021-07-15}} using an interior-point algorithm{{cite web | title=Second-Order Cone Programming Algorithm - MATLAB & Simulink | website=MathWorks | date=2021-03-01 | url=https://www.mathworks.com/help/optim/ug/cone-programming-algorithm.html | access-date=2021-07-15}}
MOSEKcommercialparallel interior-point algorithm
NAG Numerical LibrarycommercialGeneral purpose numerical library with SOCP solver

See also

  • Power cones are generalizations of quadratic cones to powers other than 2.{{Cite web |title=MOSEK Modeling Cookbook - the Power Cones |url=https://docs.mosek.com/modeling-cookbook/powo.html}}

References