qpOASES
3.2.1
An Implementation of the Online Active Set Strategy
|
Functions | |
BEGIN_NAMESPACE_QPOASES returnValue | print (const real_t *const v, int_t n, const char *name) |
returnValue | print (const real_t *const v, int_t n, const int_t *const V_idx, const char *name) |
returnValue | print (const real_t *const M, int_t nrow, int_t ncol, const char *name) |
returnValue | print (const real_t *const M, int_t nrow, int_t ncol, const int_t *const ROW_idx, const int_t *const COL_idx, const char *name) |
returnValue | print (const int_t *const index, int_t n, const char *name) |
returnValue | myPrintf (const char *s) |
returnValue | printCopyrightNotice () |
returnValue | readFromFile (real_t *data, int_t nrow, int_t ncol, const char *datafilename) |
returnValue | readFromFile (real_t *data, int_t n, const char *datafilename) |
returnValue | readFromFile (int_t *data, int_t n, const char *datafilename) |
returnValue | writeIntoFile (const real_t *const data, int_t nrow, int_t ncol, const char *datafilename, BooleanType append) |
returnValue | writeIntoFile (const real_t *const data, int_t n, const char *datafilename, BooleanType append) |
returnValue | writeIntoFile (const int_t *const integer, int_t n, const char *datafilename, BooleanType append) |
returnValue | writeIntoMatFile (FILE *const matFile, const real_t *const data, int_t nRows, int_t nCols, const char *name) |
returnValue | writeIntoMatFile (FILE *const matFile, const int_t *const data, int_t nRows, int_t nCols, const char *name) |
real_t | getCPUtime () |
real_t | getNorm (const real_t *const v, int_t n, int_t type) |
returnValue | getKktViolation (int_t nV, int_t nC, const real_t *const H, const real_t *const g, const real_t *const A, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, const real_t *const x, const real_t *const y, real_t &stat, real_t &feas, real_t &cmpl, const real_t *const workingSetB, const real_t *const workingSetC, BooleanType hasIdentityHessian) |
returnValue | getKktViolation (int_t nV, const real_t *const H, const real_t *const g, const real_t *const lb, const real_t *const ub, const real_t *const x, const real_t *const y, real_t &stat, real_t &feas, real_t &cmpl, const real_t *const workingSetB, BooleanType hasIdentityHessian) |
returnValue | convertBooleanTypeToString (BooleanType value, char *const string) |
returnValue | convertSubjectToStatusToString (SubjectToStatus value, char *const string) |
returnValue | convertPrintLevelToString (PrintLevel value, char *const string) |
int_t | getSimpleStatus (returnValue returnvalue, BooleanType doPrintStatus) |
returnValue | normaliseConstraints (int_t nV, int_t nC, real_t *A, real_t *lbA, real_t *ubA, int_t type) |
Implementation of some utility functions for working with qpOASES.
returnValue convertBooleanTypeToString | ( | BooleanType | value, |
char *const | string | ||
) |
Writes a value of BooleanType into a string.
References BT_FALSE, and SUCCESSFUL_RETURN.
Referenced by Options::print().
returnValue convertPrintLevelToString | ( | PrintLevel | value, |
char *const | string | ||
) |
Writes a value of PrintLevel into a string.
References PL_DEBUG_ITER, PL_HIGH, PL_LOW, PL_MEDIUM, PL_NONE, PL_TABULAR, and SUCCESSFUL_RETURN.
Referenced by Options::print().
returnValue convertSubjectToStatusToString | ( | SubjectToStatus | value, |
char *const | string | ||
) |
Writes a value of SubjectToStatus into a string.
References ST_INACTIVE, ST_INFEASIBLE_LOWER, ST_INFEASIBLE_UPPER, ST_LOWER, ST_UNDEFINED, ST_UPPER, and SUCCESSFUL_RETURN.
Referenced by Options::print().
real_t getCPUtime | ( | ) |
Returns the current system time.
References real_t.
Referenced by SQProblem::hotstart(), QProblemB::hotstart(), QProblem::hotstart(), QProblemB::isCPUtimeLimitExceeded(), QProblem::solveInitialQP(), QProblemB::solveInitialQP(), QProblem::solveQP(), and QProblemB::solveQP().
returnValue getKktViolation | ( | int_t | nV, |
const real_t *const | H, | ||
const real_t *const | g, | ||
const real_t *const | lb, | ||
const real_t *const | ub, | ||
const real_t *const | x, | ||
const real_t *const | y, | ||
real_t & | stat, | ||
real_t & | feas, | ||
real_t & | cmpl, | ||
const real_t *const | workingSetB = 0 , |
||
BooleanType | hasIdentityHessian = BT_FALSE |
||
) |
Computes the maximum violation of the KKT optimality conditions of given iterate for given QP data.
References getKktViolation().
returnValue getKktViolation | ( | int_t | nV, |
int_t | nC, | ||
const real_t *const | H, | ||
const real_t *const | g, | ||
const real_t *const | A, | ||
const real_t *const | lb, | ||
const real_t *const | ub, | ||
const real_t *const | lbA, | ||
const real_t *const | ubA, | ||
const real_t *const | x, | ||
const real_t *const | y, | ||
real_t & | stat, | ||
real_t & | feas, | ||
real_t & | cmpl, | ||
const real_t *const | workingSetB = 0 , |
||
const real_t *const | workingSetC = 0 , |
||
BooleanType | hasIdentityHessian = BT_FALSE |
||
) |
Computes the maximum violation of the KKT optimality conditions of given iterate for given QP data.
References BT_TRUE, EPS, getAbs(), isEqual(), real_t, and SUCCESSFUL_RETURN.
Referenced by getKktViolation(), and solveOqpBenchmark().
Returns the N-norm of a vector.
References getAbs(), getSqrt(), INFTY, real_t, RET_INVALID_ARGUMENTS, and THROWERROR.
Referenced by normaliseConstraints(), and QProblemB::regulariseHessian().
int_t getSimpleStatus | ( | returnValue | returnvalue, |
BooleanType | doPrintStatus = BT_FALSE |
||
) |
Converts a returnValue from an (S)QProblem(B) object into a more simple status flag.
References BT_TRUE, getGlobalMessageHandler(), MessageHandling::getInfoVisibilityStatus(), RET_HOTSTART_STOPPED_INFEASIBILITY, RET_HOTSTART_STOPPED_UNBOUNDEDNESS, RET_INIT_FAILED_INFEASIBILITY, RET_INIT_FAILED_UNBOUNDEDNESS, RET_MAX_NWSR_REACHED, RET_SIMPLE_STATUS_P0, MessageHandling::setErrorCount(), MessageHandling::setInfoVisibilityStatus(), SUCCESSFUL_RETURN, THROWINFO, and VS_VISIBLE.
returnValue myPrintf | ( | const char * | s | ) |
Prints a string to desired output target (useful also for MATLAB output!).
References getGlobalMessageHandler(), MessageHandling::getOutputFile(), RET_INVALID_ARGUMENTS, RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by MessageHandling::listAllMessages(), main(), print(), Options::print(), Constraints::print(), Bounds::print(), printCopyrightNotice(), QProblem::printIteration(), QProblemB::printIteration(), QProblem::printProperties(), QProblemB::printProperties(), and MessageHandling::throwMessage().
returnValue normaliseConstraints | ( | int_t | nV, |
int_t | nC, | ||
real_t * | A, | ||
real_t * | lbA, | ||
real_t * | ubA, | ||
int_t | type = 1 |
||
) |
Normalises QP constraints.
References EPS, getNorm(), getSqrt(), INFTY, real_t, RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.
returnValue print | ( | const int_t *const | index, |
int_t | n, | ||
const char * | name = 0 |
||
) |
Prints a (possibly named) index array.
References MAX_STRING_LENGTH, myPrintf(), and SUCCESSFUL_RETURN.
returnValue print | ( | const real_t *const | M, |
int_t | nrow, | ||
int_t | ncol, | ||
const char * | name = 0 |
||
) |
Prints a (possibly named) matrix.
References MAX_STRING_LENGTH, myPrintf(), print(), and SUCCESSFUL_RETURN.
returnValue print | ( | const real_t *const | M, |
int_t | nrow, | ||
int_t | ncol, | ||
const int_t *const | ROW_idx, | ||
const int_t *const | COL_idx, | ||
const char * | name = 0 |
||
) |
Prints a (possibly named) permuted matrix.
References MAX_STRING_LENGTH, myPrintf(), print(), and SUCCESSFUL_RETURN.
BEGIN_NAMESPACE_QPOASES returnValue print | ( | const real_t *const | v, |
int_t | n, | ||
const char * | name = 0 |
||
) |
Prints a (possibly named) vector.
References MAX_STRING_LENGTH, myPrintf(), and SUCCESSFUL_RETURN.
Referenced by print().
returnValue print | ( | const real_t *const | v, |
int_t | n, | ||
const int_t *const | V_idx, | ||
const char * | name = 0 |
||
) |
Prints a (possibly named) permuted vector.
References MAX_STRING_LENGTH, myPrintf(), and SUCCESSFUL_RETURN.
returnValue printCopyrightNotice | ( | ) |
Prints qpOASES copyright notice.
References myPrintf(), and SUCCESSFUL_RETURN.
Referenced by QProblemB::QProblemB().
returnValue readFromFile | ( | int_t * | data, |
int_t | n, | ||
const char * | datafilename | ||
) |
Reads an integer (column) vector from file.
References __FILE__, __FUNC__, __LINE__, getGlobalMessageHandler(), MAX_STRING_LENGTH, RET_NOT_YET_IMPLEMENTED, RET_UNABLE_TO_OPEN_FILE, RET_UNABLE_TO_READ_FILE, SUCCESSFUL_RETURN, MessageHandling::throwError(), and VS_VISIBLE.
returnValue readFromFile | ( | real_t * | data, |
int_t | n, | ||
const char * | datafilename | ||
) |
Reads a real_t vector from file.
References readFromFile().
returnValue readFromFile | ( | real_t * | data, |
int_t | nrow, | ||
int_t | ncol, | ||
const char * | datafilename | ||
) |
Reads a real_t matrix from file.
References __FILE__, __FUNC__, __LINE__, getGlobalMessageHandler(), MAX_STRING_LENGTH, real_t, RET_NOT_YET_IMPLEMENTED, RET_UNABLE_TO_OPEN_FILE, RET_UNABLE_TO_READ_FILE, SUCCESSFUL_RETURN, MessageHandling::throwError(), and VS_VISIBLE.
Referenced by SQProblem::hotstart(), QProblemB::init(), QProblem::init(), QProblemB::loadQPvectorsFromFile(), QProblem::loadQPvectorsFromFile(), readFromFile(), readOqpData(), readOqpDimensions(), QProblemB::setupQPdataFromFile(), and QProblem::setupQPdataFromFile().
returnValue writeIntoFile | ( | const int_t *const | integer, |
int_t | n, | ||
const char * | datafilename, | ||
BooleanType | append = BT_FALSE |
||
) |
Writes an integer (column) vector into a file.
References __FILE__, __FUNC__, __LINE__, BT_TRUE, getGlobalMessageHandler(), MAX_STRING_LENGTH, RET_NOT_YET_IMPLEMENTED, RET_UNABLE_TO_OPEN_FILE, SUCCESSFUL_RETURN, MessageHandling::throwError(), and VS_VISIBLE.
returnValue writeIntoFile | ( | const real_t *const | data, |
int_t | n, | ||
const char * | datafilename, | ||
BooleanType | append = BT_FALSE |
||
) |
Writes a real_t vector into a file.
References writeIntoFile().
returnValue writeIntoFile | ( | const real_t *const | data, |
int_t | nrow, | ||
int_t | ncol, | ||
const char * | datafilename, | ||
BooleanType | append = BT_FALSE |
||
) |
Writes a real_t matrix into a file.
References __FILE__, __FUNC__, __LINE__, BT_TRUE, getGlobalMessageHandler(), MAX_STRING_LENGTH, RET_NOT_YET_IMPLEMENTED, RET_UNABLE_TO_OPEN_FILE, SUCCESSFUL_RETURN, MessageHandling::throwError(), and VS_VISIBLE.
Referenced by writeIntoFile().
returnValue writeIntoMatFile | ( | FILE *const | matFile, |
const int_t *const | data, | ||
int_t | nRows, | ||
int_t | nCols, | ||
const char * | name | ||
) |
Writes in integer matrix/vector into a Matlab binary file.
References real_t, and writeIntoMatFile().
returnValue writeIntoMatFile | ( | FILE *const | matFile, |
const real_t *const | data, | ||
int_t | nRows, | ||
int_t | nCols, | ||
const char * | name | ||
) |
Writes a real_t matrix/vector into a Matlab binary file.
References MatMatrixHeader::imaginaryPart, MatMatrixHeader::nCharName, MatMatrixHeader::nCols, MatMatrixHeader::nRows, MatMatrixHeader::numericFormat, real_t, RET_INVALID_ARGUMENTS, RET_NOT_YET_IMPLEMENTED, RET_UNABLE_TO_WRITE_FILE, and SUCCESSFUL_RETURN.
Referenced by writeIntoMatFile(), QProblem::writeQpDataIntoMatFile(), and QProblem::writeQpWorkspaceIntoMatFile().