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 class
SOCPDualProblem1.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 Matrix
A_full()
Combine all A data as a matrix.Matrix
A_l()
Matrix
A_l_full()
Combine all linear blocks as a matrix.Matrix
A_q(int i)
Gets \({A^q}_i\).Matrix
A_q_full()
A^q = [{A^q}_1, {A^q}_2, ...Matrix
A_u()
Vector
b()
Gets b.Vector
c_full()
Vector
c_l()
Vector
c_l_full()
Vector
c_q(int i)
Gets \(c^q_i\).Vector
c_q_full()
Vector
c_u()
int
dimension()
Get the number of variables.RealScalarFunction
f()
Get the objective function.boolean
flag_s()
boolean
flag_u()
SOCPDualProblem1.EqualityConstraints
getEqualityConstraints()
Gets the equality constraints, hi(x) = 0LessThanConstraints
getLessThanConstraints()
Gets the less-than-or-equal-to constraints, gi(x) ≤ 0int
m()
Gets the dimension of the system, i.e., m = the dimension of y.int
n(int i)
Gets the number of columns of \({A^q}_i\).int
n_l()
int
n_q()
Gets the total number of \({A^q}_i\) matrices.int
n_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:OptimProblem
Get the number of variables.- Specified by:
dimension
in interfaceOptimProblem
- Returns:
- the number of variables.
-
f
public RealScalarFunction f()
Description copied from interface:OptimProblem
Get the objective function.- Specified by:
f
in interfaceOptimProblem
- Returns:
- the objective function
-
getLessThanConstraints
public LessThanConstraints getLessThanConstraints()
Description copied from interface:ConstrainedOptimProblem
Gets the less-than-or-equal-to constraints, gi(x) ≤ 0- Specified by:
getLessThanConstraints
in interfaceConstrainedOptimProblem
- Returns:
- the less-than-or-equal-to constraints
-
getEqualityConstraints
public SOCPDualProblem1.EqualityConstraints getEqualityConstraints()
Description copied from interface:ConstrainedOptimProblem
Gets the equality constraints, hi(x) = 0- Specified by:
getEqualityConstraints
in 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()
-
-