socp#
- swordfish.function.socp()#
Solve SOCP problems and calculate the minimum of the objective function under specified constraints. The standard form of the SOCP constraint is as follows:
\[\begin{split}\begin{align*} \text{minimize}\quad & f^T x\\ \text{subject to}\quad & \|A_i x + b_i\|_2 \le c_i^T x + d_i,\quad i=1,\dots,m,\\ & A x = b \end{align*}\end{split}\]G is as follows:
\[\begin{align*} \big[ -c_0 \;|\; -A_0^{T} \;|\; \dots \;|\; -c_i \;|\; -A_i^{T} \;|\; \dots \big]^{T} \end{align*}\]h is as follows:
\[\begin{align*} [d_0 \mid b_0 \mid \dots \mid d_i \mid b_i \mid \dots]^{T} \end{align*}\]- Parameters:
f (Constant) – A numeric vector indicating the coefficient vector of the objective function.
G (Constant, optional) – A numeric matrix indicating the coefficient matrix of the cone constraint, by default DFLT.
h (Constant, optional) – A numeric vector indicating the right-hand-side vector of the cone constraint, by default DFLT.
l (Constant, optional) – An integral scalar indicating the dimension of the non-negative quadrant constraint, by default DFLT.
q (Constant, optional) – A positive vector indicating the dimension size of each second-order cone constraint. The form is [r0,r1,…,rN-1], by default DFLT.
A (Constant, optional) – A numeric matrix indicating the coefficient matrix of the equality constraint, by default DFLT.
b (Constant, optional) – A numeric vector indicating the right-hand-side vector of the equality constraint, by default DFLT.
- Returns:
A 3-element tuple:
The first element is a string indicating the state of the solution:
Problem solved to optimality: optimal solution found;
Found certificate of primal infeasibility: no feasible solution to the primal;
Found certificate of dual infeasibility: no feasible solution to the dual;
Offset exitflag at inaccurate results: inaccurate results;
Maximum number of iterations reached: reach the maximum number of iterations;
Search direction unreliable: unreliable search direction;
Unknown problem in solver: the solver cannot identify the problem.
The second element is the value of x where the value of the objective function is minimized.
The third element is the minimum value of the objective function.
- Return type: