Class SOCPDualProblem1
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.convex.sdp.socp.problem.SOCPDualProblem1
-
- All Implemented Interfaces:
ConstrainedOptimProblem,OptimProblem
- Direct Known Subclasses:
SOCPGeneralProblem1
public class SOCPDualProblem1 extends Object implements ConstrainedOptimProblem
This is the Dual Second Order Conic Programming problem. \[ \max_y \mathbf{b'y} \textrm{ s.t.,} \\ \mathbf{{A^q}_i'y + s_i = c^q_i}, s_i \in K_i, i = 1, 2, ..., q \\ \mathbf{{A^{\ell}}^T y + z^{\ell} = c^{\ell}} \\ \mathbf{{A^{u}}^T y = c^{u}} \\ \]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSOCPDualProblem1.EqualityConstraints
-
Constructor Summary
Constructors Constructor Description SOCPDualProblem1(Vector b, Matrix[] A_q, Vector[] c_q)Constructs a dual SOCP problem.SOCPDualProblem1(Vector b, Matrix[] A_q, Vector[] c_q, Matrix A_l, Vector c_l, Matrix A_u, Vector c_u)Constructs a dual SOCP problem.SOCPDualProblem1(SOCPDualProblem1 that)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatrixA_full()Combine all A data as a matrix.MatrixA_l()MatrixA_l_full()Combine all linear blocks as a matrix.MatrixA_q(int i)Gets \({A^q}_i\).MatrixA_q_full()A^q = [{A^q}_1, {A^q}_2, ...MatrixA_u()Vectorb()Gets b.Vectorc_full()Vectorc_l()Vectorc_l_full()Vectorc_q(int i)Gets \(c^q_i\).Vectorc_q_full()Vectorc_u()intdimension()Get the number of variables.RealScalarFunctionf()Get the objective function.booleanflag_s()booleanflag_u()SOCPDualProblem1.EqualityConstraintsgetEqualityConstraints()Gets the equality constraints, hi(x) = 0LessThanConstraintsgetLessThanConstraints()Gets the less-than-or-equal-to constraints, gi(x) ≤ 0intm()Gets the dimension of the system, i.e., m = the dimension of y.intn(int i)Gets the number of columns of \({A^q}_i\).intn_l()intn_q()Gets the total number of \({A^q}_i\) matrices.intn_u()
-
-
-
Constructor Detail
-
SOCPDualProblem1
public SOCPDualProblem1(Vector b, Matrix[] A_q, Vector[] c_q)
Constructs a dual SOCP problem. \[ \max_y \mathbf{b'y} \textrm{ s.t.,} \\ \mathbf{{A^q}_i'y + s_i = c^q_i}, s_i \in K_i, i = 1, 2, ..., q \\ \]- Parameters:
b- \(b\)A_q- \({A^q}_i\)'sc_q- \(c^q_i\)'s
-
SOCPDualProblem1
public SOCPDualProblem1(Vector b, Matrix[] A_q, Vector[] c_q, Matrix A_l, Vector c_l, Matrix A_u, Vector c_u)
Constructs a dual SOCP problem. \[ \max_y \mathbf{b'y} \textrm{ s.t.,} \\ \mathbf{{A^q}_i'y + s_i = c^q_i}, s_i \in K_i, i = 1, 2, ..., q \\ \mathbf{{A^{\ell}}^T y + z^{\ell} = c^{\ell}} \\ \mathbf{{A^{u}}^T y = c^{u}} \\ \]- Parameters:
b- \(b\)A_q- \({A^q}_i\)'sc_q- \(c^q_i\)'sA_l- \(A^{\ell}\)c_l- \(c^l\)A_u- \(A^u\)c_u- \(c^u\)
-
SOCPDualProblem1
public SOCPDualProblem1(SOCPDualProblem1 that)
Copy constructor.- Parameters:
that- another SOCPDualProblem1
-
-
Method Detail
-
dimension
public int dimension()
Description copied from interface:OptimProblemGet the number of variables.- Specified by:
dimensionin interfaceOptimProblem- Returns:
- the number of variables.
-
f
public RealScalarFunction f()
Description copied from interface:OptimProblemGet the objective function.- Specified by:
fin interfaceOptimProblem- Returns:
- the objective function
-
getLessThanConstraints
public LessThanConstraints getLessThanConstraints()
Description copied from interface:ConstrainedOptimProblemGets the less-than-or-equal-to constraints, gi(x) ≤ 0- Specified by:
getLessThanConstraintsin interfaceConstrainedOptimProblem- Returns:
- the less-than-or-equal-to constraints
-
getEqualityConstraints
public SOCPDualProblem1.EqualityConstraints getEqualityConstraints()
Description copied from interface:ConstrainedOptimProblemGets the equality constraints, hi(x) = 0- Specified by:
getEqualityConstraintsin interfaceConstrainedOptimProblem- Returns:
- the equality constraints
-
m
public int m()
Gets the dimension of the system, i.e., m = the dimension of y.- Returns:
- the dimension of the system
-
n_q
public int n_q()
Gets the total number of \({A^q}_i\) matrices.- Returns:
- the number of \({A^q}_i\) matrices
-
b
public Vector b()
Gets b.- Returns:
- b
-
c_q
public Vector c_q(int i)
Gets \(c^q_i\).- Parameters:
i- an index to the \(c^q_i\)'s, counting from 1- Returns:
- \(c^q_i\)
-
A_q
public Matrix A_q(int i)
Gets \({A^q}_i\).- Parameters:
i- an index to the \({A^q}_i\)'s, counting from 1- Returns:
- \({A^q}_i\)
-
n
public int n(int i)
Gets the number of columns of \({A^q}_i\). i.e., n_i- Parameters:
i- an index to the \({A^q}_i\)'s, counting from 1- Returns:
- the number of columns of \({A^q}_i\)
-
A_full
public Matrix A_full()
Combine all A data as a matrix.- Returns:
- [{A_q^i}_i^{n_q}, (A_l)] if flag_u = false; [{A_q^i}_i^{n_q}, (A_l), A_u, -A_u] if flag_u = true (remember to do heuristic step during iteration in this case.)
-
c_full
public Vector c_full()
-
A_q_full
public Matrix A_q_full()
A^q = [{A^q}_1, {A^q}_2, ... {A^q}_{n_q}]- Returns:
- \({A^q}\)
-
c_q_full
public Vector c_q_full()
-
A_l_full
public Matrix A_l_full()
Combine all linear blocks as a matrix.- Returns:
- [(A_l)] if flag_u = false; [(A_l), A_u, -A_u] if flag_u = true (remember to do heuristic step during iteration in this case.)
-
c_l_full
public Vector c_l_full()
-
flag_u
public boolean flag_u()
- Returns:
- true if unrestricted blocks are involved and thus heuristic step is required.
-
flag_s
public boolean flag_s()
- Returns:
- true if the input problem is pure conic; otherwise it is conic + linear
-
n_l
public int n_l()
-
A_l
public Matrix A_l()
-
c_l
public Vector c_l()
-
n_u
public int n_u()
-
A_u
public Matrix A_u()
-
c_u
public Vector c_u()
-
-