Public Member Functions | Public Attributes | Protected Member Functions

Data class for storing generic conic programs. More...

#include <dense_cp.hpp>

List of all members.

Public Member Functions

 DenseCP ()
 DenseCP (const DenseCP &rhs)
DVector getMergedDualSolution () const
uint getNC () const
uint getNV () const
returnValue init (uint nV_, uint nC_)
BooleanType isLP () const
BooleanType isQP () const
BooleanType isSDP () const
DenseCPoperator= (const DenseCP &rhs)
returnValue print (const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue print (const char *const name, PrintScheme printScheme) const
returnValue printSolution (const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue printSolution (const char *const name, PrintScheme printScheme) const
returnValue printSolutionToFile (const char *const filename, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue printSolutionToFile (std::ostream &stream, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue printSolutionToFile (const char *const filename, const char *const name, PrintScheme printScheme) const
returnValue printSolutionToFile (std::ostream &stream, const char *const name, PrintScheme printScheme) const
returnValue printToFile (const char *const filename, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue printToFile (std::ostream &stream, const char *const name=DEFAULT_LABEL, const char *const startString=DEFAULT_START_STRING, const char *const endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const char *const colSeparator=DEFAULT_COL_SEPARATOR, const char *const rowSeparator=DEFAULT_ROW_SEPARATOR) const
returnValue printToFile (const char *const filename, const char *const name, PrintScheme printScheme) const
returnValue printToFile (std::ostream &stream, const char *const name, PrintScheme printScheme) const
returnValue setQPsolution (const DVector &x_, const DVector &y_)
virtual ~DenseCP ()

Public Attributes

DMatrix A
DMatrix ** B
DVector g
DMatrix H
DVector lb
DVector lbA
DVectorlbB
uint nS
DVector ub
DVector ubA
DVectorubB
DVectorx
DVectorylb
DVectorylbA
DVector ** ylbB
DVectoryub
DVectoryubA
DVector ** yubB

Protected Member Functions

void clean ()
void copy (const DenseCP &rhs)

Detailed Description

Data class for storing generic conic programs.

The class DenseCP (dense conic program) is a data class to store generic conic programs in a convenient format.

Author:
Boris Houska, Hans Joachim Ferreau

Definition at line 55 of file dense_cp.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 44 of file dense_cp.cpp.

DenseCP::DenseCP ( const DenseCP rhs)

Copy constructor (deep copy).

Definition at line 64 of file dense_cp.cpp.

DenseCP::~DenseCP ( ) [virtual]

Destructor.

Definition at line 70 of file dense_cp.cpp.


Member Function Documentation

void DenseCP::clean ( ) [protected]

Definition at line 167 of file dense_cp.cpp.

void DenseCP::copy ( const DenseCP rhs) [protected]

Definition at line 88 of file dense_cp.cpp.

Sets the primal and dual solution converting the dual solution
into the internal format (this routine expects a vector y of
dimension nV + nC, where nC is number of linear constraints and
nV the number of variables (= number of bounds) ).

Returns:
SUCCESSFUL_RETURN

Definition at line 257 of file dense_cp.cpp.

uint DenseCP::getNC ( ) const [inline]

Returns the number of linear constraints

uint DenseCP::getNV ( ) const [inline]

Returns the number of variables

returnValue DenseCP::init ( uint  nV_,
uint  nC_ 
)

Constructs an empty QP with dimensions nV and nC

Definition at line 195 of file dense_cp.cpp.

BooleanType DenseCP::isLP ( ) const [inline]

Returns whether or not the conic program is an LP

BooleanType DenseCP::isQP ( ) const [inline]

Returns whether or not the conic program is an LP

BooleanType DenseCP::isSDP ( ) const [inline]

Returns whether or not the conic program is an SDP

DenseCP & DenseCP::operator= ( const DenseCP rhs)

Assignment operator (deep copy).

Definition at line 76 of file dense_cp.cpp.

returnValue DenseCP::print ( const char *const  name = DEFAULT_LABEL,
const char *const  startString = DEFAULT_START_STRING,
const char *const  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const char *const  colSeparator = DEFAULT_COL_SEPARATOR,
const char *const  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const

Prints CP to standard ouput stream. Various settings can be specified defining its output format.

Parameters:
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_UNKNOWN_BUG

Definition at line 283 of file dense_cp.cpp.

returnValue DenseCP::print ( const char *const  name,
PrintScheme  printScheme 
) const

Prints CP to standard ouput stream. Various settings can be specified defining its output format.

Parameters:
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_UNKNOWN_BUG

Definition at line 304 of file dense_cp.cpp.

returnValue DenseCP::printSolution ( const char *const  name = DEFAULT_LABEL,
const char *const  startString = DEFAULT_START_STRING,
const char *const  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const char *const  colSeparator = DEFAULT_COL_SEPARATOR,
const char *const  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const

Prints CP solution to standard ouput stream. Various settings can be specified defining its output format.

Parameters:
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_UNKNOWN_BUG

Definition at line 399 of file dense_cp.cpp.

returnValue DenseCP::printSolution ( const char *const  name,
PrintScheme  printScheme 
) const

Prints CP solution to standard ouput stream. Various settings can be specified defining its output format.

Parameters:
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_UNKNOWN_BUG

Definition at line 427 of file dense_cp.cpp.

returnValue DenseCP::printSolutionToFile ( const char *const  filename,
const char *const  name = DEFAULT_LABEL,
const char *const  startString = DEFAULT_START_STRING,
const char *const  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const char *const  colSeparator = DEFAULT_COL_SEPARATOR,
const char *const  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const

Prints CP solution to file with given name. Various settings can be specified defining its output format.

Parameters:
[in]filenameFilename for printing.
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 450 of file dense_cp.cpp.

returnValue DenseCP::printSolutionToFile ( std::ostream &  stream,
const char *const  name = DEFAULT_LABEL,
const char *const  startString = DEFAULT_START_STRING,
const char *const  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const char *const  colSeparator = DEFAULT_COL_SEPARATOR,
const char *const  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const

Prints CP solution to given file. Various settings can be specified defining its output format.

Parameters:
[in]streamFile for printing.
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 479 of file dense_cp.cpp.

returnValue DenseCP::printSolutionToFile ( const char *const  filename,
const char *const  name,
PrintScheme  printScheme 
) const

Prints CP solution to file with given name. Various settings can be specified defining its output format.

Parameters:
[in]filenameFilename for printing.
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 508 of file dense_cp.cpp.

returnValue DenseCP::printSolutionToFile ( std::ostream &  stream,
const char *const  name,
PrintScheme  printScheme 
) const

Prints CP solution to given file. Various settings can be specified defining its output format.

Parameters:
[in]streamFile for printing.
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 532 of file dense_cp.cpp.

returnValue DenseCP::printToFile ( const char *const  filename,
const char *const  name = DEFAULT_LABEL,
const char *const  startString = DEFAULT_START_STRING,
const char *const  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const char *const  colSeparator = DEFAULT_COL_SEPARATOR,
const char *const  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const

Prints CP to file with given name. Various settings can be specified defining its output format.

Parameters:
[in]filenameFilename for printing.
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 320 of file dense_cp.cpp.

returnValue DenseCP::printToFile ( std::ostream &  stream,
const char *const  name = DEFAULT_LABEL,
const char *const  startString = DEFAULT_START_STRING,
const char *const  endString = DEFAULT_END_STRING,
uint  width = DEFAULT_WIDTH,
uint  precision = DEFAULT_PRECISION,
const char *const  colSeparator = DEFAULT_COL_SEPARATOR,
const char *const  rowSeparator = DEFAULT_ROW_SEPARATOR 
) const

Prints CP to given file. Various settings can be specified defining its output format.

Parameters:
[in]streamFile for printing.
[in]nameName label to be printed before the numerical values.
[in]startStringPrefix before printing the numerical values.
[in]endStringSuffix after printing the numerical values.
[in]widthTotal number of digits per single numerical value.
[in]precisionNumber of decimals per single numerical value.
[in]colSeparatorSeparator between the columns of the numerical values.
[in]rowSeparatorSeparator between the rows of the numerical values.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 342 of file dense_cp.cpp.

returnValue DenseCP::printToFile ( const char *const  filename,
const char *const  name,
PrintScheme  printScheme 
) const

Prints CP to file with given name. Various settings can be specified defining its output format.

Parameters:
[in]filenameFilename for printing.
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 364 of file dense_cp.cpp.

returnValue DenseCP::printToFile ( std::ostream &  stream,
const char *const  name,
PrintScheme  printScheme 
) const

Prints CP to given file. Various settings can be specified defining its output format.

Parameters:
[in]streamFile for printing.
[in]nameName label to be printed before the numerical values.
[in]printSchemePrint scheme defining the output format of the information.
Returns:
SUCCESSFUL_RETURN,
RET_FILE_CAN_NOT_BE_OPENED,
RET_UNKNOWN_BUG

Definition at line 381 of file dense_cp.cpp.

returnValue DenseCP::setQPsolution ( const DVector x_,
const DVector y_ 
)

Sets the primal and dual solution converting the dual solution
into the internal format (this routine expects a vector y of
dimension nV + nC, where nC is number of linear constraints and
nV the number of variables (= number of bounds) ).

Returns:
SUCCESSFUL_RETURN

Definition at line 204 of file dense_cp.cpp.


Member Data Documentation

Constraint matrix

Definition at line 387 of file dense_cp.hpp.

SDP constraint tensor

Definition at line 391 of file dense_cp.hpp.

The objective gradient

Definition at line 382 of file dense_cp.hpp.

The Hessian matrix

Definition at line 381 of file dense_cp.hpp.

Simple lower bounds

Definition at line 384 of file dense_cp.hpp.

Constraint lower bounds

Definition at line 388 of file dense_cp.hpp.

SDP lower bounds

Definition at line 392 of file dense_cp.hpp.

Number of SDP constraints

Definition at line 375 of file dense_cp.hpp.

Simple upper bounds

Definition at line 385 of file dense_cp.hpp.

Constraint upper bounds

Definition at line 389 of file dense_cp.hpp.

SDP upper bounds

Definition at line 393 of file dense_cp.hpp.

Primal Solution

Definition at line 398 of file dense_cp.hpp.

Dual solution, lower bound

Definition at line 400 of file dense_cp.hpp.

Dual solution, LP lower bound

Definition at line 403 of file dense_cp.hpp.

Dual solution, SDB lower bound

Definition at line 406 of file dense_cp.hpp.

Dual solution, upper bound

Definition at line 401 of file dense_cp.hpp.

Dual solution, LP upper bound

Definition at line 404 of file dense_cp.hpp.

Dual solution, SDP upper bound

Definition at line 407 of file dense_cp.hpp.


The documentation for this class was generated from the following files:


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:38