|
void | AddDebugLevel (const long int lv) |
|
void | AddDebugLevel (const std::string &name) |
|
int | Compute (int L, int m, const std::vector< int > &N, const Vector< double > &f, const std::vector< Matrix< double > > &A, const std::vector< Vector< double > > &b, const std::vector< Vector< double > > &c, const std::vector< double > &d, Vector< double > &x, std::vector< Vector< double > > &z, std::vector< double > &w) |
| Solve Second-Order Cone Programming instance with L constraints. More...
|
|
int | Compute (int m, int n, const Vector< double > &f, const Matrix< double > &A, const Vector< double > &b, const Vector< double > &c, double d, Vector< double > &x, Vector< double > &z, double &w) |
| Solve single-constraint Second-Order Cone Programming instance. More...
|
|
bool | DebugLevelIsSet (const long int lv) const |
|
bool | DebugLevelIsSet (const std::string &name) const |
|
double | GetAbsoluteTolerance () const |
| Get absolute tolerance used to determine convergence. More...
|
|
int | GetDebugLevel () const |
|
std::ostream & | GetDebugStream () const |
|
void | GetDebugStream (std::ostream &os) const |
|
int | GetMaxIterations () const |
| Get maximal number of iterations performed by SOCP algorithm. More...
|
|
double | GetNu () const |
| Get parameter nu that controls the rate of convergence. More...
|
|
double | GetRelativeTolerance () const |
| Get relative tolerance used to determine convergence. More...
|
|
double | GetTargetValue () const |
| Get target value used in convergence criterion. More...
|
|
long int | Name2DebugLevel (const std::string &name) const |
| looks up a debuglevel in the internal map, returns 0 if not found More...
|
|
long int | NewDebugLevel (const std::string &name) |
| creates a new debuglevel More...
|
|
void | PrintDebugLevel (std::ostream &os=std::cout) const |
|
void | RemoveDebugLevel (const long int lv) |
|
void | RemoveDebugLevel (const std::string &name) |
|
void | SetAbsoluteTolerance (double tol) |
| Set absolute tolerance used to determine convergence. More...
|
|
void | SetDebugLevel (const long int lv) |
|
void | SetDebugLevel (const std::string &name) |
|
void | SetDebugStream (const std::ostream &os) |
|
void | SetMaxIterations (int iter) |
| Set maximal number of iterations performed by SOCP algorithm. More...
|
|
void | SetNu (double nu) |
| Set parameter nu that controls the rate of convergence. More...
|
|
void | SetRelativeTolerance (double tol) |
| Set relative tolerance used to determine convergence. More...
|
|
void | SetTargetValue (double target) |
| Set target value used in convergence criterion only when relative tolerance given is < 0. More...
|
|
void | ShowDebugLevel (std::ostream &os=std::cout) const |
| prints all internally known debuglevels More...
|
|
| SOCP () |
| Create SOCP solver with default parameters. More...
|
|
| ~SOCP () |
| Release memory used. More...
|
|
Wrapper for Second-Order Cone Programming implementation, by Miguel S.
Lobo et al. from Stanford university provided at http://www.stanford.edu/~boyd/old_software/socp/ See User's Guide [1] and [2] for details about the algorithm and socp/README.txt for information about the authors.
Solves Second-Order Cone Programming (SOCP) problems defined by:
min f^T * x s.t. ||A_i * x + b_i|| <= c_i * x + d_i for i = 1, ..., L
[1] M. S. Lobo, L. Vandenberghe, S. Boyd: SOCP Software for Second-Order Cone Programming - User's Guide, April 1997. [2] M. S. Lobo, L. Vandenberghe, S. Boyd, H. Lebret: Second-Order Cone Programming: Interior-Point Methods and Engineering Applications, Linear Algebra and Applications, 1997.
- See Also
- socp/socp.h
- Author
- esquivel 05/2012
- Examples:
- ExampleSOCP.cpp.
Definition at line 57 of file SOCP.hh.
int SOCP::Compute |
( |
int |
L, |
|
|
int |
m, |
|
|
const std::vector< int > & |
N, |
|
|
const Vector< double > & |
f, |
|
|
const std::vector< Matrix< double > > & |
A, |
|
|
const std::vector< Vector< double > > & |
b, |
|
|
const std::vector< Vector< double > > & |
c, |
|
|
const std::vector< double > & |
d, |
|
|
Vector< double > & |
x, |
|
|
std::vector< Vector< double > > & |
z, |
|
|
std::vector< double > & |
w |
|
) |
| |
Solve Second-Order Cone Programming instance with L constraints.
Compute vector x minimizing f * x subject to the constraints ||A_i * x + b_i|| <= c_i * x + d_i for i = 1, ..., L starting with the given solution x.
L is the number of constraints, m is the number of variables. Vector N = (N_1, ..., N_L) specifies the problem size of the i-th constraint, i.e. A_i is a N_i x m matrix, b_i is a vector of size N_i, c_i is a vector of size m and d_i is a scalar. Both f and x are vectors of size m.
The vectors z_1, ..., z_L and scalars w_1, ..., w_L describe the solution to the dual problem. Each vector z_i is of size N_i. Note that a feasable dual solution must be given as a start point in addition to the primal solution x.
- Returns
- Returns < 0 in case of errors, 0 otherwise.
- Examples:
- ExampleSOCP.cpp.
Definition at line 46 of file SOCP.cpp.
References BIAS::Vector< T >::Size().
int SOCP::Compute |
( |
int |
m, |
|
|
int |
n, |
|
|
const Vector< double > & |
f, |
|
|
const Matrix< double > & |
A, |
|
|
const Vector< double > & |
b, |
|
|
const Vector< double > & |
c, |
|
|
double |
d, |
|
|
Vector< double > & |
x, |
|
|
Vector< double > & |
z, |
|
|
double & |
w |
|
) |
| |
Solve single-constraint Second-Order Cone Programming instance.
Compute vector x minimizing f * x subject to the constraint ||A * x + b|| <= c * x + d starting with the given solution x.
m is the number of variables, n specifies the problem size of the constraint, i.e. A is a n x m matrix, b is a vector of size n, c is a vector of size m and d is a scalar. Both f and x are vectors of size m. Vector z of size n and scalar w describe the solution to the dual problem. A feasable dual solution must be given as a start point in addition to the primal solution x.
- Returns
- Returns < 0 in case of errors, 0 otherwise.
Definition at line 145 of file SOCP.cpp.
References BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), and BIAS::Vector< T >::Size().