finds values of variables vars that minimize the quadratic objective f subject to second-order cone and/or linear constraints cons.


finds a vector that minimizes subject to the constraints TemplateBox[{{{{a, _, i}, ., x}, +, {b, _, i}}}, Norm]<=alpha_i.x+beta_i.


specifies what solution property "prop" should be returned.

Details and Options

  • Second-order cone optimization is also known as second-order cone programming (SOCP).
  • Second-order cone optimization is used in problems such as parameter fitting and geometric distance problems.
  • Second-order cone optimization is a convex optimization problem that can be solved globally and efficiently.
  • Second-order cone optimization finds that solves the primal problem:
  • minimize
    subject to constraintsTemplateBox[{{{{a, _, i}, ., x}, +, {b, _, i}}}, Norm]<=alpha_i.x+beta_i, i=1... k
  • Note that linear constraints may be expressed using second-order constraints. For convenience, a single 0 is interpreted as needed as a matrix or vector with zero entries:
  • {ai,bi,0,0}linear equality constraints
    {0,0,αi,βi}linear inequality constraint
  • The constraints cons can be specified by:
  • LessEqualscalar inequality
    GreaterEqualscalar inequality
    VectorLessEqualvector inequality
    VectorGreaterEqualvector inequality
    Equalscalar or vector equality
    Elementconvex domain or region element
  • With SecondOrderConeOptimization[f,cons,vars], parameter equations of the form parval, where par is not in vars and val is numerical or an array with numerical values, may be included in the constraints to define parameters used in f or cons.
  • The primal minimization problem has a related maximization problem that is the Lagrangian dual problem. The dual maximum value is always less than or equal to the primal minimum value, so it provides a lower bound. The dual maximizer provides information about the primal problem, including sensitivity of the minimum value to changes in the constraints.
  • The second-order cone optimization has a dual:
  • maximize
    subject to constraintssum_(i=1)^k(a_i.y_i+alpha_ilambda_i)⩵c, ; TemplateBox[{{y, _, i}}, Norm]<=lambda_i, i=1,..., k
  • For second-order cone optimization, strong duality always holds, meaning that if there is a solution to the primal minimization problem, then there is a solution to the dual maximization problem, and the dual maximum value is equal to the primal minimum value.
  • The possible solution properties "prop" include:
  • "PrimalMinimizer"a list of variable values that minimizes the objective function
    "PrimalMinimizerRules"values for the variables vars={v1,} that minimize
    "PrimalMinimizerVector"the vector that minimizes
    "PrimalMinimumValue"the minimum value
    "DualMaximizer"the maximizing dual vector
    "DualMaximumValue"the dual maximizing value
    "DualityGap"the difference between the dual and primal optimal values
    "Slack"vector that converts inequality constraints to equality
    sensitivity of to constraint perturbations
    "ObjectiveVector"the linear objective vector
    "SecondOrderConeConstraints"the list of coefficients for the constraints
    "LinearEqualityConstraints"the linear equality constraint matrix and vector
    {"prop1","prop2",} several solution properties
  • The following options may be given:
  • MaxIterationsAutomaticmaximum number of iterations to use
    MethodAutomaticthe method to use
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    ToleranceAutomaticthe tolerance to use for internal comparisons
  • The option Method->method may be used to specify the method to use. Available methods include:
  • Automaticchoose the method automatically
    "SCS"SCS (splitting conic solver) library
    "CSDP"CSDP (COIN semidefinite programming) library
    "DSDP"DSDP (semidefinite programming) library
  • Computations are limited to MachinePrecision.


open all close all

Basic Examples  (3)

Minimize subject to the constraint TemplateBox[{{{, {x, ,, y}, }}}, Norm]<=1:

Click for copyable input

The optimal point lies in a region defined by the constraints and where is smallest within the region:

Click for copyable input

Minimize subject to the constraints :

Click for copyable input

The optimal point lies on the smallest value of in a region bounded by the intersection of two disks:

Click for copyable input

Minimize subject to the constraints . Specify the inputs in matrix-vector form:

Click for copyable input

Solve the problem using matrix-vector form:

Click for copyable input

Scope  (19)

Options  (7)

Applications  (27)

Properties & Relations  (8)

Possible Issues  (3)

Introduced in 2019