qpOASES
3.1.1
|
Implements the online active set strategy for QPs with general constraints. More...
#include <QProblem.hpp>
Public Member Functions | |
QProblem () | |
QProblem (int _nV, int _nC, HessianType _hessianType=HST_UNKNOWN) | |
QProblem (const QProblem &rhs) | |
virtual | ~QProblem () |
QProblem & | operator= (const QProblem &rhs) |
virtual returnValue | reset () |
returnValue | init (SymmetricMatrix *_H, const real_t *const _g, Matrix *_A, const real_t *const _lb, const real_t *const _ub, const real_t *const _lbA, const real_t *const _ubA, int &nWSR, real_t *const cputime=0, const real_t *const xOpt=0, const real_t *const yOpt=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0, const real_t *const _R=0) |
returnValue | init (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, int &nWSR, real_t *const cputime=0, const real_t *const xOpt=0, const real_t *const yOpt=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0, const real_t *const _R=0) |
returnValue | init (const char *const H_file, const char *const g_file, const char *const A_file, const char *const lb_file, const char *const ub_file, const char *const lbA_file, const char *const ubA_file, int &nWSR, real_t *const cputime=0, const real_t *const xOpt=0, const real_t *const yOpt=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0, const char *const R_file=0) |
returnValue | hotstart (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new, const real_t *const lbA_new, const real_t *const ubA_new, int &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0) |
returnValue | hotstart (const char *const g_file, const char *const lb_file, const char *const ub_file, const char *const lbA_file, const char *const ubA_file, int &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0) |
returnValue | solveCurrentEQP (const int n_rhs, const real_t *g_in, const real_t *lb_in, const real_t *ub_in, const real_t *lbA_in, const real_t *ubA_in, real_t *x_out, real_t *y_out) |
virtual returnValue | getWorkingSet (real_t *workingSet) |
virtual returnValue | getWorkingSetBounds (real_t *workingSetB) |
virtual returnValue | getWorkingSetConstraints (real_t *workingSetC) |
returnValue | getConstraints (Constraints &_constraints) const |
int | getNC () const |
int | getNEC () const |
int | getNAC () const |
int | getNIAC () const |
virtual int | getNZ () const |
virtual returnValue | getDualSolution (real_t *const yOpt) const |
returnValue | setConstraintProduct (ConstraintProduct *const _constraintProduct) |
virtual returnValue | printProperties () |
returnValue | writeQpDataIntoMatFile (const char *const filename) const |
returnValue | writeQpWorkspaceIntoMatFile (const char *const filename) |
returnValue | init (SymmetricMatrix *_H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub, int &nWSR, real_t *const cputime=0, const real_t *const xOpt=0, const real_t *const yOpt=0, const Bounds *const guessedBounds=0, const real_t *const _R=0) |
returnValue | init (const real_t *const _H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub, int &nWSR, real_t *const cputime=0, const real_t *const xOpt=0, const real_t *const yOpt=0, const Bounds *const guessedBounds=0, const real_t *const _R=0) |
returnValue | init (const char *const H_file, const char *const g_file, const char *const lb_file, const char *const ub_file, int &nWSR, real_t *const cputime=0, const real_t *const xOpt=0, const real_t *const yOpt=0, const Bounds *const guessedBounds=0, const char *const R_file=0) |
returnValue | hotstart (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new, int &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0) |
returnValue | hotstart (const char *const g_file, const char *const lb_file, const char *const ub_file, int &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0) |
returnValue | getBounds (Bounds &_bounds) const |
int | getNV () const |
int | getNFR () const |
int | getNFX () const |
int | getNFV () const |
real_t | getObjVal () const |
real_t | getObjVal (const real_t *const _x) const |
returnValue | getPrimalSolution (real_t *const xOpt) const |
QProblemStatus | getStatus () const |
BooleanType | isInitialised () const |
BooleanType | isSolved () const |
BooleanType | isInfeasible () const |
BooleanType | isUnbounded () const |
HessianType | getHessianType () const |
returnValue | setHessianType (HessianType _hessianType) |
BooleanType | usingRegularisation () const |
Options | getOptions () const |
returnValue | setOptions (const Options &_options) |
PrintLevel | getPrintLevel () const |
returnValue | setPrintLevel (PrintLevel _printlevel) |
unsigned int | getCount () const |
returnValue | resetCounter () |
returnValue | printOptions () const |
Protected Member Functions | |
returnValue | clear () |
returnValue | copy (const QProblem &rhs) |
returnValue | solveInitialQP (const real_t *const xOpt, const real_t *const yOpt, const Bounds *const guessedBounds, const Constraints *const guessedConstraints, const real_t *const _R, int &nWSR, real_t *const cputime) |
returnValue | solveQP (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new, const real_t *const lbA_new, const real_t *const ubA_new, int &nWSR, real_t *const cputime, int nWSRperformed=0, BooleanType isFirstCall=BT_TRUE) |
returnValue | solveRegularisedQP (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new, const real_t *const lbA_new, const real_t *const ubA_new, int &nWSR, real_t *const cputime, int nWSRperformed=0, BooleanType isFirstCall=BT_TRUE) |
virtual returnValue | setupSubjectToType () |
virtual returnValue | setupSubjectToType (const real_t *const lb_new, const real_t *const ub_new, const real_t *const lbA_new, const real_t *const ubA_new) |
returnValue | computeProjectedCholesky () |
virtual returnValue | setupInitialCholesky () |
returnValue | setupTQfactorisation () |
returnValue | obtainAuxiliaryWorkingSet (const real_t *const xOpt, const real_t *const yOpt, const Bounds *const guessedBounds, const Constraints *const guessedConstraints, Bounds *auxiliaryBounds, Constraints *auxiliaryConstraints) const |
returnValue | setupAuxiliaryWorkingSet (const Bounds *const auxiliaryBounds, const Constraints *const auxiliaryConstraints, BooleanType setupAfresh) |
returnValue | setupAuxiliaryQPsolution (const real_t *const xOpt, const real_t *const yOpt) |
returnValue | setupAuxiliaryQPgradient () |
returnValue | setupAuxiliaryQPbounds (const Bounds *const auxiliaryBounds, const Constraints *const auxiliaryConstraints, BooleanType useRelaxation) |
returnValue | addConstraint (int number, SubjectToStatus C_status, BooleanType updateCholesky, BooleanType ensureLI=BT_TRUE) |
returnValue | addConstraint_checkLI (int number) |
returnValue | addConstraint_ensureLI (int number, SubjectToStatus C_status) |
returnValue | addBound (int number, SubjectToStatus B_status, BooleanType updateCholesky, BooleanType ensureLI=BT_TRUE) |
returnValue | addBound_checkLI (int number) |
returnValue | addBound_ensureLI (int number, SubjectToStatus B_status) |
returnValue | removeConstraint (int number, BooleanType updateCholesky, BooleanType allowFlipping=BT_FALSE, BooleanType ensureNZC=BT_FALSE) |
returnValue | removeBound (int number, BooleanType updateCholesky, BooleanType allowFlipping=BT_FALSE, BooleanType ensureNZC=BT_FALSE) |
returnValue | performPlainRatioTest (int nIdx, const int *const idxList, const real_t *const num, const real_t *const den, real_t epsNum, real_t epsDen, real_t &t, int &BC_idx) const |
returnValue | ensureNonzeroCurvature (BooleanType removeBoundNotConstraint, int remIdx, BooleanType &exchangeHappened, BooleanType &addBoundNotConstraint, int &addIdx, SubjectToStatus &addStatus) |
returnValue | backsolveT (const real_t *const b, BooleanType transposed, real_t *const a) const |
returnValue | determineDataShift (const real_t *const g_new, const real_t *const lbA_new, const real_t *const ubA_new, const real_t *const lb_new, const real_t *const ub_new, real_t *const delta_g, real_t *const delta_lbA, real_t *const delta_ubA, real_t *const delta_lb, real_t *const delta_ub, BooleanType &Delta_bC_isZero, BooleanType &Delta_bB_isZero) |
returnValue | determineStepDirection (const real_t *const delta_g, const real_t *const delta_lbA, const real_t *const delta_ubA, const real_t *const delta_lb, const real_t *const delta_ub, BooleanType Delta_bC_isZero, BooleanType Delta_bB_isZero, real_t *const delta_xFX, real_t *const delta_xFR, real_t *const delta_yAC, real_t *const delta_yFX) |
returnValue | performStep (const real_t *const delta_g, const real_t *const delta_lbA, const real_t *const delta_ubA, const real_t *const delta_lb, const real_t *const delta_ub, const real_t *const delta_xFX, const real_t *const delta_xFR, const real_t *const delta_yAC, const real_t *const delta_yFX, int &BC_idx, SubjectToStatus &BC_status, BooleanType &BC_isBound) |
returnValue | changeActiveSet (int BC_idx, SubjectToStatus BC_status, BooleanType BC_isBound) |
real_t | getRelativeHomotopyLength (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new, const real_t *const lbA_new, const real_t *const ubA_new) |
virtual returnValue | performRamping () |
returnValue | updateFarBounds (real_t curFarBound, int nRamp, const real_t *const lb_new, real_t *const lb_new_far, const real_t *const ub_new, real_t *const ub_new_far, const real_t *const lbA_new, real_t *const lbA_new_far, const real_t *const ubA_new, real_t *const ubA_new_far) const |
virtual returnValue | performDriftCorrection () |
virtual returnValue | setupAuxiliaryQP (const Bounds *const guessedBounds, const Constraints *const guessedConstraints) |
BooleanType | shallRefactorise (const Bounds *const guessedBounds, const Constraints *const guessedConstraints) const |
returnValue | setupQPdata (SymmetricMatrix *_H, const real_t *const _g, Matrix *_A, const real_t *const _lb, const real_t *const _ub, const real_t *const _lbA, const real_t *const _ubA) |
returnValue | setupQPdata (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) |
returnValue | setupQPdataFromFile (const char *const H_file, const char *const g_file, const char *const A_file, const char *const lb_file, const char *const ub_file, const char *const lbA_file, const char *const ubA_file) |
returnValue | loadQPvectorsFromFile (const char *const g_file, const char *const lb_file, const char *const ub_file, const char *const lbA_file, const char *const ubA_file, real_t *const g_new, real_t *const lb_new, real_t *const ub_new, real_t *const lbA_new, real_t *const ubA_new) const |
returnValue | printIteration (int iter, int BC_idx, SubjectToStatus BC_status, BooleanType BC_isBound, real_t homotopyLength, BooleanType isFirstCall=BT_TRUE) |
returnValue | setA (Matrix *A_new) |
returnValue | setA (const real_t *const A_new) |
returnValue | setLBA (const real_t *const lbA_new) |
returnValue | setLBA (int number, real_t value) |
returnValue | setUBA (const real_t *const ubA_new) |
returnValue | setUBA (int number, real_t value) |
returnValue | dropInfeasibles (int BC_number, SubjectToStatus BC_status, BooleanType BC_isBound, real_t *xiB, real_t *xiC) |
returnValue | areBoundsConsistent (const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA) const |
returnValue | copy (const QProblemB &rhs) |
returnValue | determineHessianType () |
virtual returnValue | setupSubjectToType (const real_t *const lb_new, const real_t *const ub_new) |
returnValue | computeCholesky () |
returnValue | obtainAuxiliaryWorkingSet (const real_t *const xOpt, const real_t *const yOpt, const Bounds *const guessedBounds, Bounds *auxiliaryBounds) const |
returnValue | areBoundsConsistent (const real_t *const lb, const real_t *const ub) const |
returnValue | backsolveR (const real_t *const b, BooleanType transposed, real_t *const a) const |
returnValue | backsolveR (const real_t *const b, BooleanType transposed, BooleanType removingBound, real_t *const a) const |
returnValue | determineDataShift (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new, real_t *const delta_g, real_t *const delta_lb, real_t *const delta_ub, BooleanType &Delta_bB_isZero) |
returnValue | setupQPdata (SymmetricMatrix *_H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub) |
returnValue | setupQPdata (const real_t *const _H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub) |
returnValue | setupQPdataFromFile (const char *const H_file, const char *const g_file, const char *const lb_file, const char *const ub_file) |
returnValue | loadQPvectorsFromFile (const char *const g_file, const char *const lb_file, const char *const ub_file, real_t *const g_new, real_t *const lb_new, real_t *const ub_new) const |
returnValue | setInfeasibilityFlag (returnValue returnvalue, BooleanType doThrowError=BT_FALSE) |
BooleanType | isCPUtimeLimitExceeded (const real_t *const cputime, real_t starttime, int nWSR) const |
returnValue | regulariseHessian () |
returnValue | setH (SymmetricMatrix *H_new) |
returnValue | setH (const real_t *const H_new) |
returnValue | setG (const real_t *const g_new) |
returnValue | setLB (const real_t *const lb_new) |
returnValue | setLB (int number, real_t value) |
returnValue | setUB (const real_t *const ub_new) |
returnValue | setUB (int number, real_t value) |
void | computeGivens (real_t xold, real_t yold, real_t &xnew, real_t &ynew, real_t &c, real_t &s) const |
void | applyGivens (real_t c, real_t s, real_t nu, real_t xold, real_t yold, real_t &xnew, real_t &ynew) const |
real_t | getRelativeHomotopyLength (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new) |
returnValue | updateFarBounds (real_t curFarBound, int nRamp, const real_t *const lb_new, real_t *const lb_new_far, const real_t *const ub_new, real_t *const ub_new_far) const |
returnValue | performRatioTest (int nIdx, const int *const idxList, const SubjectTo *const subjectTo, const real_t *const num, const real_t *const den, real_t epsNum, real_t epsDen, real_t &t, int &BC_idx) const |
BooleanType | isBlocking (real_t num, real_t den, real_t epsNum, real_t epsDen, real_t &t) const |
SymSparseMat * | createDiagSparseMat (int n, real_t diagVal=1.0) |
virtual returnValue | setupAuxiliaryQP (const Bounds *const guessedBounds) |
Protected Attributes | |
BooleanType | freeConstraintMatrix |
Matrix * | A |
real_t * | lbA |
real_t * | ubA |
Constraints | constraints |
real_t * | T |
real_t * | Q |
int | sizeT |
real_t * | Ax |
real_t * | Ax_l |
real_t * | Ax_u |
ConstraintProduct * | constraintProduct |
real_t * | tempA |
real_t * | tempB |
real_t * | ZFR_delta_xFRz |
real_t * | delta_xFRy |
real_t * | delta_xFRz |
real_t * | delta_yAC_TMP |
BooleanType | freeHessian |
SymmetricMatrix * | H |
real_t * | g |
real_t * | lb |
real_t * | ub |
Bounds | bounds |
real_t * | R |
BooleanType | haveCholesky |
real_t * | x |
real_t * | y |
real_t | tau |
QProblemStatus | status |
BooleanType | infeasible |
BooleanType | unbounded |
HessianType | hessianType |
real_t | regVal |
unsigned int | count |
real_t * | delta_xFR_TMP |
real_t | ramp0 |
real_t | ramp1 |
int | rampOffset |
Options | options |
Flipper | flipper |
TabularOutput | tabularOutput |
Friends | |
class | SolutionAnalysis |
A class for setting up and solving quadratic programs. The main feature is the possibily to use the newly developed online active set strategy for parametric quadratic programming.
Default constructor.
References A, Ax, Ax_l, Ax_u, BT_FALSE, constraintProduct, delta_xFRy, delta_xFRz, delta_yAC_TMP, freeConstraintMatrix, lbA, Q, sizeT, T, tempA, tempB, ubA, and ZFR_delta_xFRz.
QProblem::QProblem | ( | int | _nV, |
int | _nC, | ||
HessianType | _hessianType = HST_UNKNOWN |
||
) |
Constructor which takes the QP dimension and Hessian type information. If the Hessian is the zero (i.e. HST_ZERO) or the identity matrix (i.e. HST_IDENTITY), respectively, no memory is allocated for it and a NULL pointer can be passed for it to the init() functions.
_nV | Number of variables. |
_nC | Number of constraints. |
_hessianType | Type of Hessian matrix. |
References A, Ax, Ax_l, Ax_u, BT_FALSE, BT_TRUE, constraintProduct, constraints, delta_xFRy, delta_xFRz, delta_yAC_TMP, QProblemB::flipper, freeConstraintMatrix, getMin(), Constraints::init(), Flipper::init(), lbA, Q, real_t, RET_INVALID_ARGUMENTS, sizeT, T, tempA, tempB, THROWERROR, ubA, QProblemB::y, and ZFR_delta_xFRz.
QProblem::QProblem | ( | const QProblem & | rhs | ) |
Copy constructor (deep copy).
rhs | Rhs object. |
References A, BT_FALSE, copy(), and freeConstraintMatrix.
QProblem::~QProblem | ( | ) | [virtual] |
Destructor.
References clear().
returnValue QProblem::addBound | ( | int | number, |
SubjectToStatus | B_status, | ||
BooleanType | updateCholesky, | ||
BooleanType | ensureLI = BT_TRUE |
||
) | [protected] |
Adds a bound to active set.
number | Number of bound to be added to active set. |
B_status | Status of new active bound. |
updateCholesky | Flag indicating if Cholesky decomposition shall be updated. |
ensureLI | Ensure linear independence by exchange rules by default. |
References addBound_ensureLI(), QProblemB::applyGivens(), QProblemB::bounds, BT_TRUE, QProblemB::computeGivens(), Bounds::getFree(), Indexlist::getLastNumber(), getNAC(), QProblemB::getNFR(), Indexlist::getNumberArray(), Bounds::getNUV(), QProblemB::getNV(), getNZ(), SubjectTo::getStatus(), QProblemB::getStatus(), QProblemB::hessianType, HST_IDENTITY, HST_ZERO, TabularOutput::idxAddB, Bounds::moveFreeToFixed(), QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_NOTINITIALISED, QPS_SOLVED, QQ, real_t, RET_ADDBOUND_FAILED, RET_ADDBOUND_FAILED_INFEASIBILITY, RET_ALL_BOUNDS_ACTIVE, RET_BOUND_ALREADY_ACTIVE, RET_ENSURELI_DROPPED, RET_ENSURELI_FAILED, RET_ENSURELI_FAILED_CYCLING, RET_ENSURELI_FAILED_NOINDEX, RET_LI_RESOLVED, RET_UNKNOWN_BUG, RR, sizeT, ST_INACTIVE, SUCCESSFUL_RETURN, Bounds::swapFree(), QProblemB::tabularOutput, THROWERROR, and TT.
Referenced by changeActiveSet(), removeBound(), removeConstraint(), and setupAuxiliaryWorkingSet().
returnValue QProblem::addBound_checkLI | ( | int | number | ) | [protected] |
Checks if new active bound to be added is linearly dependent from from row of the active constraints matrix.
number | Number of bound to be added to active set. |
References BT_FALSE, determineStepDirection(), Options::enableFullLITests, Options::epsLITests, getAbs(), getNAC(), getNC(), QProblemB::getNFR(), QProblemB::getNFX(), QProblemB::getNV(), getNZ(), QProblemB::options, QQ, real_t, RET_LINEARLY_DEPENDENT, RET_LINEARLY_INDEPENDENT, SUCCESSFUL_RETURN, and THROWINFO.
Referenced by addBound_ensureLI(), and setupAuxiliaryWorkingSet().
returnValue QProblem::addBound_ensureLI | ( | int | number, |
SubjectToStatus | B_status | ||
) | [protected] |
Ensures linear independence of constraint matrix when a new bound is added. To this end a bound or constraint is removed simultaneously if necessary.
number | Number of bound to be added to active set. |
B_status | Status of new active bound. |
References __FILE__, __FUNC__, __LINE__, A, addBound_checkLI(), backsolveT(), QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, dropInfeasibles(), Options::enableDropInfeasibles, Options::epsDen, Options::epsNum, TabularOutput::excRemB, TabularOutput::excRemC, Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getGlobalMessageHandler(), getNAC(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), MAX_STRING_LENGTH, Options::maxDualJump, QProblemB::options, QProblemB::performRatioTest(), QQ, real_t, removeBound(), removeConstraint(), RET_ENSURELI_FAILED, RET_ENSURELI_FAILED_NOINDEX, RET_ENSURELI_FAILED_TQ, RET_INDEXLIST_CORRUPTED, RET_LI_RESOLVED, RET_LINEARLY_INDEPENDENT, RET_REMOVE_FROM_ACTIVESET, RET_REMOVE_FROM_ACTIVESET_FAILED, QProblemB::setInfeasibilityFlag(), ST_LOWER, SUCCESSFUL_RETURN, QProblemB::tabularOutput, THROWERROR, MessageHandling::throwInfo(), Matrix::transTimes(), VS_VISIBLE, and QProblemB::y.
Referenced by addBound().
returnValue QProblem::addConstraint | ( | int | number, |
SubjectToStatus | C_status, | ||
BooleanType | updateCholesky, | ||
BooleanType | ensureLI = BT_TRUE |
||
) | [protected] |
Adds a constraint to active set.
number | Number of constraint to be added to active set. |
C_status | Status of new active constraint. |
updateCholesky | Flag indicating if Cholesky decomposition shall be updated. |
ensureLI | Ensure linear independence by exchange rules by default. |
References A, addConstraint_ensureLI(), QProblemB::applyGivens(), QProblemB::bounds, BT_TRUE, QProblemB::computeGivens(), constraints, Bounds::getFree(), getNAC(), Constraints::getNC(), QProblemB::getNFR(), Constraints::getNUC(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), Matrix::getRow(), SubjectTo::getStatus(), QProblemB::getStatus(), QProblemB::hessianType, HST_IDENTITY, HST_ZERO, TabularOutput::idxAddC, Constraints::moveInactiveToActive(), QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_NOTINITIALISED, QPS_SOLVED, QQ, real_t, RET_ADDCONSTRAINT_FAILED, RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, RET_ALL_CONSTRAINTS_ACTIVE, RET_CONSTRAINT_ALREADY_ACTIVE, RET_ENSURELI_DROPPED, RET_ENSURELI_FAILED, RET_ENSURELI_FAILED_CYCLING, RET_ENSURELI_FAILED_NOINDEX, RET_LI_RESOLVED, RET_UNKNOWN_BUG, RR, sizeT, ST_INACTIVE, SUCCESSFUL_RETURN, QProblemB::tabularOutput, THROWERROR, and TT.
Referenced by changeActiveSet(), removeBound(), removeConstraint(), and setupAuxiliaryWorkingSet().
returnValue QProblem::addConstraint_checkLI | ( | int | number | ) | [protected] |
Checks if new active constraint to be added is linearly dependent from from row of the active constraints matrix.
number | Number of constraint to be added to active set. |
References A, QProblemB::bounds, BT_FALSE, constraints, determineStepDirection(), Options::enableFullLITests, Options::epsLITests, getAbs(), Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), Constraints::getInactive(), getNAC(), getNC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), Matrix::getRow(), QProblemB::options, QQ, real_t, RET_LINEARLY_DEPENDENT, RET_LINEARLY_INDEPENDENT, and THROWINFO.
Referenced by addConstraint_ensureLI(), and setupAuxiliaryWorkingSet().
returnValue QProblem::addConstraint_ensureLI | ( | int | number, |
SubjectToStatus | C_status | ||
) | [protected] |
Ensures linear independence of constraint matrix when a new constraint is added. To this end a bound or constraint is removed simultaneously if necessary.
number | Number of constraint to be added to active set. |
C_status | Status of new active bound. |
References __FILE__, __FUNC__, __LINE__, A, addConstraint_checkLI(), backsolveT(), QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, dropInfeasibles(), Options::enableDropInfeasibles, Options::epsDen, Options::epsNum, TabularOutput::excRemB, TabularOutput::excRemC, Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getGlobalMessageHandler(), getNAC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), Matrix::getRow(), MAX_STRING_LENGTH, Options::maxDualJump, QProblemB::options, QProblemB::performRatioTest(), QQ, real_t, removeBound(), removeConstraint(), RET_ENSURELI_FAILED, RET_ENSURELI_FAILED_NOINDEX, RET_ENSURELI_FAILED_TQ, RET_INDEXLIST_CORRUPTED, RET_LI_RESOLVED, RET_LINEARLY_INDEPENDENT, RET_REMOVE_FROM_ACTIVESET, RET_REMOVE_FROM_ACTIVESET_FAILED, QProblemB::setInfeasibilityFlag(), ST_LOWER, SUCCESSFUL_RETURN, QProblemB::tabularOutput, THROWERROR, MessageHandling::throwInfo(), Matrix::transTimes(), VS_VISIBLE, and QProblemB::y.
Referenced by addConstraint().
void QProblemB::applyGivens | ( | real_t | c, |
real_t | s, | ||
real_t | nu, | ||
real_t | xold, | ||
real_t | yold, | ||
real_t & | xnew, | ||
real_t & | ynew | ||
) | const [inline, protected, inherited] |
Applies Givens matrix determined by c and s (cf. computeGivens).
c | Cosine entry of Givens matrix. |
s | Sine entry of Givens matrix. |
nu | Further factor: s/(1+c). |
xold | Matrix entry to be transformed corresponding to the normalised entry of the original matrix. |
yold | Matrix entry to be transformed corresponding to the annihilated entry of the original matrix. |
xnew | Output: Transformed matrix entry corresponding to the normalised entry of the original matrix. |
ynew | Output: Transformed matrix entry corresponding to the annihilated entry of the original matrix. |
Referenced by addBound(), QProblemB::addBound(), addConstraint(), removeBound(), and removeConstraint().
returnValue QProblemB::areBoundsConsistent | ( | const real_t *const | lb, |
const real_t *const | ub | ||
) | const [protected, inherited] |
Decides if lower bounds are smaller than upper bounds
lb | Vector of lower bounds |
ub | Vector of upper bounds |
References EPS, QProblemB::getNV(), RET_QP_INFEASIBLE, and SUCCESSFUL_RETURN.
Referenced by areBoundsConsistent(), and QProblemB::hotstart().
returnValue QProblem::areBoundsConsistent | ( | const real_t *const | lb, |
const real_t *const | ub, | ||
const real_t *const | lbA, | ||
const real_t *const | ubA | ||
) | const [protected] |
Decides if lower bounds are smaller than upper bounds
lb | Vector of lower bounds |
ub | Vector of upper bounds |
lbA | Vector of lower constraints |
ubA | Vector of upper constraints |
References QProblemB::areBoundsConsistent(), EPS, getNC(), RET_QP_INFEASIBLE, and SUCCESSFUL_RETURN.
Referenced by hotstart().
returnValue QProblemB::backsolveR | ( | const real_t *const | b, |
BooleanType | transposed, | ||
real_t *const | a | ||
) | const [protected, inherited] |
Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.
b | Right hand side vector. |
transposed | Indicates if the transposed system shall be solved. |
a | Output: Solution vector |
References BT_FALSE.
Referenced by determineStepDirection(), QProblemB::determineStepDirection(), removeBound(), QProblemB::removeBound(), and removeConstraint().
returnValue QProblemB::backsolveR | ( | const real_t *const | b, |
BooleanType | transposed, | ||
BooleanType | removingBound, | ||
real_t *const | a | ||
) | const [protected, inherited] |
Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.
Special variant for the case that this function is called from within "removeBound()".
b | Right hand side vector. |
transposed | Indicates if the transposed system shall be solved. |
removingBound | Indicates if function is called from "removeBound()". |
a | Output: Solution vector |
References BT_FALSE, BT_TRUE, getAbs(), QProblemB::getNV(), QProblemB::getNZ(), real_t, RET_DIV_BY_ZERO, RR, SUCCESSFUL_RETURN, THROWERROR, and ZERO.
returnValue QProblem::backsolveT | ( | const real_t *const | b, |
BooleanType | transposed, | ||
real_t *const | a | ||
) | const [protected] |
Solves the system Ta = b or T^Ta = b where T is a reverse upper triangular matrix.
b | Right hand side vector. |
transposed | Indicates if the transposed system shall be solved. |
a | Output: Solution vector |
References BT_FALSE, EPS, getAbs(), getNAC(), real_t, RET_DIV_BY_ZERO, sizeT, SUCCESSFUL_RETURN, THROWERROR, and TT.
Referenced by addBound_ensureLI(), addConstraint_ensureLI(), and determineStepDirection().
returnValue QProblem::changeActiveSet | ( | int | BC_idx, |
SubjectToStatus | BC_status, | ||
BooleanType | BC_isBound | ||
) | [protected] |
Updates the active set.
BC_idx | Index of blocking constraint. |
BC_status | Status of blocking constraint. |
BC_isBound | Indicates if blocking constraint is a bound. |
References __FILE__, __FUNC__, __LINE__, addBound(), addConstraint(), BT_TRUE, Options::enableNZCTests, getGlobalMessageHandler(), QProblemB::getNV(), MAX_STRING_LENGTH, QProblemB::options, removeBound(), removeConstraint(), RET_ADD_TO_ACTIVESET, RET_ADD_TO_ACTIVESET_FAILED, RET_ADDBOUND_FAILED_INFEASIBILITY, RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, RET_REMOVE_FROM_ACTIVESET, RET_REMOVE_FROM_ACTIVESET_FAILED, ST_INACTIVE, ST_LOWER, ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, MessageHandling::throwInfo(), VS_VISIBLE, and QProblemB::y.
Referenced by solveQP().
returnValue QProblem::clear | ( | ) | [protected] |
Frees all allocated memory.
Reimplemented from QProblemB.
References A, Ax, Ax_l, Ax_u, BT_TRUE, delta_xFRy, delta_xFRz, delta_yAC_TMP, freeConstraintMatrix, lbA, Q, SUCCESSFUL_RETURN, T, tempA, tempB, ubA, and ZFR_delta_xFRz.
Referenced by operator=(), and ~QProblem().
returnValue QProblemB::computeCholesky | ( | ) | [protected, inherited] |
Computes the Cholesky decomposition of the (simply projected) Hessian (i.e. R^T*R = Z^T*H*Z). It only works in the case where Z is a simple projection matrix! Note: If Hessian turns out not to be positive definite, the Hessian type is set to HST_SEMIDEF accordingly.
References QProblemB::bounds, BT_TRUE, Options::epsRegularisation, getAbs(), Matrix::getCol(), Bounds::getFree(), getMin(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), getSqrt(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_SEMIDEF, HST_ZERO, QProblemB::options, POTRF, QProblemB::R, QProblemB::regVal, RET_CHOLESKY_OF_ZERO_HESSIAN, RET_HESSIAN_NOT_SPD, RR, SUCCESSFUL_RETURN, THROWERROR, and QProblemB::usingRegularisation().
Referenced by computeProjectedCholesky(), QProblemB::setupAuxiliaryQP(), QProblemB::setupInitialCholesky(), and QProblemB::solveQP().
void QProblemB::computeGivens | ( | real_t | xold, |
real_t | yold, | ||
real_t & | xnew, | ||
real_t & | ynew, | ||
real_t & | c, | ||
real_t & | s | ||
) | const [inline, protected, inherited] |
Computes parameters for the Givens matrix G for which [x,y]*G = [z,0]
xold | Matrix entry to be normalised. |
yold | Matrix entry to be annihilated. |
xnew | Output: Normalised matrix entry. |
ynew | Output: Annihilated matrix entry. |
c | Output: Cosine entry of Givens matrix. |
s | Output: Sine entry of Givens matrix. |
References BT_TRUE, getAbs(), getSqrt(), isZero(), and real_t.
Referenced by addBound(), QProblemB::addBound(), addConstraint(), removeBound(), and removeConstraint().
returnValue QProblem::computeProjectedCholesky | ( | ) | [protected] |
Computes the Cholesky decomposition of the projected Hessian (i.e. R^T*R = Z^T*H*Z). Note: If Hessian turns out not to be positive definite, the Hessian type is set to HST_SEMIDEF accordingly.
References SymmetricMatrix::bilinear(), SymSparseMat::bilinear(), QProblemB::bounds, BT_TRUE, QProblemB::computeCholesky(), constraints, QProblemB::createDiagSparseMat(), Options::epsRegularisation, getAbs(), Constraints::getActive(), Matrix::getCol(), Bounds::getFree(), getMin(), getNAC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), getSqrt(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_SEMIDEF, HST_ZERO, QProblemB::options, POTRF, Q, QQ, QProblemB::R, QProblemB::regVal, RET_HESSIAN_NOT_SPD, RET_UNKNOWN_BUG, RR, SUCCESSFUL_RETURN, THROWERROR, and QProblemB::usingRegularisation().
Referenced by setupAuxiliaryQP(), setupInitialCholesky(), SQProblem::setupNewAuxiliaryQP(), and solveQP().
returnValue QProblem::copy | ( | const QProblem & | rhs | ) | [protected] |
Copies all members from given rhs object.
rhs | Rhs object. |
References A, Ax, Ax_l, Ax_u, BT_TRUE, constraintProduct, constraints, delta_xFRy, delta_xFRz, delta_yAC_TMP, Matrix::duplicate(), freeConstraintMatrix, getNC(), QProblemB::getNV(), lbA, Q, real_t, setLBA(), setUBA(), sizeT, SUCCESSFUL_RETURN, T, tempA, tempB, ubA, QProblemB::y, and ZFR_delta_xFRz.
Referenced by operator=(), and QProblem().
returnValue QProblemB::copy | ( | const QProblemB & | rhs | ) | [protected, inherited] |
Copies all members from given rhs object.
rhs | Rhs object. |
References QProblemB::bounds, BT_TRUE, QProblemB::count, QProblemB::delta_xFR_TMP, SymmetricMatrix::duplicateSym(), QProblemB::flipper, QProblemB::freeHessian, QProblemB::g, QProblemB::getNV(), QProblemB::H, QProblemB::haveCholesky, QProblemB::hessianType, QProblemB::infeasible, QProblemB::lb, QProblemB::options, Options::printLevel, QProblemB::R, QProblemB::ramp0, QProblemB::ramp1, real_t, QProblemB::regVal, QProblemB::setG(), QProblemB::setLB(), QProblemB::setPrintLevel(), QProblemB::setUB(), QProblemB::status, SUCCESSFUL_RETURN, QProblemB::tau, QProblemB::ub, QProblemB::unbounded, QProblemB::x, and QProblemB::y.
Referenced by QProblemB::operator=(), and QProblemB::QProblemB().
SymSparseMat * QProblemB::createDiagSparseMat | ( | int | n, |
real_t | diagVal = 1.0 |
||
) | [protected, inherited] |
Creates a sparse diagonal (square-)matrix which is a given multiple of the identity matrix.
n | Row/column dimension of matrix to be created. |
diagVal | Value of all diagonal entries. |
References SparseMatrix::createDiagInfo(), Matrix::doFreeMemory(), real_t, and sparse_int_t.
Referenced by computeProjectedCholesky().
returnValue QProblemB::determineDataShift | ( | const real_t *const | g_new, |
const real_t *const | lb_new, | ||
const real_t *const | ub_new, | ||
real_t *const | delta_g, | ||
real_t *const | delta_lb, | ||
real_t *const | delta_ub, | ||
BooleanType & | Delta_bB_isZero | ||
) | [protected, inherited] |
Determines step direction of the shift of the QP data.
g_new | New gradient vector. |
lb_new | New lower bounds. |
ub_new | New upper bounds. |
delta_g | Output: Step direction of gradient vector. |
delta_lb | Output: Step direction of lower bounds. |
delta_ub | Output: Step direction of upper bounds. |
Delta_bB_isZero | Output: Indicates if active bounds are to be shifted. |
References QProblemB::bounds, BT_FALSE, BT_TRUE, EPS, QProblemB::g, getAbs(), Bounds::getFixed(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), INFTY, QProblemB::lb, SUCCESSFUL_RETURN, and QProblemB::ub.
Referenced by QProblemB::solveQP().
returnValue QProblem::determineDataShift | ( | const real_t *const | g_new, |
const real_t *const | lbA_new, | ||
const real_t *const | ubA_new, | ||
const real_t *const | lb_new, | ||
const real_t *const | ub_new, | ||
real_t *const | delta_g, | ||
real_t *const | delta_lbA, | ||
real_t *const | delta_ubA, | ||
real_t *const | delta_lb, | ||
real_t *const | delta_ub, | ||
BooleanType & | Delta_bC_isZero, | ||
BooleanType & | Delta_bB_isZero | ||
) | [protected] |
Determines step direction of the shift of the QP data.
g_new | New gradient vector. |
lbA_new | New lower constraints' bounds. |
ubA_new | New upper constraints' bounds. |
lb_new | New lower bounds. |
ub_new | New upper bounds. |
delta_g | Output: Step direction of gradient vector. |
delta_lbA | Output: Step direction of lower constraints' bounds. |
delta_ubA | Output: Step direction of upper constraints' bounds. |
delta_lb | Output: Step direction of lower bounds. |
delta_ub | Output: Step direction of upper bounds. |
Delta_bC_isZero | Output: Indicates if active constraints' bounds are to be shifted. |
Delta_bB_isZero | Output: Indicates if active bounds are to be shifted. |
References BT_FALSE, BT_TRUE, constraints, EPS, getAbs(), Constraints::getActive(), getNAC(), getNC(), Indexlist::getNumberArray(), INFTY, lbA, SUCCESSFUL_RETURN, and ubA.
Referenced by solveQP().
returnValue QProblemB::determineHessianType | ( | ) | [protected, inherited] |
If Hessian type has been set by the user, nothing is done. Otherwise the Hessian type is set to HST_IDENTITY, HST_ZERO, or HST_POSDEF (default), respectively.
References BT_FALSE, BT_TRUE, Matrix::diag(), Options::enableFlippingBounds, Options::enableRegularisation, EPS, getAbs(), QProblemB::getNV(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_INDEF, HST_POSDEF, HST_POSDEF_NULLSPACE, HST_SEMIDEF, HST_ZERO, INFTY, Matrix::isDiag(), isZero(), Options::numRegularisationSteps, QProblemB::options, real_t, RET_DIAGONAL_NOT_INITIALISED, RET_HESSIAN_INDEFINITE, RET_ZERO_HESSIAN_ASSUMED, SUCCESSFUL_RETURN, THROWERROR, THROWINFO, and ZERO.
Referenced by SQProblem::setupNewAuxiliaryQP(), solveInitialQP(), and QProblemB::solveInitialQP().
returnValue QProblem::determineStepDirection | ( | const real_t *const | delta_g, |
const real_t *const | delta_lbA, | ||
const real_t *const | delta_ubA, | ||
const real_t *const | delta_lb, | ||
const real_t *const | delta_ub, | ||
BooleanType | Delta_bC_isZero, | ||
BooleanType | Delta_bB_isZero, | ||
real_t *const | delta_xFX, | ||
real_t *const | delta_xFR, | ||
real_t *const | delta_yAC, | ||
real_t *const | delta_yFX | ||
) | [protected] |
Determines step direction of the homotopy path.
delta_g | Step direction of gradient vector. |
delta_lbA | Step direction of lower constraints' bounds. |
delta_ubA | Step direction of upper constraints' bounds. |
delta_lb | Step direction of lower bounds. |
delta_ub | Step direction of upper bounds. |
Delta_bC_isZero | Indicates if active constraints' bounds are to be shifted. |
Delta_bB_isZero | Indicates if active bounds are to be shifted. |
delta_xFX | Output: Primal homotopy step direction of fixed variables. |
delta_xFR | Output: Primal homotopy step direction of free variables. |
delta_yAC | Output: Dual homotopy step direction of active constraints' multiplier. |
delta_yFX | Output: Dual homotopy step direction of fixed variables' multiplier. |
References A, QProblemB::backsolveR(), backsolveT(), QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, QProblemB::delta_xFR_TMP, delta_xFRy, delta_xFRz, delta_yAC_TMP, Options::epsIterRef, getAbs(), Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getNAC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), SubjectTo::getStatus(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, Options::numRefinementSteps, QProblemB::options, QQ, real_t, QProblemB::regVal, RET_STEPDIRECTION_FAILED_CHOLESKY, RET_STEPDIRECTION_FAILED_TQ, RET_UNKNOWN_BUG, ST_LOWER, SUCCESSFUL_RETURN, tempA, tempB, THROWERROR, Matrix::times(), Matrix::transTimes(), QProblemB::usingRegularisation(), and ZFR_delta_xFRz.
Referenced by addBound_checkLI(), addConstraint_checkLI(), ensureNonzeroCurvature(), SolutionAnalysis::getVarianceCovariance(), solveCurrentEQP(), and solveQP().
returnValue QProblem::dropInfeasibles | ( | int | BC_number, |
SubjectToStatus | BC_status, | ||
BooleanType | BC_isBound, | ||
real_t * | xiB, | ||
real_t * | xiC | ||
) | [protected] |
Drops the blocking bound/constraint that led to infeasibility, or finds another bound/constraint to drop according to drop priorities.
BC_number | Number of the bound or constraint to be added. |
BC_status | New status of the bound or constraint to be added. |
BC_isBound | Whether a bound or a constraint is to be added. |
xiB | (not yet documented) |
xiC | (not yet documented) |
References QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, Options::dropBoundPriority, Options::dropEqConPriority, Options::dropIneqConPriority, Options::epsDen, getAbs(), Constraints::getActive(), Bounds::getFixed(), getNAC(), QProblemB::getNFX(), Indexlist::getNumberArray(), SubjectTo::getStatus(), SubjectTo::getType(), QProblemB::options, removeBound(), removeConstraint(), RET_ENSURELI_DROPPED, SubjectTo::setStatus(), ST_BOUNDED, ST_EQUALITY, ST_INFEASIBLE_LOWER, ST_INFEASIBLE_UPPER, ST_LOWER, and SUCCESSFUL_RETURN.
Referenced by addBound_ensureLI(), and addConstraint_ensureLI().
returnValue QProblem::ensureNonzeroCurvature | ( | BooleanType | removeBoundNotConstraint, |
int | remIdx, | ||
BooleanType & | exchangeHappened, | ||
BooleanType & | addBoundNotConstraint, | ||
int & | addIdx, | ||
SubjectToStatus & | addStatus | ||
) | [protected] |
Ensure non-zero curvature by primal jump.
removeBoundNotConstraint | SubjectTo to be removed is a bound. |
remIdx | Index of bound/constraint to be removed. |
exchangeHappened | Output: Exchange was necessary to ensure. |
addBoundNotConstraint | SubjectTo to be added is a bound. |
addIdx | Index of bound/constraint to be added. |
addStatus | Status of bound/constraint to be added. |
References A, Ax, Ax_l, Ax_u, QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, determineStepDirection(), Options::epsDen, Options::epsNum, Options::epsNZCTests, getAbs(), Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), Constraints::getInactive(), getMax(), getNAC(), getNC(), QProblemB::getNFR(), QProblemB::getNFX(), getNIAC(), Indexlist::getNumberArray(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::lb, lbA, Options::maxPrimalJump, QProblemB::options, performPlainRatioTest(), real_t, RET_HOTSTART_STOPPED_UNBOUNDEDNESS, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, Matrix::times(), QProblemB::ub, ubA, QProblemB::unbounded, and QProblemB::x.
Referenced by removeBound(), and removeConstraint().
BEGIN_NAMESPACE_QPOASES returnValue QProblemB::getBounds | ( | Bounds & | _bounds | ) | const [inline, inherited] |
Returns current bounds object of the QP (deep copy).
_bounds | Output: Bounds object. |
References QProblemB::bounds, QProblemB::getNV(), RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.
BEGIN_NAMESPACE_QPOASES returnValue QProblem::getConstraints | ( | Constraints & | _constraints | ) | const [inline] |
Returns current constraints object of the QP (deep copy).
_constraints | Output: Constraints object. |
References constraints, QProblemB::getNV(), RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.
unsigned int QProblemB::getCount | ( | ) | const [inline, inherited] |
Returns the current number of QP problems solved.
References QProblemB::count.
returnValue QProblem::getDualSolution | ( | real_t *const | yOpt | ) | const [virtual] |
Returns the dual solution vector (deep copy).
yOpt | Output: Dual solution vector (if QP has been solved). |
Reimplemented from QProblemB.
References getNC(), QProblemB::getNV(), QProblemB::getStatus(), QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_SOLVED, RET_QP_NOT_SOLVED, SUCCESSFUL_RETURN, and QProblemB::y.
Referenced by main(), and solveOQPbenchmark().
HessianType QProblemB::getHessianType | ( | ) | const [inline, inherited] |
Returns Hessian type flag (type is not determined due to this call!).
References QProblemB::hessianType.
Referenced by SolutionAnalysis::getKktViolation().
int QProblem::getNAC | ( | ) | const [inline] |
Returns the number of active constraints.
References constraints, and Constraints::getNAC().
Referenced by addBound(), addBound_checkLI(), addBound_ensureLI(), addConstraint(), addConstraint_checkLI(), addConstraint_ensureLI(), backsolveT(), computeProjectedCholesky(), determineDataShift(), determineStepDirection(), dropInfeasibles(), ensureNonzeroCurvature(), getNZ(), SolutionAnalysis::getVarianceCovariance(), performStep(), printIteration(), removeBound(), removeConstraint(), solveCurrentEQP(), and writeQpWorkspaceIntoMatFile().
int QProblem::getNC | ( | ) | const [inline] |
Returns the number of constraints.
References constraints, and Constraints::getNC().
Referenced by addBound_checkLI(), addConstraint_checkLI(), areBoundsConsistent(), copy(), determineDataShift(), ensureNonzeroCurvature(), getDualSolution(), SolutionAnalysis::getKktViolation(), getRelativeHomotopyLength(), SolutionAnalysis::getVarianceCovariance(), getWorkingSetConstraints(), SQProblem::hotstart(), hotstart(), init(), loadQPvectorsFromFile(), obtainAuxiliaryWorkingSet(), performDriftCorrection(), performRamping(), performStep(), printIteration(), printProperties(), reset(), setA(), setLBA(), setUBA(), setupAuxiliaryQP(), setupAuxiliaryQPbounds(), setupAuxiliaryQPgradient(), setupAuxiliaryQPsolution(), setupAuxiliaryWorkingSet(), SQProblem::setupNewAuxiliaryQP(), setupQPdata(), setupQPdataFromFile(), setupSubjectToType(), shallRefactorise(), solveCurrentEQP(), solveInitialQP(), solveQP(), updateFarBounds(), writeQpDataIntoMatFile(), and writeQpWorkspaceIntoMatFile().
int QProblem::getNEC | ( | ) | const [inline] |
Returns the number of (implicitly defined) equality constraints.
References constraints, and Constraints::getNEC().
Referenced by printProperties().
int QProblemB::getNFR | ( | ) | const [inline, inherited] |
Returns the number of free variables.
References QProblemB::bounds, and Bounds::getNFR().
Referenced by addBound(), QProblemB::addBound(), addBound_checkLI(), addConstraint(), addConstraint_checkLI(), addConstraint_ensureLI(), QProblemB::computeCholesky(), computeProjectedCholesky(), determineStepDirection(), QProblemB::determineStepDirection(), ensureNonzeroCurvature(), QProblemB::getNZ(), getNZ(), SolutionAnalysis::getVarianceCovariance(), performStep(), QProblemB::performStep(), removeBound(), QProblemB::removeBound(), removeConstraint(), QProblemB::setupInitialCholesky(), setupInitialCholesky(), setupTQfactorisation(), solveCurrentEQP(), and writeQpWorkspaceIntoMatFile().
int QProblemB::getNFV | ( | ) | const [inline, inherited] |
Returns the number of implicitly fixed variables.
References QProblemB::bounds, and Bounds::getNFV().
Referenced by QProblemB::setupInitialCholesky(), and setupInitialCholesky().
int QProblemB::getNFX | ( | ) | const [inline, inherited] |
Returns the number of fixed variables.
References QProblemB::bounds, and Bounds::getNFX().
Referenced by addBound_checkLI(), addBound_ensureLI(), addConstraint_checkLI(), addConstraint_ensureLI(), computeProjectedCholesky(), QProblemB::determineDataShift(), determineStepDirection(), QProblemB::determineStepDirection(), dropInfeasibles(), ensureNonzeroCurvature(), SolutionAnalysis::getVarianceCovariance(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), solveCurrentEQP(), and writeQpWorkspaceIntoMatFile().
int QProblem::getNIAC | ( | ) | const [inline] |
Returns the number of inactive constraints.
References constraints, and Constraints::getNIAC().
Referenced by ensureNonzeroCurvature(), performStep(), and writeQpWorkspaceIntoMatFile().
int QProblemB::getNV | ( | ) | const [inline, inherited] |
Returns the number of variables.
References QProblemB::bounds, and Bounds::getNV().
Referenced by addBound(), QProblemB::addBound(), addBound_checkLI(), addBound_ensureLI(), addConstraint(), addConstraint_checkLI(), addConstraint_ensureLI(), QProblemB::areBoundsConsistent(), QProblemB::backsolveR(), changeActiveSet(), QProblemB::computeCholesky(), computeProjectedCholesky(), copy(), QProblemB::copy(), QProblemB::determineDataShift(), QProblemB::determineHessianType(), determineStepDirection(), ensureNonzeroCurvature(), QProblemB::getBounds(), getConstraints(), QProblemB::getDualSolution(), getDualSolution(), SolutionAnalysis::getKktViolation(), QProblemB::getObjVal(), QProblemB::getPrimalSolution(), QProblemB::getRelativeHomotopyLength(), SolutionAnalysis::getVarianceCovariance(), getWorkingSet(), QProblemB::getWorkingSetBounds(), SQProblem::hotstart(), QProblemB::hotstart(), hotstart(), QProblemB::init(), init(), QProblemB::loadQPvectorsFromFile(), QProblemB::obtainAuxiliaryWorkingSet(), obtainAuxiliaryWorkingSet(), performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), performRamping(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), printProperties(), QProblemB::printProperties(), QProblemB::regulariseHessian(), removeBound(), QProblemB::removeBound(), removeConstraint(), reset(), QProblemB::reset(), setA(), QProblemB::setG(), QProblemB::setH(), QProblemB::setLB(), setLBA(), QProblemB::setUB(), setUBA(), setupAuxiliaryQP(), QProblemB::setupAuxiliaryQP(), setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), setupAuxiliaryQPsolution(), QProblemB::setupAuxiliaryQPsolution(), setupAuxiliaryWorkingSet(), QProblemB::setupAuxiliaryWorkingSet(), QProblemB::setupInitialCholesky(), setupInitialCholesky(), SQProblem::setupNewAuxiliaryQP(), QProblemB::setupQPdataFromFile(), setupQPdataFromFile(), QProblemB::setupSubjectToType(), setupTQfactorisation(), shallRefactorise(), QProblemB::shallRefactorise(), solveCurrentEQP(), solveInitialQP(), QProblemB::solveInitialQP(), solveQP(), QProblemB::solveQP(), solveRegularisedQP(), QProblemB::solveRegularisedQP(), QProblemB::updateFarBounds(), updateFarBounds(), writeQpDataIntoMatFile(), and writeQpWorkspaceIntoMatFile().
int QProblem::getNZ | ( | ) | const [virtual] |
Returns the dimension of null space.
Reimplemented from QProblemB.
References getNAC(), and QProblemB::getNFR().
Referenced by addBound(), addBound_checkLI(), addBound_ensureLI(), addConstraint(), addConstraint_checkLI(), addConstraint_ensureLI(), computeProjectedCholesky(), determineStepDirection(), removeBound(), and removeConstraint().
real_t QProblemB::getObjVal | ( | ) | const [inherited] |
Returns the optimal objective function value.
References QProblemB::getStatus(), INFTY, QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_SOLVED, real_t, and QProblemB::x.
Referenced by main().
real_t QProblemB::getObjVal | ( | const real_t *const | _x | ) | const [inherited] |
Returns the objective function value at an arbitrary point x.
_x | Point at which the objective function shall be evaluated. |
References BT_TRUE, QProblemB::g, QProblemB::getNV(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, real_t, QProblemB::regVal, Matrix::times(), and QProblemB::usingRegularisation().
Options QProblemB::getOptions | ( | ) | const [inline, inherited] |
returnValue QProblemB::getPrimalSolution | ( | real_t *const | xOpt | ) | const [inherited] |
Returns the primal solution vector.
xOpt | Output: Primal solution vector (if QP has been solved). |
References QProblemB::getNV(), QProblemB::getStatus(), QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_SOLVED, RET_QP_NOT_SOLVED, SUCCESSFUL_RETURN, and QProblemB::x.
Referenced by main(), and solveOQPbenchmark().
PrintLevel QProblemB::getPrintLevel | ( | ) | const [inline, inherited] |
Returns the print level.
References QProblemB::options, and Options::printLevel.
real_t QProblemB::getRelativeHomotopyLength | ( | const real_t *const | g_new, |
const real_t *const | lb_new, | ||
const real_t *const | ub_new | ||
) | [protected, inherited] |
Compute relative length of homotopy in data space for termination criterion.
g_new | Final gradient. |
lb_new | Final lower variable bounds. |
ub_new | Final upper variable bounds. |
References QProblemB::g, getAbs(), QProblemB::getNV(), QProblemB::lb, real_t, and QProblemB::ub.
Referenced by QProblemB::solveQP().
real_t QProblem::getRelativeHomotopyLength | ( | const real_t *const | g_new, |
const real_t *const | lb_new, | ||
const real_t *const | ub_new, | ||
const real_t *const | lbA_new, | ||
const real_t *const | ubA_new | ||
) | [protected] |
Compute relative length of homotopy in data space for termination criterion.
g_new | Final gradient. |
lb_new | Final lower variable bounds. |
ub_new | Final upper variable bounds. |
lbA_new | Final lower constraint bounds. |
ubA_new | Final upper constraint bounds. |
References getAbs(), getNC(), lbA, real_t, stdFile, and ubA.
Referenced by solveQP().
QProblemStatus QProblemB::getStatus | ( | ) | const [inline, inherited] |
Returns status of the solution process.
References QProblemB::status.
Referenced by addBound(), QProblemB::addBound(), addConstraint(), QProblemB::getDualSolution(), getDualSolution(), QProblemB::getObjVal(), QProblemB::getPrimalSolution(), SQProblem::hotstart(), removeBound(), QProblemB::removeBound(), removeConstraint(), SQProblem::setupNewAuxiliaryQP(), solveQP(), and QProblemB::solveQP().
returnValue QProblem::getWorkingSet | ( | real_t * | workingSet | ) | [virtual] |
Writes a vector with the state of the working set
workingSet | Output: array containing state of the working set. |
Reimplemented from QProblemB.
References QProblemB::getNV(), getWorkingSetBounds(), getWorkingSetConstraints(), RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.
returnValue QProblem::getWorkingSetBounds | ( | real_t * | workingSetB | ) | [virtual] |
Writes a vector with the state of the working set of bounds
workingSetB | Output: array containing state of the working set of bounds. |
Reimplemented from QProblemB.
Referenced by SolutionAnalysis::getKktViolation(), and getWorkingSet().
returnValue QProblem::getWorkingSetConstraints | ( | real_t * | workingSetC | ) | [virtual] |
Writes a vector with the state of the working set of constraints
workingSetC | Output: array containing state of the working set of constraints. |
Reimplemented from QProblemB.
References constraints, getNC(), SubjectTo::getStatus(), RET_INVALID_ARGUMENTS, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by SolutionAnalysis::getKktViolation(), and getWorkingSet().
returnValue QProblemB::hotstart | ( | const real_t *const | g_new, |
const real_t *const | lb_new, | ||
const real_t *const | ub_new, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const Bounds *const | guessedBounds = 0 |
||
) | [inherited] |
Solves an initialised QP sequence using the online active set strategy. By default, QP solution is started from previous solution. If a guess for the working set is provided, an initialised homotopy is performed.
Note: This function internally calls solveQP/solveRegularisedQP for solving an initialised QP!
g_new | Gradient of neighbouring QP to be solved. |
lb_new | Lower bounds of neighbouring QP to be solved. If no lower bounds exist, a NULL pointer can be passed. |
ub_new | Upper bounds of neighbouring QP to be solved. If no upper bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations; Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP solution. Output: CPU time spent for QP solution (or to perform nWSR iterations). |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, the previous working set is kept!) |
References QProblemB::areBoundsConsistent(), Options::boundTolerance, BT_FALSE, BT_TRUE, QProblemB::count, Options::enableFarBounds, getAbs(), getCPUtime(), QProblemB::getNV(), Options::growFarBounds, QProblemB::haveCholesky, QProblemB::infeasible, INFTY, Options::initialFarBounds, QProblemB::options, QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_SOLVED, QProblemB::rampOffset, real_t, RET_HOTSTART_STOPPED_INFEASIBILITY, RET_HOTSTART_STOPPED_UNBOUNDEDNESS, RET_QPOBJECT_NOT_SETUP, RET_SETUP_AUXILIARYQP_FAILED, QProblemB::setInfeasibilityFlag(), QProblemB::setupAuxiliaryQP(), QProblemB::setupInitialCholesky(), QProblemB::solveRegularisedQP(), QProblemB::status, SUCCESSFUL_RETURN, THROWERROR, QProblemB::unbounded, QProblemB::updateFarBounds(), and QProblemB::x.
Referenced by QProblemB::hotstart(), main(), QProblemB::solveInitialQP(), and solveOQPbenchmark().
returnValue QProblem::hotstart | ( | const real_t *const | g_new, |
const real_t *const | lb_new, | ||
const real_t *const | ub_new, | ||
const real_t *const | lbA_new, | ||
const real_t *const | ubA_new, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const Constraints *const | guessedConstraints = 0 |
||
) |
Solves an initialised QP sequence using the online active set strategy. By default, QP solution is started from previous solution. If a guess for the working set is provided, an initialised homotopy is performed.
Note: This function internally calls solveQP/solveRegularisedQP for solving an initialised QP!
g_new | Gradient of neighbouring QP to be solved. |
lb_new | Lower bounds of neighbouring QP to be solved. If no lower bounds exist, a NULL pointer can be passed. |
ub_new | Upper bounds of neighbouring QP to be solved. If no upper bounds exist, a NULL pointer can be passed. |
lbA_new | Lower constraints' bounds of neighbouring QP to be solved. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_new | Upper constraints' bounds of neighbouring QP to be solved. If no upper constraints' bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations; Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP solution. Output: CPU time spent for QP solution (or to perform nWSR iterations). |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, the previous working set of bounds is kept!) |
guessedConstraints | Optimal working set of constraints for solution (xOpt,yOpt). (If a null pointer is passed, the previous working set of constraints is kept!) |
Reimplemented in SQProblem.
References areBoundsConsistent(), Ax, QProblemB::bounds, Options::boundTolerance, BT_FALSE, BT_TRUE, constraints, QProblemB::count, Options::enableFarBounds, getAbs(), getCPUtime(), getNC(), QProblemB::getNV(), Options::growFarBounds, QProblemB::haveCholesky, QProblemB::infeasible, INFTY, Options::initialFarBounds, QProblemB::options, QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_SOLVED, QProblemB::rampOffset, real_t, RET_HOTSTART_STOPPED_INFEASIBILITY, RET_HOTSTART_STOPPED_UNBOUNDEDNESS, RET_QPOBJECT_NOT_SETUP, RET_SETUP_AUXILIARYQP_FAILED, QProblemB::setInfeasibilityFlag(), setupAuxiliaryQP(), setupInitialCholesky(), solveRegularisedQP(), QProblemB::status, SUCCESSFUL_RETURN, THROWERROR, QProblemB::unbounded, updateFarBounds(), and QProblemB::x.
Referenced by hotstart(), main(), solveInitialQP(), and solveOQPbenchmark().
returnValue QProblemB::hotstart | ( | const char *const | g_file, |
const char *const | lb_file, | ||
const char *const | ub_file, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const Bounds *const | guessedBounds = 0 |
||
) | [inherited] |
Solves an initialised QP sequence using the online active set strategy, where QP data is read from files. By default, QP solution is started from previous solution. If a guess for the working set is provided, an initialised homotopy is performed.
Note: This function internally calls solveQP/solveRegularisedQP for solving an initialised QP!
g_file | Name of file where gradient, of neighbouring QP to be solved, is stored. |
lb_file | Name of file where lower bounds, of neighbouring QP to be solved, is stored. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bounds, of neighbouring QP to be solved, is stored. If no upper bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations; Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP solution. Output: CPU time spent for QP solution (or to perform nWSR iterations). |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, the previous working set is kept!) |
References QProblemB::getNV(), QProblemB::hotstart(), QProblemB::loadQPvectorsFromFile(), real_t, RET_INVALID_ARGUMENTS, RET_QPOBJECT_NOT_SETUP, RET_UNABLE_TO_READ_FILE, SUCCESSFUL_RETURN, and THROWERROR.
returnValue QProblem::hotstart | ( | const char *const | g_file, |
const char *const | lb_file, | ||
const char *const | ub_file, | ||
const char *const | lbA_file, | ||
const char *const | ubA_file, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const Constraints *const | guessedConstraints = 0 |
||
) |
Solves an initialised QP sequence using the online active set strategy, where QP data is read from files. By default, QP solution is started from previous solution. If a guess for the working set is provided, an initialised homotopy is performed.
Note: This function internally calls solveQP/solveRegularisedQP for solving an initialised QP!
g_file | Name of file where gradient, of neighbouring QP to be solved, is stored. |
lb_file | Name of file where lower bounds, of neighbouring QP to be solved, is stored. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bounds, of neighbouring QP to be solved, is stored. If no upper bounds exist, a NULL pointer can be passed. |
lbA_file | Name of file where lower constraints' bounds, of neighbouring QP to be solved, is stored. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_file | Name of file where upper constraints' bounds, of neighbouring QP to be solved, is stored. If no upper constraints' bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations; Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP solution. Output: CPU time spent for QP solution (or to perform nWSR iterations). |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, the previous working set of bounds is kept!) |
guessedConstraints | Optimal working set of constraints for solution (xOpt,yOpt). (If a null pointer is passed, the previous working set of constraints is kept!) |
Reimplemented in SQProblem.
References getNC(), QProblemB::getNV(), hotstart(), loadQPvectorsFromFile(), real_t, RET_INVALID_ARGUMENTS, RET_QPOBJECT_NOT_SETUP, RET_UNABLE_TO_READ_FILE, SUCCESSFUL_RETURN, and THROWERROR.
returnValue QProblemB::init | ( | SymmetricMatrix * | _H, |
const real_t *const | _g, | ||
const real_t *const | _lb, | ||
const real_t *const | _ub, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const real_t *const | xOpt = 0 , |
||
const real_t *const | yOpt = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const real_t *const | _R = 0 |
||
) | [inherited] |
Initialises a simply bounded QP problem with given QP data and tries to solve it using at most nWSR iterations. Depending on the parameter constellation it:
1. 0, 0, 0 : starts with xOpt = 0, yOpt = 0 and gB empty (or all implicit equality bounds),
2. xOpt, 0, 0 : starts with xOpt, yOpt = 0 and obtain gB by "clipping",
3. 0, yOpt, 0 : starts with xOpt = 0, yOpt and obtain gB from yOpt != 0,
4. 0, 0, gB: starts with xOpt = 0, yOpt = 0 and gB,
5. xOpt, yOpt, 0 : starts with xOpt, yOpt and obtain gB from yOpt != 0,
6. xOpt, 0, gB: starts with xOpt, yOpt = 0 and gB,
7. xOpt, yOpt, gB: starts with xOpt, yOpt and gB (assume them to be consistent!)
Note: This function internally calls solveInitialQP for initialisation!
_H | Hessian matrix (a shallow copy is made). |
_g | Gradient vector. |
_lb | Lower bounds (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bounds (on variables). If no upper bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP initialisation. Output: CPU time spent for QP initialisation (if pointer passed). |
xOpt | Optimal primal solution vector. A NULL pointer can be passed. (If a null pointer is passed, the old primal solution is kept!) |
yOpt | Optimal dual solution vector. A NULL pointer can be passed. (If a null pointer is passed, the old dual solution is kept!) |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, all bounds are assumed inactive!) |
_R | Pre-computed (upper triangular) Cholesky factor of Hessian matrix. The Cholesky factor must be stored in a real_t array of size nV*nV in row-major format. Note: Only used if xOpt/yOpt and gB are NULL! (If a null pointer is passed, Cholesky decomposition is computed internally!) |
References BT_TRUE, QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), QProblemB::reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, QProblemB::setupQPdata(), QProblemB::solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.
Referenced by main(), and solveOQPbenchmark().
returnValue QProblem::init | ( | SymmetricMatrix * | _H, |
const real_t *const | _g, | ||
Matrix * | _A, | ||
const real_t *const | _lb, | ||
const real_t *const | _ub, | ||
const real_t *const | _lbA, | ||
const real_t *const | _ubA, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const real_t *const | xOpt = 0 , |
||
const real_t *const | yOpt = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const Constraints *const | guessedConstraints = 0 , |
||
const real_t *const | _R = 0 |
||
) |
Initialises a QP problem with given QP data and tries to solve it using at most nWSR iterations. Depending on the parameter constellation it:
1. 0, 0, 0 : starts with xOpt = 0, yOpt = 0 and gB/gC empty (or all implicit equality bounds),
2. xOpt, 0, 0 : starts with xOpt, yOpt = 0 and obtain gB/gC by "clipping",
3. 0, yOpt, 0 : starts with xOpt = 0, yOpt and obtain gB/gC from yOpt != 0,
4. 0, 0, gB/gC: starts with xOpt = 0, yOpt = 0 and gB/gC,
5. xOpt, yOpt, 0 : starts with xOpt, yOpt and obtain gB/gC from yOpt != 0,
6. xOpt, 0, gB/gC: starts with xOpt, yOpt = 0 and gB/gC,
7. xOpt, yOpt, gB/gC: starts with xOpt, yOpt and gB/gC (assume them to be consistent!)
Note: This function internally calls solveInitialQP for initialisation!
_H | Hessian matrix (a shallow copy is made). |
_g | Gradient vector. |
_A | Constraint matrix (a shallow copy is made). |
_lb | Lower bound vector (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bound vector (on variables). If no upper bounds exist, a NULL pointer can be passed. |
_lbA | Lower constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
_ubA | Upper constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP initialisation. Output: CPU time spent for QP initialisation (if pointer passed). |
xOpt | Optimal primal solution vector. (If a null pointer is passed, the old primal solution is kept!) |
yOpt | Optimal dual solution vector. (If a null pointer is passed, the old dual solution is kept!) |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, all bounds are assumed inactive!) |
guessedConstraints | Optimal working set of constraints for solution (xOpt,yOpt). (If a null pointer is passed, all constraints are assumed inactive!) |
_R | Pre-computed (upper triangular) Cholesky factor of Hessian matrix. The Cholesky factor must be stored in a real_t array of size nV*nV in row-major format. Note: Only used if xOpt/yOpt and gB are NULL! (If a null pointer is passed, Cholesky decomposition is computed internally!) |
References BT_TRUE, getNC(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, setupQPdata(), solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.
Referenced by main(), and solveOQPbenchmark().
returnValue QProblemB::init | ( | const real_t *const | _H, |
const real_t *const | _g, | ||
const real_t *const | _lb, | ||
const real_t *const | _ub, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const real_t *const | xOpt = 0 , |
||
const real_t *const | yOpt = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const real_t *const | _R = 0 |
||
) | [inherited] |
Initialises a simply bounded QP problem with given QP data and tries to solve it using at most nWSR iterations. Depending on the parameter constellation it:
1. 0, 0, 0 : starts with xOpt = 0, yOpt = 0 and gB empty (or all implicit equality bounds),
2. xOpt, 0, 0 : starts with xOpt, yOpt = 0 and obtain gB by "clipping",
3. 0, yOpt, 0 : starts with xOpt = 0, yOpt and obtain gB from yOpt != 0,
4. 0, 0, gB: starts with xOpt = 0, yOpt = 0 and gB,
5. xOpt, yOpt, 0 : starts with xOpt, yOpt and obtain gB from yOpt != 0,
6. xOpt, 0, gB: starts with xOpt, yOpt = 0 and gB,
7. xOpt, yOpt, gB: starts with xOpt, yOpt and gB (assume them to be consistent!)
Note: This function internally calls solveInitialQP for initialisation!
_H | Hessian matrix (a shallow copy is made). If Hessian matrix is trivial, a NULL pointer can be passed. |
_g | Gradient vector. |
_lb | Lower bounds (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bounds (on variables). If no upper bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP initialisation. Output: CPU time spent for QP initialisation (if pointer passed). |
xOpt | Optimal primal solution vector. A NULL pointer can be passed. (If a null pointer is passed, the old primal solution is kept!) |
yOpt | Optimal dual solution vector. A NULL pointer can be passed. (If a null pointer is passed, the old dual solution is kept!) |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, all bounds are assumed inactive!) |
_R | Pre-computed (upper triangular) Cholesky factor of Hessian matrix. The Cholesky factor must be stored in a real_t array of size nV*nV in row-major format. Note: Only used if xOpt/yOpt and gB are NULL! (If a null pointer is passed, Cholesky decomposition is computed internally!) |
References BT_TRUE, QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), QProblemB::reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, QProblemB::setupQPdata(), QProblemB::solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.
returnValue QProblem::init | ( | 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, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const real_t *const | xOpt = 0 , |
||
const real_t *const | yOpt = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const Constraints *const | guessedConstraints = 0 , |
||
const real_t *const | _R = 0 |
||
) |
Initialises a QP problem with given QP data and tries to solve it using at most nWSR iterations. Depending on the parameter constellation it:
1. 0, 0, 0 : starts with xOpt = 0, yOpt = 0 and gB/gC empty (or all implicit equality bounds),
2. xOpt, 0, 0 : starts with xOpt, yOpt = 0 and obtain gB/gC by "clipping",
3. 0, yOpt, 0 : starts with xOpt = 0, yOpt and obtain gB/gC from yOpt != 0,
4. 0, 0, gB/gC: starts with xOpt = 0, yOpt = 0 and gB/gC,
5. xOpt, yOpt, 0 : starts with xOpt, yOpt and obtain gB/gC from yOpt != 0,
6. xOpt, 0, gB/gC: starts with xOpt, yOpt = 0 and gB/gC,
7. xOpt, yOpt, gB/gC: starts with xOpt, yOpt and gB/gC (assume them to be consistent!)
Note: This function internally calls solveInitialQP for initialisation!
_H | Hessian matrix (a shallow copy is made). If Hessian matrix is trivial, a NULL pointer can be passed. |
_g | Gradient vector. |
_A | Constraint matrix (a shallow copy is made). |
_lb | Lower bound vector (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bound vector (on variables). If no upper bounds exist, a NULL pointer can be passed. |
_lbA | Lower constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
_ubA | Upper constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP initialisation. Output: CPU time spent for QP initialisation (if pointer passed). |
xOpt | Optimal primal solution vector. (If a null pointer is passed, the old primal solution is kept!) |
yOpt | Optimal dual solution vector. (If a null pointer is passed, the old dual solution is kept!) |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, all bounds are assumed inactive!) |
guessedConstraints | Optimal working set of constraints for solution (xOpt,yOpt). (If a null pointer is passed, all constraints are assumed inactive!) |
_R | Pre-computed (upper triangular) Cholesky factor of Hessian matrix. The Cholesky factor must be stored in a real_t array of size nV*nV in row-major format. Note: Only used if xOpt/yOpt and gB are NULL! (If a null pointer is passed, Cholesky decomposition is computed internally!) |
References BT_TRUE, getNC(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, setupQPdata(), solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.
returnValue QProblemB::init | ( | const char *const | H_file, |
const char *const | g_file, | ||
const char *const | lb_file, | ||
const char *const | ub_file, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const real_t *const | xOpt = 0 , |
||
const real_t *const | yOpt = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const char *const | R_file = 0 |
||
) | [inherited] |
Initialises a simply bounded QP problem with given QP data to be read from files and solves it using at most nWSR iterations. Depending on the parameter constellation it:
1. 0, 0, 0 : starts with xOpt = 0, yOpt = 0 and gB empty (or all implicit equality bounds),
2. xOpt, 0, 0 : starts with xOpt, yOpt = 0 and obtain gB by "clipping",
3. 0, yOpt, 0 : starts with xOpt = 0, yOpt and obtain gB from yOpt != 0,
4. 0, 0, gB: starts with xOpt = 0, yOpt = 0 and gB,
5. xOpt, yOpt, 0 : starts with xOpt, yOpt and obtain gB from yOpt != 0,
6. xOpt, 0, gB: starts with xOpt, yOpt = 0 and gB,
7. xOpt, yOpt, gB: starts with xOpt, yOpt and gB (assume them to be consistent!)
Note: This function internally calls solveInitialQP for initialisation!
H_file | Name of file where Hessian matrix is stored. If Hessian matrix is trivial, a NULL pointer can be passed. |
g_file | Name of file where gradient vector is stored. |
lb_file | Name of file where lower bound vector. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bound vector. If no upper bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP initialisation. Output: CPU time spent for QP initialisation (if pointer passed). |
xOpt | Optimal primal solution vector. A NULL pointer can be passed. (If a null pointer is passed, the old primal solution is kept!) |
yOpt | Optimal dual solution vector. A NULL pointer can be passed. (If a null pointer is passed, the old dual solution is kept!) |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, all bounds are assumed inactive!) |
R_file | Name of the file where a pre-computed (upper triangular) Cholesky factor of the Hessian matrix is stored. (If a null pointer is passed, Cholesky decomposition is computed internally!) |
References BT_TRUE, QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), QProblemB::R, readFromFile(), QProblemB::reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, RET_UNABLE_TO_READ_FILE, QProblemB::setupQPdataFromFile(), QProblemB::solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.
returnValue QProblem::init | ( | const char *const | H_file, |
const char *const | g_file, | ||
const char *const | A_file, | ||
const char *const | lb_file, | ||
const char *const | ub_file, | ||
const char *const | lbA_file, | ||
const char *const | ubA_file, | ||
int & | nWSR, | ||
real_t *const | cputime = 0 , |
||
const real_t *const | xOpt = 0 , |
||
const real_t *const | yOpt = 0 , |
||
const Bounds *const | guessedBounds = 0 , |
||
const Constraints *const | guessedConstraints = 0 , |
||
const char *const | R_file = 0 |
||
) |
Initialises a QP problem with given data to be read from files and solves it using at most nWSR iterations. Depending on the parameter constellation it:
1. 0, 0, 0 : starts with xOpt = 0, yOpt = 0 and gB/gC empty (or all implicit equality bounds),
2. xOpt, 0, 0 : starts with xOpt, yOpt = 0 and obtain gB/gC by "clipping",
3. 0, yOpt, 0 : starts with xOpt = 0, yOpt and obtain gB/gC from yOpt != 0,
4. 0, 0, gB/gC: starts with xOpt = 0, yOpt = 0 and gB/gC,
5. xOpt, yOpt, 0 : starts with xOpt, yOpt and obtain gB/gC from yOpt != 0,
6. xOpt, 0, gB/gC: starts with xOpt, yOpt = 0 and gB/gC,
7. xOpt, yOpt, gB/gC: starts with xOpt, yOpt and gB/gC (assume them to be consistent!)
Note: This function internally calls solveInitialQP for initialisation!
H_file | Name of file where Hessian matrix is stored. If Hessian matrix is trivial, a NULL pointer can be passed. |
g_file | Name of file where gradient vector is stored. |
A_file | Name of file where constraint matrix is stored. |
lb_file | Name of file where lower bound vector. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bound vector. If no upper bounds exist, a NULL pointer can be passed. |
lbA_file | Name of file where lower constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_file | Name of file where upper constraints' bound vector. If no upper constraints' bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP initialisation. Output: CPU time spent for QP initialisation (if pointer passed). |
xOpt | Optimal primal solution vector. (If a null pointer is passed, the old primal solution is kept!) |
yOpt | Optimal dual solution vector. (If a null pointer is passed, the old dual solution is kept!) |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). (If a null pointer is passed, all bounds are assumed inactive!) |
guessedConstraints | Optimal working set of constraints for solution (xOpt,yOpt). (If a null pointer is passed, all constraints are assumed inactive!) |
R_file | Name of the file where a pre-computed (upper triangular) Cholesky factor of the Hessian matrix is stored. (If a null pointer is passed, Cholesky decomposition is computed internally!) |
References BT_TRUE, getNC(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), QProblemB::R, readFromFile(), reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, RET_UNABLE_TO_READ_FILE, setupQPdataFromFile(), solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.
BooleanType QProblemB::isBlocking | ( | real_t | num, |
real_t | den, | ||
real_t | epsNum, | ||
real_t | epsDen, | ||
real_t & | t | ||
) | const [inline, protected, inherited] |
Checks whether given ratio is blocking, i.e. limits the maximum step length along the homotopy path to a value lower than given one.
num | Numerator for performing the ratio test. |
den | Denominator for performing the ratio test. |
epsNum | Numerator tolerance. |
epsDen | Denominator tolerance. |
t | Input: Current maximum step length along the homotopy path, Output: Updated maximum possible step length along the homotopy path. |
References BT_FALSE, and BT_TRUE.
Referenced by QProblemB::performRatioTest().
BooleanType QProblemB::isCPUtimeLimitExceeded | ( | const real_t *const | cputime, |
real_t | starttime, | ||
int | nWSR | ||
) | const [protected, inherited] |
Determines if next QP iteration can be performed within given CPU time limit.
cputime | Maximum CPU time allowed for QP solution. |
starttime | Start time of current QP solution. |
nWSR | Number of working set recalculations performed so far. |
References BT_FALSE, BT_TRUE, getCPUtime(), and real_t.
Referenced by solveQP(), and QProblemB::solveQP().
BooleanType QProblemB::isInfeasible | ( | ) | const [inline, inherited] |
Returns if the QP is infeasible.
References QProblemB::infeasible.
Referenced by solveInitialQP(), QProblemB::solveInitialQP(), and solveQP().
BooleanType QProblemB::isInitialised | ( | ) | const [inline, inherited] |
Returns if the QProblem object is initialised.
References BT_FALSE, BT_TRUE, QPS_NOTINITIALISED, and QProblemB::status.
Referenced by QProblemB::init(), and init().
BooleanType QProblemB::isSolved | ( | ) | const [inline, inherited] |
Returns if the QP has been solved.
References BT_FALSE, BT_TRUE, QPS_SOLVED, and QProblemB::status.
BooleanType QProblemB::isUnbounded | ( | ) | const [inline, inherited] |
Returns if the QP is unbounded.
References QProblemB::unbounded.
Referenced by solveInitialQP(), and QProblemB::solveInitialQP().
returnValue QProblemB::loadQPvectorsFromFile | ( | const char *const | g_file, |
const char *const | lb_file, | ||
const char *const | ub_file, | ||
real_t *const | g_new, | ||
real_t *const | lb_new, | ||
real_t *const | ub_new | ||
) | const [protected, inherited] |
Loads new QP vectors from files (internal members are not affected!).
g_file | Name of file where gradient, of neighbouring QP to be solved, is stored. |
lb_file | Name of file where lower bounds, of neighbouring QP to be solved, is stored. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bounds, of neighbouring QP to be solved, is stored. If no upper bounds exist, a NULL pointer can be passed. |
g_new | Output: Gradient of neighbouring QP to be solved. |
lb_new | Output: Lower bounds of neighbouring QP to be solved |
ub_new | Output: Upper bounds of neighbouring QP to be solved |
References QProblemB::getNV(), readFromFile(), RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by QProblemB::hotstart().
returnValue QProblem::loadQPvectorsFromFile | ( | const char *const | g_file, |
const char *const | lb_file, | ||
const char *const | ub_file, | ||
const char *const | lbA_file, | ||
const char *const | ubA_file, | ||
real_t *const | g_new, | ||
real_t *const | lb_new, | ||
real_t *const | ub_new, | ||
real_t *const | lbA_new, | ||
real_t *const | ubA_new | ||
) | const [protected] |
Loads new QP vectors from files (internal members are not affected!).
g_file | Name of file where gradient, of neighbouring QP to be solved, is stored. |
lb_file | Name of file where lower bounds, of neighbouring QP to be solved, is stored. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bounds, of neighbouring QP to be solved, is stored. If no upper bounds exist, a NULL pointer can be passed. |
lbA_file | Name of file where lower constraints' bounds, of neighbouring QP to be solved, is stored. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_file | Name of file where upper constraints' bounds, of neighbouring QP to be solved, is stored. If no upper constraints' bounds exist, a NULL pointer can be passed. |
g_new | Output: Gradient of neighbouring QP to be solved. |
lb_new | Output: Lower bounds of neighbouring QP to be solved |
ub_new | Output: Upper bounds of neighbouring QP to be solved |
lbA_new | Output: Lower constraints' bounds of neighbouring QP to be solved |
ubA_new | Output: Upper constraints' bounds of neighbouring QP to be solved |
References getNC(), readFromFile(), RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by SQProblem::hotstart(), and hotstart().
returnValue QProblemB::obtainAuxiliaryWorkingSet | ( | const real_t *const | xOpt, |
const real_t *const | yOpt, | ||
const Bounds *const | guessedBounds, | ||
Bounds * | auxiliaryBounds | ||
) | const [protected, inherited] |
Obtains the desired working set for the auxiliary initial QP in accordance with the user specifications
xOpt | Optimal primal solution vector. If a NULL pointer is passed, all entries are assumed to be zero. |
yOpt | Optimal dual solution vector. If a NULL pointer is passed, all entries are assumed to be zero. |
guessedBounds | Guessed working set for solution (xOpt,yOpt). |
auxiliaryBounds | Input: Allocated bound object. Output: Working set for auxiliary QP. |
References QProblemB::bounds, Options::boundTolerance, EPS, QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), Options::initialStatusBounds, QProblemB::lb, QProblemB::options, RET_INVALID_ARGUMENTS, RET_OBTAINING_WORKINGSET_FAILED, Bounds::setupBound(), ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UNBOUNDED, ST_UPPER, SUCCESSFUL_RETURN, THROWERROR, and QProblemB::ub.
Referenced by obtainAuxiliaryWorkingSet(), and QProblemB::solveInitialQP().
returnValue QProblem::obtainAuxiliaryWorkingSet | ( | const real_t *const | xOpt, |
const real_t *const | yOpt, | ||
const Bounds *const | guessedBounds, | ||
const Constraints *const | guessedConstraints, | ||
Bounds * | auxiliaryBounds, | ||
Constraints * | auxiliaryConstraints | ||
) | const [protected] |
Obtains the desired working set for the auxiliary initial QP in accordance with the user specifications (assumes that member AX has already been initialised!)
xOpt | Optimal primal solution vector. If a NULL pointer is passed, all entries are assumed to be zero. |
yOpt | Optimal dual solution vector. If a NULL pointer is passed, all entries are assumed to be zero. |
guessedBounds | Guessed working set of bounds for solution (xOpt,yOpt). |
guessedConstraints | Guessed working set for solution (xOpt,yOpt). |
auxiliaryBounds | Input: Allocated bound object. Ouput: Working set of constraints for auxiliary QP. |
auxiliaryConstraints | Input: Allocated bound object. Ouput: Working set for auxiliary QP. |
References Ax, Ax_u, Options::boundTolerance, constraints, EPS, getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), lbA, QProblemB::obtainAuxiliaryWorkingSet(), QProblemB::options, RET_INVALID_ARGUMENTS, RET_OBTAINING_WORKINGSET_FAILED, Constraints::setupConstraint(), ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, THROWERROR, and ubA.
Referenced by solveInitialQP().
returnValue QProblem::performDriftCorrection | ( | ) | [protected, virtual] |
Drift correction at end of each active set iteration
Reimplemented from QProblemB.
References Ax, Ax_l, Ax_u, QProblemB::bounds, constraints, getMax(), getMin(), getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), QProblemB::lb, lbA, setupAuxiliaryQPgradient(), ST_BOUNDED, ST_DISABLED, ST_EQUALITY, ST_INACTIVE, ST_INFEASIBLE_LOWER, ST_INFEASIBLE_UPPER, ST_LOWER, ST_UNBOUNDED, ST_UNDEFINED, ST_UNKNOWN, ST_UPPER, QProblemB::ub, ubA, QProblemB::x, and QProblemB::y.
Referenced by solveQP().
returnValue QProblem::performPlainRatioTest | ( | int | nIdx, |
const int *const | idxList, | ||
const real_t *const | num, | ||
const real_t *const | den, | ||
real_t | epsNum, | ||
real_t | epsDen, | ||
real_t & | t, | ||
int & | BC_idx | ||
) | const [protected] |
Performs robustified ratio test yield the maximum possible step length along the homotopy path.
nIdx | Number of ratios to be checked. |
idxList | Array containing the indices of all ratios to be checked. |
num | Array containing all numerators for performing the ratio test. |
den | Array containing all denominators for performing the ratio test. |
epsNum | Numerator tolerance. |
epsDen | Denominator tolerance. |
t | Output: Maximum possible step length along the homotopy path. |
BC_idx | Output: Index of blocking constraint. |
References SUCCESSFUL_RETURN.
Referenced by ensureNonzeroCurvature().
returnValue QProblem::performRamping | ( | ) | [protected, virtual] |
Ramping Strategy to avoid ties. Modifies homotopy start without changing current active set.
Reimplemented from QProblemB.
References Ax, Ax_l, Ax_u, QProblemB::bounds, constraints, getAbs(), getMax(), getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), QProblemB::lb, lbA, QProblemB::ramp0, QProblemB::ramp1, QProblemB::rampOffset, real_t, setupAuxiliaryQPgradient(), ST_BOUNDED, ST_DISABLED, ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UNBOUNDED, ST_UPPER, SUCCESSFUL_RETURN, QProblemB::ub, ubA, QProblemB::x, and QProblemB::y.
Referenced by solveInitialQP(), and solveQP().
returnValue QProblemB::performRatioTest | ( | int | nIdx, |
const int *const | idxList, | ||
const SubjectTo *const | subjectTo, | ||
const real_t *const | num, | ||
const real_t *const | den, | ||
real_t | epsNum, | ||
real_t | epsDen, | ||
real_t & | t, | ||
int & | BC_idx | ||
) | const [protected, inherited] |
Performs robustified ratio test yield the maximum possible step length along the homotopy path.
nIdx | Number of ratios to be checked. |
idxList | Array containing the indices of all ratios to be checked. |
subjectTo | Bound/Constraint object corresponding to ratios to be checked. |
num | Array containing all numerators for performing the ratio test. |
den | Array containing all denominators for performing the ratio test. |
epsNum | Numerator tolerance. |
epsDen | Denominator tolerance. |
t | Output: Maximum possible step length along the homotopy path. |
BC_idx | Output: Index of blocking constraint. |
References BT_TRUE, SubjectTo::getStatus(), SubjectTo::getType(), QProblemB::isBlocking(), ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UPPER, and SUCCESSFUL_RETURN.
Referenced by addBound_ensureLI(), addConstraint_ensureLI(), performStep(), and QProblemB::performStep().
returnValue QProblem::performStep | ( | const real_t *const | delta_g, |
const real_t *const | delta_lbA, | ||
const real_t *const | delta_ubA, | ||
const real_t *const | delta_lb, | ||
const real_t *const | delta_ub, | ||
const real_t *const | delta_xFX, | ||
const real_t *const | delta_xFR, | ||
const real_t *const | delta_yAC, | ||
const real_t *const | delta_yFX, | ||
int & | BC_idx, | ||
SubjectToStatus & | BC_status, | ||
BooleanType & | BC_isBound | ||
) | [protected] |
Determines the maximum possible step length along the homotopy path and performs this step (without changing working set).
delta_g | Step direction of gradient. |
delta_lbA | Step direction of lower constraints' bounds. |
delta_ubA | Step direction of upper constraints' bounds. |
delta_lb | Step direction of lower bounds. |
delta_ub | Step direction of upper bounds. |
delta_xFX | Primal homotopy step direction of fixed variables. |
delta_xFR | Primal homotopy step direction of free variables. |
delta_yAC | Dual homotopy step direction of active constraints' multiplier. |
delta_yFX | Dual homotopy step direction of fixed variables' multiplier. |
BC_idx | Output: Index of blocking constraint. |
BC_status | Output: Status of blocking constraint. |
BC_isBound | Output: Indicates if blocking constraint is a bound. |
References __FILE__, __FUNC__, __LINE__, A, Ax, Ax_l, Ax_u, QProblemB::bounds, BT_FALSE, BT_TRUE, constraintProduct, constraints, Options::epsDen, Options::epsNum, QProblemB::g, Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getGlobalMessageHandler(), Constraints::getInactive(), getMax(), getNAC(), getNC(), QProblemB::getNFR(), QProblemB::getNFX(), getNIAC(), Indexlist::getNumberArray(), QProblemB::getNV(), SubjectTo::getType(), SubjectTo::hasNoLower(), SubjectTo::hasNoUpper(), QProblemB::lb, lbA, MAX_STRING_LENGTH, QProblemB::options, QProblemB::performRatioTest(), real_t, RET_ERROR_IN_CONSTRAINTPRODUCT, RET_STEPSIZE, RET_STEPSIZE_NONPOSITIVE, ST_INACTIVE, ST_LOWER, ST_UNBOUNDED, ST_UNDEFINED, ST_UPPER, SUCCESSFUL_RETURN, QProblemB::tau, THROWERROR, MessageHandling::throwInfo(), MessageHandling::throwWarning(), Matrix::times(), QProblemB::ub, ubA, VS_VISIBLE, QProblemB::x, QProblemB::y, and ZERO.
Referenced by solveQP().
returnValue QProblem::printIteration | ( | int | iter, |
int | BC_idx, | ||
SubjectToStatus | BC_status, | ||
BooleanType | BC_isBound, | ||
real_t | homotopyLength, | ||
BooleanType | isFirstCall = BT_TRUE |
||
) | [protected] |
Prints concise information on the current iteration.
iter | Number of current iteration. |
BC_idx | Index of blocking constraint. |
BC_status | Status of blocking constraint. |
BC_isBound | Indicates if blocking constraint is a bound. |
homotopyLength | Current homotopy distance. |
isFirstCall | Indicating whether this is the first call for current QP. |
References A, BT_TRUE, QProblemB::count, EPS, TabularOutput::excAddB, TabularOutput::excAddC, TabularOutput::excRemB, TabularOutput::excRemC, QProblemB::g, getAbs(), getNAC(), getNC(), QProblemB::getNFX(), QProblemB::getNV(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, TabularOutput::idxAddB, TabularOutput::idxAddC, TabularOutput::idxRemB, TabularOutput::idxRemC, QProblemB::lb, lbA, MAX_STRING_LENGTH, myPrintf(), QProblemB::options, PL_DEBUG_ITER, PL_MEDIUM, PL_TABULAR, Options::printLevel, real_t, QProblemB::regVal, RET_INVALID_ARGUMENTS, sizeT, ST_INACTIVE, ST_UNDEFINED, SUCCESSFUL_RETURN, QProblemB::tabularOutput, QProblemB::tau, THROWERROR, Matrix::times(), Matrix::transTimes(), TT, QProblemB::ub, ubA, QProblemB::x, and QProblemB::y.
Referenced by solveQP().
returnValue QProblemB::printOptions | ( | ) | const [inherited] |
Prints a list of all options and their current values.
References QProblemB::options, and Options::print().
Referenced by main().
returnValue QProblem::printProperties | ( | ) | [virtual] |
Prints concise list of properties of the current QP.
Reimplemented from QProblemB.
References QProblemB::bounds, BT_TRUE, constraints, getNC(), getNEC(), QProblemB::getNV(), SubjectTo::hasNoLower(), SubjectTo::hasNoUpper(), QProblemB::hessianType, HST_IDENTITY, HST_INDEF, HST_POSDEF, HST_POSDEF_NULLSPACE, HST_SEMIDEF, HST_ZERO, QProblemB::infeasible, MAX_STRING_LENGTH, myPrintf(), QProblemB::options, PL_DEBUG_ITER, PL_HIGH, PL_LOW, PL_MEDIUM, PL_NONE, PL_TABULAR, Options::printLevel, QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_NOTINITIALISED, QPS_PERFORMINGHOMOTOPY, QPS_PREPARINGAUXILIARYQP, QPS_SOLVED, QProblemB::status, SUCCESSFUL_RETURN, and QProblemB::unbounded.
returnValue QProblemB::regulariseHessian | ( | ) | [protected, inherited] |
Regularise Hessian matrix by adding a scaled identity matrix to it.
References Matrix::addToDiag(), BT_FALSE, BT_TRUE, Options::enableRegularisation, Options::epsRegularisation, QProblemB::g, Matrix::getNorm(), getNorm(), QProblemB::getNV(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, QProblemB::options, QProblemB::regVal, RET_CANNOT_REGULARISE_IDENTITY, RET_CANNOT_REGULARISE_SPARSE, RET_NO_DIAGONAL_AVAILABLE, RET_USING_REGULARISATION, SUCCESSFUL_RETURN, THROWERROR, THROWINFO, and QProblemB::usingRegularisation().
Referenced by QProblemB::setupInitialCholesky(), setupInitialCholesky(), SQProblem::setupNewAuxiliaryQP(), solveInitialQP(), and QProblemB::solveInitialQP().
returnValue QProblem::removeBound | ( | int | number, |
BooleanType | updateCholesky, | ||
BooleanType | allowFlipping = BT_FALSE , |
||
BooleanType | ensureNZC = BT_FALSE |
||
) | [protected] |
Removes a bounds from active set.
number | Number of bound to be removed from active set. |
updateCholesky | Flag indicating if Cholesky decomposition shall be updated. |
allowFlipping | Flag indicating if flipping bounds are allowed. |
ensureNZC | Flag indicating if non-zero curvature is ensured by exchange rules. |
References A, addBound(), addConstraint(), QProblemB::applyGivens(), QProblemB::backsolveR(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblemB::computeGivens(), constraints, Matrix::diag(), Options::enableFlippingBounds, ensureNonzeroCurvature(), EPS, Options::epsFlipping, TabularOutput::excAddB, TabularOutput::excAddC, Bounds::flipFixed(), QProblemB::flipper, Flipper::get(), Constraints::getActive(), Matrix::getCol(), Bounds::getFree(), getNAC(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), getSqrt(), SubjectTo::getStatus(), QProblemB::getStatus(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_SEMIDEF, HST_ZERO, TabularOutput::idxAddB, TabularOutput::idxRemB, QProblemB::lb, Bounds::moveFixedToFree(), QProblemB::options, Q, QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_NOTINITIALISED, QPS_SOLVED, QQ, QProblemB::R, real_t, RET_BOUND_NOT_ACTIVE, RET_HESSIAN_NOT_SPD, RET_MOVING_BOUND_FAILED, RET_REMOVEBOUND_FAILED, RET_UNKNOWN_BUG, RR, Flipper::set(), sizeT, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, T, QProblemB::tabularOutput, THROWERROR, Matrix::times(), TT, QProblemB::ub, and ZERO.
Referenced by addBound_ensureLI(), addConstraint_ensureLI(), changeActiveSet(), dropInfeasibles(), and setupAuxiliaryWorkingSet().
returnValue QProblem::removeConstraint | ( | int | number, |
BooleanType | updateCholesky, | ||
BooleanType | allowFlipping = BT_FALSE , |
||
BooleanType | ensureNZC = BT_FALSE |
||
) | [protected] |
Removes a constraint from active set.
number | Number of constraint to be removed from active set. |
updateCholesky | Flag indicating if Cholesky decomposition shall be updated. |
allowFlipping | Flag indicating if flipping bounds are allowed. |
ensureNZC | Flag indicating if non-zero curvature is ensured by exchange rules. |
References addBound(), addConstraint(), QProblemB::applyGivens(), Ax_l, Ax_u, QProblemB::backsolveR(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblemB::computeGivens(), constraints, Options::enableFlippingBounds, ensureNonzeroCurvature(), EPS, Options::epsFlipping, TabularOutput::excAddB, TabularOutput::excAddC, Constraints::flipFixed(), QProblemB::flipper, Flipper::get(), Constraints::getActive(), Bounds::getFree(), Indexlist::getIndex(), getNAC(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), getNZ(), getSqrt(), SubjectTo::getStatus(), QProblemB::getStatus(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_SEMIDEF, HST_ZERO, TabularOutput::idxAddC, TabularOutput::idxRemC, lbA, Constraints::moveActiveToInactive(), QProblemB::options, Q, QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_NOTINITIALISED, QPS_SOLVED, QQ, QProblemB::R, real_t, RET_CONSTRAINT_NOT_ACTIVE, RET_HESSIAN_NOT_SPD, RET_MOVING_BOUND_FAILED, RET_REMOVECONSTRAINT_FAILED, RET_UNKNOWN_BUG, RR, Flipper::set(), sizeT, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, T, QProblemB::tabularOutput, THROWERROR, Matrix::times(), TT, ubA, and ZERO.
Referenced by addBound_ensureLI(), addConstraint_ensureLI(), changeActiveSet(), dropInfeasibles(), and setupAuxiliaryWorkingSet().
returnValue QProblem::reset | ( | ) | [virtual] |
Clears all data structures of QProblemB except for QP data.
Reimplemented from QProblemB.
References constraintProduct, constraints, QProblemB::flipper, getNC(), QProblemB::getNV(), Constraints::init(), Flipper::init(), Q, QProblemB::reset(), RET_QPOBJECT_NOT_SETUP, RET_RESET_FAILED, sizeT, SUCCESSFUL_RETURN, T, and THROWERROR.
Referenced by init().
returnValue QProblemB::resetCounter | ( | ) | [inline, inherited] |
Resets QP problem counter (to zero).
References QProblemB::count, and SUCCESSFUL_RETURN.
returnValue QProblem::setA | ( | Matrix * | A_new | ) | [inline, protected] |
Sets constraint matrix of the QP.
Note: Also internal vector Ax is recomputed!
A_new | New constraint matrix (a shallow copy is made). |
References A, Ax, Ax_l, Ax_u, BT_FALSE, BT_TRUE, constraints, freeConstraintMatrix, getNC(), QProblemB::getNV(), Matrix::getRowNorm(), isZero(), lbA, RET_INVALID_ARGUMENTS, RET_QPOBJECT_NOT_SETUP, SubjectTo::setType(), ST_DISABLED, SUCCESSFUL_RETURN, THROWERROR, Matrix::times(), ubA, and QProblemB::x.
Referenced by SQProblem::setupNewAuxiliaryQP(), setupQPdata(), and setupQPdataFromFile().
returnValue QProblem::setA | ( | const real_t *const | A_new | ) | [inline, protected] |
Sets dense constraint matrix of the QP.
Note: Also internal vector Ax is recomputed!
A_new | New dense constraint matrix (with correct dimension!), a shallow copy is made. |
References A, Ax, Ax_l, Ax_u, BT_TRUE, freeConstraintMatrix, getNC(), QProblemB::getNV(), lbA, real_t, RET_INVALID_ARGUMENTS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, THROWERROR, Matrix::times(), ubA, and QProblemB::x.
returnValue QProblem::setConstraintProduct | ( | ConstraintProduct *const | _constraintProduct | ) |
Defines user-defined routine for calculating the constraint product A*x
References constraintProduct, and SUCCESSFUL_RETURN.
Referenced by main().
returnValue QProblemB::setG | ( | const real_t *const | g_new | ) | [inline, protected, inherited] |
Changes gradient vector of the QP.
g_new | New gradient vector (with correct dimension!). |
References QProblemB::g, QProblemB::getNV(), real_t, RET_INVALID_ARGUMENTS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by QProblemB::copy(), and QProblemB::setupQPdata().
returnValue QProblemB::setH | ( | SymmetricMatrix * | H_new | ) | [inline, protected, inherited] |
Sets Hessian matrix of the QP.
H_new | New Hessian matrix (a shallow copy is made). |
References BT_FALSE, BT_TRUE, QProblemB::freeHessian, QProblemB::H, and SUCCESSFUL_RETURN.
Referenced by SQProblem::setupNewAuxiliaryQP(), QProblemB::setupQPdata(), and QProblemB::setupQPdataFromFile().
returnValue QProblemB::setH | ( | const real_t *const | H_new | ) | [inline, protected, inherited] |
Sets dense Hessian matrix of the QP. If a null pointer is passed and a) hessianType is HST_IDENTITY, nothing is done, b) hessianType is not HST_IDENTITY, Hessian matrix is set to zero.
H_new | New dense Hessian matrix (with correct dimension!), a shallow copy is made. |
References BT_FALSE, BT_TRUE, QProblemB::freeHessian, QProblemB::getNV(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, real_t, and SUCCESSFUL_RETURN.
returnValue QProblemB::setHessianType | ( | HessianType | _hessianType | ) | [inline, inherited] |
Changes the print level.
_hessianType | New Hessian type. |
References QProblemB::hessianType, and SUCCESSFUL_RETURN.
returnValue QProblemB::setInfeasibilityFlag | ( | returnValue | returnvalue, |
BooleanType | doThrowError = BT_FALSE |
||
) | [protected, inherited] |
Sets internal infeasibility flag and throws given error in case the far bound strategy is not enabled (as QP might actually not be infeasible in this case).
returnvalue | Returnvalue to be tunneled. |
doThrowError | Flag forcing to throw an error. |
References BT_FALSE, BT_TRUE, Options::enableFarBounds, QProblemB::infeasible, QProblemB::options, and THROWERROR.
Referenced by addBound_ensureLI(), addConstraint_ensureLI(), QProblemB::hotstart(), hotstart(), solveQP(), and QProblemB::solveQP().
returnValue QProblemB::setLB | ( | const real_t *const | lb_new | ) | [inline, protected, inherited] |
Changes lower bound vector of the QP.
lb_new | New lower bound vector (with correct dimension!). |
References QProblemB::getNV(), INFTY, QProblemB::lb, real_t, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by QProblemB::copy(), and QProblemB::setupQPdata().
returnValue QProblemB::setLB | ( | int | number, |
real_t | value | ||
) | [inline, protected, inherited] |
Changes single entry of lower bound vector of the QP.
number | Number of entry to be changed. |
value | New value for entry of lower bound vector. |
References QProblemB::getNV(), QProblemB::lb, RET_INDEX_OUT_OF_BOUNDS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.
returnValue QProblem::setLBA | ( | const real_t *const | lbA_new | ) | [inline, protected] |
Sets constraints' lower bound vector of the QP.
lbA_new | New constraints' lower bound vector (with correct dimension!). |
References getNC(), QProblemB::getNV(), INFTY, lbA, real_t, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by copy(), and setupQPdata().
returnValue QProblem::setLBA | ( | int | number, |
real_t | value | ||
) | [inline, protected] |
Changes single entry of lower constraints' bound vector of the QP.
number | Number of entry to be changed. |
value | New value for entry of lower constraints' bound vector (with correct dimension!). |
References getNC(), QProblemB::getNV(), lbA, RET_INDEX_OUT_OF_BOUNDS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.
returnValue QProblemB::setOptions | ( | const Options & | _options | ) | [inline, inherited] |
Overrides current options with given ones.
_options | New options. |
References Options::ensureConsistency(), QProblemB::options, Options::printLevel, QProblemB::setPrintLevel(), and SUCCESSFUL_RETURN.
Referenced by main(), and solveOQPbenchmark().
returnValue QProblemB::setPrintLevel | ( | PrintLevel | _printlevel | ) | [inherited] |
Changes the print level.
_printlevel | New print level. |
References getGlobalMessageHandler(), QProblemB::options, PL_DEBUG_ITER, PL_HIGH, PL_LOW, PL_MEDIUM, PL_NONE, PL_TABULAR, Options::printLevel, RET_PRINTLEVEL_CHANGED, MessageHandling::setErrorVisibilityStatus(), MessageHandling::setInfoVisibilityStatus(), MessageHandling::setWarningVisibilityStatus(), SUCCESSFUL_RETURN, THROWINFO, VS_HIDDEN, and VS_VISIBLE.
Referenced by QProblemB::copy(), main(), QProblemB::QProblemB(), and QProblemB::setOptions().
returnValue QProblemB::setUB | ( | const real_t *const | ub_new | ) | [inline, protected, inherited] |
Changes upper bound vector of the QP.
ub_new | New upper bound vector (with correct dimension!). |
References QProblemB::getNV(), INFTY, real_t, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, THROWERROR, and QProblemB::ub.
Referenced by QProblemB::copy(), and QProblemB::setupQPdata().
returnValue QProblemB::setUB | ( | int | number, |
real_t | value | ||
) | [inline, protected, inherited] |
Changes single entry of upper bound vector of the QP.
number | Number of entry to be changed. |
value | New value for entry of upper bound vector. |
References QProblemB::getNV(), RET_INDEX_OUT_OF_BOUNDS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, THROWERROR, and QProblemB::ub.
returnValue QProblem::setUBA | ( | const real_t *const | ubA_new | ) | [inline, protected] |
Sets constraints' upper bound vector of the QP.
ubA_new | New constraints' upper bound vector (with correct dimension!). |
References getNC(), QProblemB::getNV(), INFTY, real_t, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, THROWERROR, and ubA.
Referenced by copy(), and setupQPdata().
returnValue QProblem::setUBA | ( | int | number, |
real_t | value | ||
) | [inline, protected] |
Changes single entry of upper constraints' bound vector of the QP.
number | Number of entry to be changed. |
value | New value for entry of upper constraints' bound vector (with correct dimension!). |
References getNC(), QProblemB::getNV(), RET_INDEX_OUT_OF_BOUNDS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, THROWERROR, and ubA.
returnValue QProblem::setupAuxiliaryQP | ( | const Bounds *const | guessedBounds, |
const Constraints *const | guessedConstraints | ||
) | [protected, virtual] |
guessedBounds | Initial guess for working set of bounds. |
guessedConstraints | Initial guess for working set of constraints. |
References A, Ax, Ax_l, Ax_u, QProblemB::bounds, BT_FALSE, BT_TRUE, computeProjectedCholesky(), constraints, getNC(), QProblemB::getNV(), SubjectTo::getStatus(), Bounds::init(), Constraints::init(), QPS_PREPARINGAUXILIARYQP, RET_INVALID_ARGUMENTS, RET_SETUP_AUXILIARYQP_FAILED, Bounds::setupAllFree(), Constraints::setupAllInactive(), setupAuxiliaryQPbounds(), setupAuxiliaryQPgradient(), setupAuxiliaryWorkingSet(), setupSubjectToType(), setupTQfactorisation(), shallRefactorise(), ST_INACTIVE, QProblemB::status, SUCCESSFUL_RETURN, THROWERROR, Matrix::times(), QProblemB::x, and QProblemB::y.
Referenced by hotstart().
returnValue QProblemB::setupAuxiliaryQP | ( | const Bounds *const | guessedBounds | ) | [protected, virtual, inherited] |
Updates QP vectors, working sets and internal data structures in order to start from an optimal solution corresponding to initial guesses of the working set for bounds
guessedBounds | Initial guess for working set of bounds. |
References QProblemB::bounds, BT_FALSE, BT_TRUE, QProblemB::computeCholesky(), QProblemB::getNV(), SubjectTo::getStatus(), Bounds::init(), QPS_PREPARINGAUXILIARYQP, RET_SETUP_AUXILIARYQP_FAILED, Bounds::setupAllFree(), QProblemB::setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryWorkingSet(), QProblemB::setupSubjectToType(), QProblemB::shallRefactorise(), ST_INACTIVE, QProblemB::status, SUCCESSFUL_RETURN, THROWERROR, and QProblemB::y.
Referenced by QProblemB::hotstart().
returnValue QProblem::setupAuxiliaryQPbounds | ( | const Bounds *const | auxiliaryBounds, |
const Constraints *const | auxiliaryConstraints, | ||
BooleanType | useRelaxation | ||
) | [protected] |
Sets up (constraints') bounds of the auxiliary initial QP for given optimal primal/dual solution and given initial working set (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).
auxiliaryBounds | Working set of bounds for auxiliary QP. |
auxiliaryConstraints | Working set of constraints for auxiliary QP. |
useRelaxation | Flag indicating if inactive (constraints') bounds shall be relaxed. |
References Ax_l, Ax_u, Options::boundRelaxation, QProblemB::bounds, BT_TRUE, constraints, getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), QProblemB::lb, lbA, QProblemB::options, RET_UNKNOWN_BUG, ST_DISABLED, ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, THROWERROR, QProblemB::ub, ubA, and QProblemB::x.
Referenced by setupAuxiliaryQP(), SQProblem::setupNewAuxiliaryQP(), and solveInitialQP().
returnValue QProblem::setupAuxiliaryQPgradient | ( | ) | [protected] |
Sets up gradient of the auxiliary initial QP for given optimal primal/dual solution and given initial working set (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).
Reimplemented from QProblemB.
References A, BT_FALSE, QProblemB::g, getNC(), QProblemB::getNV(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, QProblemB::regVal, SUCCESSFUL_RETURN, Matrix::times(), Matrix::transTimes(), QProblemB::usingRegularisation(), QProblemB::x, and QProblemB::y.
Referenced by performDriftCorrection(), performRamping(), setupAuxiliaryQP(), SQProblem::setupNewAuxiliaryQP(), and solveInitialQP().
returnValue QProblem::setupAuxiliaryQPsolution | ( | const real_t *const | xOpt, |
const real_t *const | yOpt | ||
) | [protected] |
Sets up the optimal primal/dual solution of the auxiliary initial QP.
xOpt | Optimal primal solution vector. If a NULL pointer is passed, all entries are set to zero. |
yOpt | Optimal dual solution vector. If a NULL pointer is passed, all entries are set to zero. |
Reimplemented from QProblemB.
References A, Ax, Ax_l, Ax_u, getNC(), QProblemB::getNV(), SUCCESSFUL_RETURN, Matrix::times(), QProblemB::x, and QProblemB::y.
Referenced by solveInitialQP().
returnValue QProblem::setupAuxiliaryWorkingSet | ( | const Bounds *const | auxiliaryBounds, |
const Constraints *const | auxiliaryConstraints, | ||
BooleanType | setupAfresh | ||
) | [protected] |
Sets up bound and constraints data structures according to auxiliaryBounds/Constraints. (If the working set shall be setup afresh, make sure that bounds and constraints data structure have been resetted and the TQ factorisation has been initialised!)
auxiliaryBounds | Working set of bounds for auxiliary QP. |
auxiliaryConstraints | Working set of constraints for auxiliary QP. |
setupAfresh | Flag indicating if given working set shall be setup afresh or by updating the current one. |
References addBound(), addBound_checkLI(), addConstraint(), addConstraint_checkLI(), QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, Options::enableFullLITests, Options::enableNZCTests, Options::epsLITests, getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), Bounds::moveFreeToFixed(), QProblemB::options, real_t, removeBound(), removeConstraint(), RET_INVALID_ARGUMENTS, RET_LINEARLY_INDEPENDENT, RET_SETUP_WORKINGSET_FAILED, RET_UNKNOWN_BUG, SubjectTo::setType(), ST_BOUNDED, ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UNDEFINED, ST_UPPER, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by setupAuxiliaryQP(), SQProblem::setupNewAuxiliaryQP(), and solveInitialQP().
returnValue QProblem::setupInitialCholesky | ( | ) | [protected, virtual] |
Computes initial Cholesky decomposition of the projected Hessian making use of the function computeCholesky() or computeProjectedCholesky().
Reimplemented from QProblemB.
References BT_TRUE, computeProjectedCholesky(), Options::enableRegularisation, QProblemB::getNFR(), QProblemB::getNFV(), QProblemB::getNV(), QProblemB::haveCholesky, QProblemB::options, QProblemB::regulariseHessian(), RET_HESSIAN_NOT_SPD, RET_INIT_FAILED_CHOLESKY, RET_INIT_FAILED_REGULARISATION, and SUCCESSFUL_RETURN.
Referenced by hotstart().
returnValue QProblemB::setupQPdata | ( | SymmetricMatrix * | _H, |
const real_t *const | _g, | ||
const real_t *const | _lb, | ||
const real_t *const | _ub | ||
) | [protected, inherited] |
Sets up internal QP data.
_H | Hessian matrix. |
_g | Gradient vector. |
_lb | Lower bounds (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bounds (on variables). If no upper bounds exist, a NULL pointer can be passed. |
References RET_INVALID_ARGUMENTS, QProblemB::setG(), QProblemB::setH(), QProblemB::setLB(), QProblemB::setUB(), SUCCESSFUL_RETURN, and THROWERROR.
Referenced by QProblemB::init(), and setupQPdata().
returnValue QProblemB::setupQPdata | ( | const real_t *const | _H, |
const real_t *const | _g, | ||
const real_t *const | _lb, | ||
const real_t *const | _ub | ||
) | [protected, inherited] |
Sets up internal QP data. If the current Hessian is trivial (i.e. HST_ZERO or HST_IDENTITY) but a non-trivial one is given, memory for Hessian is allocated and it is set to the given one.
_H | Hessian matrix. If Hessian matrix is trivial,a NULL pointer can be passed. |
_g | Gradient vector. |
_lb | Lower bounds (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bounds (on variables). If no upper bounds exist, a NULL pointer can be passed. |
References RET_INVALID_ARGUMENTS, QProblemB::setG(), QProblemB::setH(), QProblemB::setLB(), QProblemB::setUB(), SUCCESSFUL_RETURN, and THROWERROR.
returnValue QProblem::setupQPdata | ( | SymmetricMatrix * | _H, |
const real_t *const | _g, | ||
Matrix * | _A, | ||
const real_t *const | _lb, | ||
const real_t *const | _ub, | ||
const real_t *const | _lbA, | ||
const real_t *const | _ubA | ||
) | [protected] |
Sets up internal QP data.
_H | Hessian matrix. If Hessian matrix is trivial,a NULL pointer can be passed. |
_g | Gradient vector. |
_A | Constraint matrix. |
_lb | Lower bound vector (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bound vector (on variables). If no upper bounds exist, a NULL pointer can be passed. |
_lbA | Lower constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
_ubA | Upper constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
References getNC(), RET_INVALID_ARGUMENTS, setA(), setLBA(), setUBA(), QProblemB::setupQPdata(), SUCCESSFUL_RETURN, and THROWERROR.
Referenced by init().
returnValue QProblem::setupQPdata | ( | 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 | ||
) | [protected] |
Sets up dense internal QP data. If the current Hessian is trivial (i.e. HST_ZERO or HST_IDENTITY) but a non-trivial one is given, memory for Hessian is allocated and it is set to the given one.
_H | Hessian matrix. If Hessian matrix is trivial,a NULL pointer can be passed. |
_g | Gradient vector. |
_A | Constraint matrix. |
_lb | Lower bound vector (on variables). If no lower bounds exist, a NULL pointer can be passed. |
_ub | Upper bound vector (on variables). If no upper bounds exist, a NULL pointer can be passed. |
_lbA | Lower constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
_ubA | Upper constraints' bound vector. If no lower constraints' bounds exist, a NULL pointer can be passed. |
References getNC(), RET_INVALID_ARGUMENTS, setA(), setLBA(), setUBA(), QProblemB::setupQPdata(), SUCCESSFUL_RETURN, and THROWERROR.
returnValue QProblemB::setupQPdataFromFile | ( | const char *const | H_file, |
const char *const | g_file, | ||
const char *const | lb_file, | ||
const char *const | ub_file | ||
) | [protected, inherited] |
Sets up internal QP data by loading it from files. If the current Hessian is trivial (i.e. HST_ZERO or HST_IDENTITY) but a non-trivial one is given, memory for Hessian is allocated and it is set to the given one.
H_file | Name of file where Hessian matrix, of neighbouring QP to be solved, is stored. If Hessian matrix is trivial,a NULL pointer can be passed. |
g_file | Name of file where gradient, of neighbouring QP to be solved, is stored. |
lb_file | Name of file where lower bounds, of neighbouring QP to be solved, is stored. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bounds, of neighbouring QP to be solved, is stored. If no upper bounds exist, a NULL pointer can be passed. |
References Matrix::doFreeMemory(), QProblemB::g, QProblemB::getNV(), QProblemB::H, INFTY, QProblemB::lb, readFromFile(), real_t, RET_INVALID_ARGUMENTS, QProblemB::setH(), SUCCESSFUL_RETURN, THROWERROR, and QProblemB::ub.
Referenced by QProblemB::init().
returnValue QProblem::setupQPdataFromFile | ( | const char *const | H_file, |
const char *const | g_file, | ||
const char *const | A_file, | ||
const char *const | lb_file, | ||
const char *const | ub_file, | ||
const char *const | lbA_file, | ||
const char *const | ubA_file | ||
) | [protected] |
Sets up internal QP data by loading it from files. If the current Hessian is trivial (i.e. HST_ZERO or HST_IDENTITY) but a non-trivial one is given, memory for Hessian is allocated and it is set to the given one.
H_file | Name of file where Hessian matrix, of neighbouring QP to be solved, is stored. If Hessian matrix is trivial,a NULL pointer can be passed. |
g_file | Name of file where gradient, of neighbouring QP to be solved, is stored. |
A_file | Name of file where constraint matrix, of neighbouring QP to be solved, is stored. |
lb_file | Name of file where lower bounds, of neighbouring QP to be solved, is stored. If no lower bounds exist, a NULL pointer can be passed. |
ub_file | Name of file where upper bounds, of neighbouring QP to be solved, is stored. If no upper bounds exist, a NULL pointer can be passed. |
lbA_file | Name of file where lower constraints' bounds, of neighbouring QP to be solved, is stored. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_file | Name of file where upper constraints' bounds, of neighbouring QP to be solved, is stored. If no upper constraints' bounds exist, a NULL pointer can be passed. |
References A, Matrix::doFreeMemory(), getNC(), QProblemB::getNV(), INFTY, lbA, readFromFile(), real_t, RET_INVALID_ARGUMENTS, setA(), SUCCESSFUL_RETURN, THROWERROR, and ubA.
Referenced by init().
returnValue QProblemB::setupSubjectToType | ( | const real_t *const | lb_new, |
const real_t *const | ub_new | ||
) | [protected, virtual, inherited] |
Determines type of new constraints and bounds (i.e. implicitly fixed, unbounded etc.).
lb_new | New lower bounds. |
ub_new | New upper bounds. |
References QProblemB::bounds, Options::boundTolerance, BT_FALSE, BT_TRUE, Options::enableEqualities, Options::enableFarBounds, QProblemB::getNV(), INFTY, QProblemB::lb, QProblemB::options, SubjectTo::setNoLower(), SubjectTo::setNoUpper(), SubjectTo::setType(), ST_BOUNDED, ST_EQUALITY, ST_UNBOUNDED, SUCCESSFUL_RETURN, and QProblemB::ub.
returnValue QProblem::setupSubjectToType | ( | ) | [protected, virtual] |
Determines type of existing constraints and bounds (i.e. implicitly fixed, unbounded etc.).
Reimplemented from QProblemB.
References QProblemB::lb, lbA, QProblemB::ub, and ubA.
Referenced by setupAuxiliaryQP(), SQProblem::setupNewAuxiliaryQP(), and solveInitialQP().
returnValue QProblem::setupSubjectToType | ( | const real_t *const | lb_new, |
const real_t *const | ub_new, | ||
const real_t *const | lbA_new, | ||
const real_t *const | ubA_new | ||
) | [protected, virtual] |
lb_new | New lower bounds. |
ub_new | New upper bounds. |
lbA_new | New lower constraints' bounds. |
ubA_new | New upper constraints' bounds. |
References Options::boundTolerance, BT_FALSE, BT_TRUE, constraints, Options::enableEqualities, Options::enableFarBounds, getNC(), SubjectTo::getType(), INFTY, lbA, QProblemB::options, RET_SETUPSUBJECTTOTYPE_FAILED, SubjectTo::setNoLower(), SubjectTo::setNoUpper(), SubjectTo::setType(), QProblemB::setupSubjectToType(), ST_BOUNDED, ST_DISABLED, ST_EQUALITY, ST_UNBOUNDED, SUCCESSFUL_RETURN, THROWERROR, and ubA.
returnValue QProblem::setupTQfactorisation | ( | ) | [protected] |
Initialises TQ factorisation of A (i.e. A*Q = [0 T]) if NO constraint is active.
References QProblemB::bounds, Bounds::getFree(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), Q, QQ, sizeT, SUCCESSFUL_RETURN, and T.
Referenced by setupAuxiliaryQP(), SQProblem::setupNewAuxiliaryQP(), and solveInitialQP().
BooleanType QProblem::shallRefactorise | ( | const Bounds *const | guessedBounds, |
const Constraints *const | guessedConstraints | ||
) | const [protected] |
Determines if it is more efficient to refactorise the matrices when hotstarting or not (i.e. better to update the existing factorisations).
guessedBounds | Guessed new working set of bounds. |
guessedConstraints | Guessed new working set of constraints. |
References QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, Constraints::getNAC(), getNC(), Bounds::getNFX(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::hessianType, HST_INDEF, and HST_SEMIDEF.
Referenced by setupAuxiliaryQP().
returnValue QProblem::solveCurrentEQP | ( | const int | n_rhs, |
const real_t * | g_in, | ||
const real_t * | lb_in, | ||
const real_t * | ub_in, | ||
const real_t * | lbA_in, | ||
const real_t * | ubA_in, | ||
real_t * | x_out, | ||
real_t * | y_out | ||
) |
Solves an equality-constrained QP problem resulting from the current working set.
n_rhs | Number of consecutive right hand sides |
g_in | Gradient of neighbouring QP to be solved. |
lb_in | Lower bounds of neighbouring QP to be solved. If no lower bounds exist, a NULL pointer can be passed. |
ub_in | Upper bounds of neighbouring QP to be solved. If no upper bounds exist, a NULL pointer can be passed. |
lbA_in | Lower constraints' bounds of neighbouring QP to be solved. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_in | Upper constraints' bounds of neighbouring QP to be solved. |
x_out | Output: Primal solution |
y_out | Output: Dual solution |
References QProblemB::bounds, BT_FALSE, constraints, determineStepDirection(), Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getNAC(), getNC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), real_t, RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.
Referenced by main().
returnValue QProblem::solveInitialQP | ( | const real_t *const | xOpt, |
const real_t *const | yOpt, | ||
const Bounds *const | guessedBounds, | ||
const Constraints *const | guessedConstraints, | ||
const real_t *const | _R, | ||
int & | nWSR, | ||
real_t *const | cputime | ||
) | [protected] |
Solves a QProblem whose QP data is assumed to be stored in the member variables. A guess for its primal/dual optimal solution vectors and the corresponding working sets of bounds and constraints can be provided. Note: This function is internally called by all init functions!
xOpt | Optimal primal solution vector. |
yOpt | Optimal dual solution vector. |
guessedBounds | Optimal working set of bounds for solution (xOpt,yOpt). |
guessedConstraints | Optimal working set of constraints for solution (xOpt,yOpt). |
_R | Pre-computed (upper triangular) Cholesky factor of Hessian matrix. |
nWSR | Input: Maximum number of working set recalculations; Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP solution. Output: CPU time spent for QP solution (or to perform nWSR iterations). |
References QProblemB::bounds, BT_FALSE, BT_TRUE, constraints, QProblemB::determineHessianType(), Options::enableRamping, QProblemB::g, getCPUtime(), getNC(), QProblemB::getNV(), QProblemB::haveCholesky, QProblemB::hessianType, hotstart(), HST_SEMIDEF, HST_ZERO, Options::initialStatusBounds, QProblemB::isInfeasible(), QProblemB::isUnbounded(), QProblemB::lb, lbA, obtainAuxiliaryWorkingSet(), QProblemB::options, performRamping(), QPS_AUXILIARYQPSOLVED, QPS_NOTINITIALISED, QPS_PREPARINGAUXILIARYQP, QProblemB::R, real_t, QProblemB::regulariseHessian(), RET_INIT_FAILED, RET_INIT_FAILED_HOTSTART, RET_INIT_FAILED_INFEASIBILITY, RET_INIT_FAILED_REGULARISATION, RET_INIT_FAILED_TQ, RET_INIT_FAILED_UNBOUNDEDNESS, RET_INIT_SUCCESSFUL, RET_MAX_NWSR_REACHED, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RR, Bounds::setupAllFree(), Constraints::setupAllInactive(), setupAuxiliaryQPbounds(), setupAuxiliaryQPgradient(), setupAuxiliaryQPsolution(), setupAuxiliaryWorkingSet(), setupSubjectToType(), setupTQfactorisation(), ST_INACTIVE, QProblemB::status, SUCCESSFUL_RETURN, THROWERROR, THROWINFO, THROWWARNING, QProblemB::ub, and ubA.
Referenced by init().
returnValue QProblem::solveQP | ( | const real_t *const | g_new, |
const real_t *const | lb_new, | ||
const real_t *const | ub_new, | ||
const real_t *const | lbA_new, | ||
const real_t *const | ubA_new, | ||
int & | nWSR, | ||
real_t *const | cputime, | ||
int | nWSRperformed = 0 , |
||
BooleanType | isFirstCall = BT_TRUE |
||
) | [protected] |
Solves QProblem using online active set strategy. Note: This function is internally called by all hotstart functions!
g_new | Gradient of neighbouring QP to be solved. |
lb_new | Lower bounds of neighbouring QP to be solved. If no lower bounds exist, a NULL pointer can be passed. |
ub_new | Upper bounds of neighbouring QP to be solved. If no upper bounds exist, a NULL pointer can be passed. |
lbA_new | Lower constraints' bounds of neighbouring QP to be solved. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_new | Upper constraints' bounds of neighbouring QP to be solved. If no upper constraints' bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations; Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP solution. Output: CPU time spent for QP solution (or to perform nWSR iterations). |
nWSRperformed | Number of working set recalculations already performed to solve this QP within previous solveQP() calls. This number is always zero, except for successive calls from solveRegularisedQP() or when using the far bound strategy. |
isFirstCall | Indicating whether this is the first call for current QP. |
References __FILE__, __FUNC__, __LINE__, BT_FALSE, BT_TRUE, changeActiveSet(), computeProjectedCholesky(), determineDataShift(), determineStepDirection(), Options::enableCholeskyRefactorisation, Options::enableDriftCorrection, Options::enableRamping, EPS, TabularOutput::excAddB, TabularOutput::excAddC, TabularOutput::excRemB, TabularOutput::excRemC, getCPUtime(), getGlobalMessageHandler(), getNC(), QProblemB::getNV(), getRelativeHomotopyLength(), QProblemB::getStatus(), TabularOutput::idxAddB, TabularOutput::idxAddC, TabularOutput::idxRemB, TabularOutput::idxRemC, QProblemB::infeasible, QProblemB::isCPUtimeLimitExceeded(), QProblemB::isInfeasible(), MAX_STRING_LENGTH, QProblemB::options, performDriftCorrection(), performRamping(), performStep(), PL_HIGH, printIteration(), Options::printLevel, QPS_HOMOTOPYQPSOLVED, QPS_NOTINITIALISED, QPS_PERFORMINGHOMOTOPY, QPS_PREPARINGAUXILIARYQP, QPS_SOLVED, real_t, RET_HOMOTOPY_STEP_FAILED, RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, RET_HOTSTART_STOPPED_INFEASIBILITY, RET_HOTSTART_STOPPED_UNBOUNDEDNESS, RET_ITERATION_STARTED, RET_MAX_NWSR_REACHED, RET_OPTIMAL_SOLUTION_FOUND, RET_PRINT_ITERATION_FAILED, RET_SHIFT_DETERMINATION_FAILED, RET_STEPDIRECTION_DETERMINATION_FAILED, RET_STEPLENGTH_DETERMINATION_FAILED, QProblemB::setInfeasibilityFlag(), ST_UNDEFINED, QProblemB::status, SUCCESSFUL_RETURN, QProblemB::tabularOutput, QProblemB::tau, Options::terminationTolerance, THROWERROR, MessageHandling::throwInfo(), THROWINFO, MessageHandling::throwWarning(), QProblemB::unbounded, and VS_VISIBLE.
Referenced by solveRegularisedQP().
returnValue QProblem::solveRegularisedQP | ( | const real_t *const | g_new, |
const real_t *const | lb_new, | ||
const real_t *const | ub_new, | ||
const real_t *const | lbA_new, | ||
const real_t *const | ubA_new, | ||
int & | nWSR, | ||
real_t *const | cputime, | ||
int | nWSRperformed = 0 , |
||
BooleanType | isFirstCall = BT_TRUE |
||
) | [protected] |
Solves QProblem using online active set strategy. Note: This function is internally called by all hotstart functions!
g_new | Gradient of neighbouring QP to be solved. |
lb_new | Lower bounds of neighbouring QP to be solved. If no lower bounds exist, a NULL pointer can be passed. |
ub_new | Upper bounds of neighbouring QP to be solved. If no upper bounds exist, a NULL pointer can be passed. |
lbA_new | Lower constraints' bounds of neighbouring QP to be solved. If no lower constraints' bounds exist, a NULL pointer can be passed. |
ubA_new | Upper constraints' bounds of neighbouring QP to be solved. If no upper constraints' bounds exist, a NULL pointer can be passed. |
nWSR | Input: Maximum number of working set recalculations; Output: Number of performed working set recalculations. |
cputime | Input: Maximum CPU time allowed for QP solution. Output: CPU time spent for QP solution (or to perform nWSR iterations). |
nWSRperformed | Number of working set recalculations already performed to solve this QP within previous solveRegularisedQP() calls. This number is always zero, except for successive calls when using the far bound strategy. |
isFirstCall | Indicating whether this is the first call for current QP. |
References BT_FALSE, QProblemB::g, QProblemB::getNV(), Options::numRegularisationSteps, QProblemB::options, real_t, QProblemB::regVal, RET_FEWER_REGSTEPS_NWSR, RET_MAX_NWSR_REACHED, RET_NO_REGSTEP_NWSR, solveQP(), SUCCESSFUL_RETURN, THROWWARNING, QProblemB::usingRegularisation(), and QProblemB::x.
Referenced by hotstart().
returnValue QProblemB::updateFarBounds | ( | real_t | curFarBound, |
int | nRamp, | ||
const real_t *const | lb_new, | ||
real_t *const | lb_new_far, | ||
const real_t *const | ub_new, | ||
real_t *const | ub_new_far | ||
) | const [protected, inherited] |
...
curFarBound | ... |
nRamp | ... |
lb_new | ... |
lb_new_far | ... |
ub_new | ... |
ub_new_far | ... |
References BT_TRUE, Options::enableRamping, getMax(), getMin(), QProblemB::getNV(), QProblemB::options, QProblemB::ramp0, QProblemB::ramp1, QProblemB::rampOffset, real_t, and SUCCESSFUL_RETURN.
Referenced by QProblemB::hotstart().
returnValue QProblem::updateFarBounds | ( | real_t | curFarBound, |
int | nRamp, | ||
const real_t *const | lb_new, | ||
real_t *const | lb_new_far, | ||
const real_t *const | ub_new, | ||
real_t *const | ub_new_far, | ||
const real_t *const | lbA_new, | ||
real_t *const | lbA_new_far, | ||
const real_t *const | ubA_new, | ||
real_t *const | ubA_new_far | ||
) | const [protected] |
...
curFarBound | ... |
nRamp | ... |
lb_new | ... |
lb_new_far | ... |
ub_new | ... |
ub_new_far | ... |
lbA_new | ... |
lbA_new_far | ... |
ubA_new | ... |
ubA_new_far | ... |
References BT_TRUE, Options::enableRamping, getMax(), getMin(), getNC(), QProblemB::getNV(), QProblemB::options, QProblemB::ramp0, QProblemB::ramp1, QProblemB::rampOffset, real_t, and SUCCESSFUL_RETURN.
Referenced by hotstart().
BooleanType QProblemB::usingRegularisation | ( | ) | const [inline, inherited] |
Returns if the QP has been internally regularised.
References BT_FALSE, BT_TRUE, QProblemB::regVal, and ZERO.
Referenced by QProblemB::computeCholesky(), computeProjectedCholesky(), determineStepDirection(), QProblemB::determineStepDirection(), SolutionAnalysis::getKktViolation(), QProblemB::getObjVal(), QProblemB::regulariseHessian(), QProblemB::removeBound(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), SQProblem::setupNewAuxiliaryQP(), solveRegularisedQP(), and QProblemB::solveRegularisedQP().
returnValue QProblem::writeQpDataIntoMatFile | ( | const char *const | filename | ) | const |
...
filename | Mat file name. |
References A, Matrix::full(), QProblemB::g, getNC(), QProblemB::getNV(), QProblemB::H, QProblemB::lb, lbA, real_t, RET_NOT_YET_IMPLEMENTED, RET_UNABLE_TO_OPEN_FILE, SUCCESSFUL_RETURN, QProblemB::ub, ubA, and writeIntoMatFile().
returnValue QProblem::writeQpWorkspaceIntoMatFile | ( | const char *const | filename | ) |
...
filename | Mat file name. |
References Ax, Ax_l, Ax_u, QProblemB::bounds, constraints, Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), Constraints::getInactive(), getNAC(), getNC(), QProblemB::getNFR(), QProblemB::getNFX(), getNIAC(), Indexlist::getNumberArray(), QProblemB::getNV(), Q, RET_NOT_YET_IMPLEMENTED, RET_UNABLE_TO_OPEN_FILE, sizeT, SUCCESSFUL_RETURN, T, and writeIntoMatFile().
Matrix* QProblem::A [protected] |
Constraint matrix.
Referenced by addBound_ensureLI(), addConstraint(), addConstraint_checkLI(), addConstraint_ensureLI(), clear(), copy(), determineStepDirection(), ensureNonzeroCurvature(), SolutionAnalysis::getKktViolation(), performStep(), printIteration(), QProblem(), removeBound(), setA(), setupAuxiliaryQP(), setupAuxiliaryQPgradient(), setupAuxiliaryQPsolution(), setupQPdataFromFile(), and writeQpDataIntoMatFile().
real_t* QProblem::Ax [protected] |
Stores the current A*x
(for increased efficiency only).
Referenced by clear(), copy(), ensureNonzeroCurvature(), hotstart(), obtainAuxiliaryWorkingSet(), performDriftCorrection(), performRamping(), performStep(), QProblem(), setA(), setupAuxiliaryQP(), setupAuxiliaryQPsolution(), SQProblem::setupNewAuxiliaryQP(), and writeQpWorkspaceIntoMatFile().
real_t* QProblem::Ax_l [protected] |
Stores the current distance to lower constraints' bounds A*x-lbA
(for increased efficiency only).
Referenced by clear(), copy(), ensureNonzeroCurvature(), performDriftCorrection(), performRamping(), performStep(), QProblem(), removeConstraint(), setA(), setupAuxiliaryQP(), setupAuxiliaryQPbounds(), setupAuxiliaryQPsolution(), SQProblem::setupNewAuxiliaryQP(), and writeQpWorkspaceIntoMatFile().
real_t* QProblem::Ax_u [protected] |
Stores the current distance to lower constraints' bounds ubA-A*x
(for increased efficiency only).
Referenced by clear(), copy(), ensureNonzeroCurvature(), obtainAuxiliaryWorkingSet(), performDriftCorrection(), performRamping(), performStep(), QProblem(), removeConstraint(), setA(), setupAuxiliaryQP(), setupAuxiliaryQPbounds(), setupAuxiliaryQPsolution(), SQProblem::setupNewAuxiliaryQP(), and writeQpWorkspaceIntoMatFile().
Bounds QProblemB::bounds [protected, inherited] |
Data structure for problem's bounds.
Referenced by addBound(), QProblemB::addBound(), addBound_ensureLI(), addConstraint(), addConstraint_checkLI(), addConstraint_ensureLI(), QProblemB::computeCholesky(), computeProjectedCholesky(), QProblemB::copy(), QProblemB::determineDataShift(), determineStepDirection(), QProblemB::determineStepDirection(), dropInfeasibles(), ensureNonzeroCurvature(), QProblemB::getBounds(), QProblemB::getNFR(), QProblemB::getNFV(), QProblemB::getNFX(), QProblemB::getNV(), SolutionAnalysis::getVarianceCovariance(), QProblemB::getWorkingSetBounds(), hotstart(), QProblemB::obtainAuxiliaryWorkingSet(), performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), performRamping(), performStep(), QProblemB::performStep(), printProperties(), QProblemB::printProperties(), QProblemB::QProblemB(), removeBound(), QProblemB::removeBound(), removeConstraint(), QProblemB::reset(), setupAuxiliaryQP(), QProblemB::setupAuxiliaryQP(), setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), setupAuxiliaryWorkingSet(), QProblemB::setupAuxiliaryWorkingSet(), SQProblem::setupNewAuxiliaryQP(), QProblemB::setupSubjectToType(), setupTQfactorisation(), shallRefactorise(), QProblemB::shallRefactorise(), solveCurrentEQP(), solveInitialQP(), QProblemB::solveInitialQP(), and writeQpWorkspaceIntoMatFile().
ConstraintProduct* QProblem::constraintProduct [protected] |
Pointer to user-defined constraint product function.
Referenced by copy(), performStep(), QProblem(), reset(), and setConstraintProduct().
Constraints QProblem::constraints [protected] |
Data structure for problem's constraints.
Referenced by addBound_ensureLI(), addConstraint(), addConstraint_checkLI(), addConstraint_ensureLI(), computeProjectedCholesky(), copy(), determineDataShift(), determineStepDirection(), dropInfeasibles(), ensureNonzeroCurvature(), getConstraints(), getNAC(), getNC(), getNEC(), getNIAC(), SolutionAnalysis::getVarianceCovariance(), getWorkingSetConstraints(), hotstart(), obtainAuxiliaryWorkingSet(), performDriftCorrection(), performRamping(), performStep(), printProperties(), QProblem(), removeBound(), removeConstraint(), reset(), setA(), setupAuxiliaryQP(), setupAuxiliaryQPbounds(), setupAuxiliaryWorkingSet(), SQProblem::setupNewAuxiliaryQP(), setupSubjectToType(), shallRefactorise(), solveCurrentEQP(), solveInitialQP(), and writeQpWorkspaceIntoMatFile().
unsigned int QProblemB::count [protected, inherited] |
Counts the number of hotstart function calls.
Referenced by QProblemB::copy(), QProblemB::getCount(), QProblemB::hotstart(), hotstart(), printIteration(), QProblemB::printIteration(), QProblemB::QProblemB(), and QProblemB::resetCounter().
real_t* QProblemB::delta_xFR_TMP [protected, inherited] |
Temporary for determineStepDirection
Referenced by QProblemB::clear(), QProblemB::copy(), determineStepDirection(), QProblemB::determineStepDirection(), and QProblemB::QProblemB().
real_t* QProblem::delta_xFRy [protected] |
Temporary for determineStepDirection.
Referenced by clear(), copy(), determineStepDirection(), and QProblem().
real_t* QProblem::delta_xFRz [protected] |
Temporary for determineStepDirection.
Referenced by clear(), copy(), determineStepDirection(), and QProblem().
real_t* QProblem::delta_yAC_TMP [protected] |
Temporary for determineStepDirection.
Referenced by clear(), copy(), determineStepDirection(), and QProblem().
Flipper QProblemB::flipper [protected, inherited] |
Struct for making a temporary copy of the matrix factorisations.
Referenced by QProblemB::copy(), QProblem(), QProblemB::QProblemB(), removeBound(), QProblemB::removeBound(), removeConstraint(), reset(), and QProblemB::reset().
BooleanType QProblem::freeConstraintMatrix [protected] |
Flag indicating whether the constraint matrix needs to be de-allocated.
Referenced by clear(), copy(), QProblem(), setA(), and SQProblem::setupNewAuxiliaryQP().
BooleanType QProblemB::freeHessian [protected, inherited] |
Flag indicating whether the Hessian matrix needs to be de-allocated.
Referenced by QProblemB::clear(), QProblemB::copy(), QProblemB::QProblemB(), QProblemB::setH(), and SQProblem::setupNewAuxiliaryQP().
real_t* QProblemB::g [protected, inherited] |
Gradient.
Referenced by QProblemB::clear(), QProblemB::copy(), QProblemB::determineDataShift(), SolutionAnalysis::getKktViolation(), QProblemB::getObjVal(), QProblemB::getRelativeHomotopyLength(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), QProblemB::QProblemB(), QProblemB::regulariseHessian(), QProblemB::setG(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), QProblemB::setupQPdataFromFile(), solveInitialQP(), QProblemB::solveInitialQP(), solveRegularisedQP(), QProblemB::solveRegularisedQP(), and writeQpDataIntoMatFile().
SymmetricMatrix* QProblemB::H [protected, inherited] |
Hessian matrix.
Referenced by QProblemB::clear(), QProblemB::computeCholesky(), computeProjectedCholesky(), QProblemB::copy(), QProblemB::determineHessianType(), determineStepDirection(), QProblemB::determineStepDirection(), SolutionAnalysis::getKktViolation(), QProblemB::getObjVal(), printIteration(), QProblemB::printIteration(), QProblemB::QProblemB(), QProblemB::regulariseHessian(), removeBound(), QProblemB::removeBound(), removeConstraint(), QProblemB::setH(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), SQProblem::setupNewAuxiliaryQP(), QProblemB::setupQPdataFromFile(), and writeQpDataIntoMatFile().
BooleanType QProblemB::haveCholesky [protected, inherited] |
Flag indicating whether Cholesky decomposition has already been setup.
Referenced by QProblemB::copy(), QProblemB::hotstart(), hotstart(), QProblemB::QProblemB(), QProblemB::reset(), QProblemB::setupInitialCholesky(), setupInitialCholesky(), solveInitialQP(), and QProblemB::solveInitialQP().
HessianType QProblemB::hessianType [protected, inherited] |
Type of Hessian matrix.
Referenced by addBound(), QProblemB::addBound(), addConstraint(), QProblemB::computeCholesky(), computeProjectedCholesky(), QProblemB::copy(), QProblemB::determineHessianType(), determineStepDirection(), QProblemB::determineStepDirection(), QProblemB::getHessianType(), QProblemB::getObjVal(), printIteration(), QProblemB::printIteration(), printProperties(), QProblemB::printProperties(), QProblemB::QProblemB(), QProblemB::regulariseHessian(), removeBound(), QProblemB::removeBound(), removeConstraint(), QProblemB::reset(), QProblemB::setH(), QProblemB::setHessianType(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), SQProblem::setupNewAuxiliaryQP(), shallRefactorise(), QProblemB::shallRefactorise(), solveInitialQP(), and QProblemB::solveInitialQP().
BooleanType QProblemB::infeasible [protected, inherited] |
real_t* QProblemB::lb [protected, inherited] |
Lower bound vector (on variables).
Referenced by QProblemB::clear(), QProblemB::copy(), QProblemB::determineDataShift(), ensureNonzeroCurvature(), SolutionAnalysis::getKktViolation(), QProblemB::getRelativeHomotopyLength(), QProblemB::obtainAuxiliaryWorkingSet(), performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), performRamping(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), QProblemB::QProblemB(), removeBound(), QProblemB::removeBound(), QProblemB::setLB(), setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), QProblemB::setupQPdataFromFile(), QProblemB::setupSubjectToType(), setupSubjectToType(), solveInitialQP(), QProblemB::solveInitialQP(), and writeQpDataIntoMatFile().
real_t* QProblem::lbA [protected] |
Lower constraints' bound vector.
Referenced by clear(), copy(), determineDataShift(), ensureNonzeroCurvature(), SolutionAnalysis::getKktViolation(), getRelativeHomotopyLength(), obtainAuxiliaryWorkingSet(), performDriftCorrection(), performRamping(), performStep(), printIteration(), QProblem(), removeConstraint(), setA(), setLBA(), setupAuxiliaryQPbounds(), SQProblem::setupNewAuxiliaryQP(), setupQPdataFromFile(), setupSubjectToType(), solveInitialQP(), and writeQpDataIntoMatFile().
Options QProblemB::options [protected, inherited] |
Struct containing all user-defined options for solving QPs.
Referenced by addBound_checkLI(), addBound_ensureLI(), addConstraint_checkLI(), addConstraint_ensureLI(), changeActiveSet(), QProblemB::computeCholesky(), computeProjectedCholesky(), QProblemB::copy(), QProblemB::determineHessianType(), determineStepDirection(), QProblemB::determineStepDirection(), dropInfeasibles(), ensureNonzeroCurvature(), QProblemB::getOptions(), QProblemB::getPrintLevel(), QProblemB::hotstart(), hotstart(), QProblemB::obtainAuxiliaryWorkingSet(), obtainAuxiliaryWorkingSet(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), QProblemB::printOptions(), printProperties(), QProblemB::printProperties(), QProblemB::QProblemB(), QProblemB::regulariseHessian(), removeBound(), QProblemB::removeBound(), removeConstraint(), QProblemB::reset(), QProblemB::setInfeasibilityFlag(), QProblemB::setOptions(), QProblemB::setPrintLevel(), setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), setupAuxiliaryWorkingSet(), QProblemB::setupInitialCholesky(), setupInitialCholesky(), SQProblem::setupNewAuxiliaryQP(), QProblemB::setupSubjectToType(), setupSubjectToType(), solveInitialQP(), QProblemB::solveInitialQP(), solveQP(), QProblemB::solveQP(), solveRegularisedQP(), QProblemB::solveRegularisedQP(), QProblemB::updateFarBounds(), and updateFarBounds().
real_t* QProblem::Q [protected] |
Orthonormal quadratic matrix, A = [0 T]*Q'.
Referenced by clear(), computeProjectedCholesky(), copy(), QProblem(), removeBound(), removeConstraint(), reset(), setupTQfactorisation(), and writeQpWorkspaceIntoMatFile().
real_t* QProblemB::R [protected, inherited] |
Cholesky factor of H (i.e. H = R^T*R).
Referenced by QProblemB::clear(), QProblemB::computeCholesky(), computeProjectedCholesky(), QProblemB::copy(), QProblemB::init(), init(), QProblemB::QProblemB(), removeBound(), QProblemB::removeBound(), removeConstraint(), QProblemB::reset(), solveInitialQP(), and QProblemB::solveInitialQP().
real_t QProblemB::ramp0 [protected, inherited] |
Start value for Ramping Strategy.
Referenced by QProblemB::copy(), QProblemB::performRamping(), performRamping(), QProblemB::QProblemB(), QProblemB::reset(), QProblemB::updateFarBounds(), and updateFarBounds().
real_t QProblemB::ramp1 [protected, inherited] |
Final value for Ramping Strategy.
Referenced by QProblemB::copy(), QProblemB::performRamping(), performRamping(), QProblemB::QProblemB(), QProblemB::reset(), QProblemB::updateFarBounds(), and updateFarBounds().
int QProblemB::rampOffset [protected, inherited] |
Offset index for Ramping.
Referenced by QProblemB::hotstart(), hotstart(), QProblemB::performRamping(), performRamping(), QProblemB::QProblemB(), QProblemB::reset(), QProblemB::updateFarBounds(), and updateFarBounds().
real_t QProblemB::regVal [protected, inherited] |
Holds the offset used to regularise Hessian matrix (zero by default).
Referenced by QProblemB::computeCholesky(), computeProjectedCholesky(), QProblemB::copy(), determineStepDirection(), QProblemB::determineStepDirection(), SolutionAnalysis::getKktViolation(), QProblemB::getObjVal(), printIteration(), QProblemB::QProblemB(), QProblemB::regulariseHessian(), QProblemB::removeBound(), QProblemB::reset(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), SQProblem::setupNewAuxiliaryQP(), solveRegularisedQP(), QProblemB::solveRegularisedQP(), and QProblemB::usingRegularisation().
int QProblem::sizeT [protected] |
Matrix T is stored in a (sizeT x sizeT) array.
Referenced by addBound(), addConstraint(), backsolveT(), copy(), printIteration(), QProblem(), removeBound(), removeConstraint(), reset(), setupTQfactorisation(), and writeQpWorkspaceIntoMatFile().
QProblemStatus QProblemB::status [protected, inherited] |
Current status of the solution process.
Referenced by QProblemB::copy(), QProblemB::getStatus(), QProblemB::hotstart(), hotstart(), QProblemB::isInitialised(), QProblemB::isSolved(), printProperties(), QProblemB::printProperties(), QProblemB::QProblemB(), QProblemB::reset(), setupAuxiliaryQP(), QProblemB::setupAuxiliaryQP(), SQProblem::setupNewAuxiliaryQP(), solveInitialQP(), QProblemB::solveInitialQP(), solveQP(), and QProblemB::solveQP().
real_t* QProblem::T [protected] |
Reverse triangular matrix, A = [0 T]*Q'.
Referenced by clear(), copy(), QProblem(), removeBound(), removeConstraint(), reset(), setupTQfactorisation(), and writeQpWorkspaceIntoMatFile().
TabularOutput QProblemB::tabularOutput [protected, inherited] |
Struct storing information for tabular output (printLevel == PL_TABULAR).
Referenced by addBound(), QProblemB::addBound(), addBound_ensureLI(), addConstraint(), addConstraint_ensureLI(), printIteration(), QProblemB::printIteration(), removeBound(), QProblemB::removeBound(), removeConstraint(), solveQP(), and QProblemB::solveQP().
real_t QProblemB::tau [protected, inherited] |
Last homotopy step length.
Referenced by QProblemB::copy(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), QProblemB::QProblemB(), QProblemB::reset(), solveQP(), and QProblemB::solveQP().
real_t* QProblem::tempA [protected] |
Temporary for determineStepDirection.
Referenced by clear(), copy(), determineStepDirection(), and QProblem().
real_t* QProblem::tempB [protected] |
Temporary for determineStepDirection.
Referenced by clear(), copy(), determineStepDirection(), and QProblem().
real_t* QProblemB::ub [protected, inherited] |
Upper bound vector (on variables).
Referenced by QProblemB::clear(), QProblemB::copy(), QProblemB::determineDataShift(), ensureNonzeroCurvature(), SolutionAnalysis::getKktViolation(), QProblemB::getRelativeHomotopyLength(), QProblemB::obtainAuxiliaryWorkingSet(), performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), performRamping(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), QProblemB::QProblemB(), removeBound(), QProblemB::removeBound(), QProblemB::setUB(), setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), QProblemB::setupQPdataFromFile(), QProblemB::setupSubjectToType(), setupSubjectToType(), solveInitialQP(), QProblemB::solveInitialQP(), and writeQpDataIntoMatFile().
real_t* QProblem::ubA [protected] |
Upper constraints' bound vector.
Referenced by clear(), copy(), determineDataShift(), ensureNonzeroCurvature(), SolutionAnalysis::getKktViolation(), getRelativeHomotopyLength(), obtainAuxiliaryWorkingSet(), performDriftCorrection(), performRamping(), performStep(), printIteration(), QProblem(), removeConstraint(), setA(), setUBA(), setupAuxiliaryQPbounds(), SQProblem::setupNewAuxiliaryQP(), setupQPdataFromFile(), setupSubjectToType(), solveInitialQP(), and writeQpDataIntoMatFile().
BooleanType QProblemB::unbounded [protected, inherited] |
QP unbounded?
Referenced by QProblemB::copy(), ensureNonzeroCurvature(), QProblemB::hotstart(), hotstart(), QProblemB::isUnbounded(), printProperties(), QProblemB::printProperties(), QProblemB::QProblemB(), QProblemB::reset(), solveQP(), and QProblemB::solveQP().
real_t* QProblemB::x [protected, inherited] |
Primal solution vector.
Referenced by QProblemB::clear(), QProblemB::copy(), ensureNonzeroCurvature(), SolutionAnalysis::getKktViolation(), QProblemB::getObjVal(), QProblemB::getPrimalSolution(), QProblemB::hotstart(), hotstart(), performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), performRamping(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), QProblemB::QProblemB(), setA(), setupAuxiliaryQP(), setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), setupAuxiliaryQPsolution(), QProblemB::setupAuxiliaryQPsolution(), solveRegularisedQP(), and QProblemB::solveRegularisedQP().
real_t* QProblemB::y [protected, inherited] |
Dual solution vector.
Referenced by addBound_ensureLI(), addConstraint_ensureLI(), changeActiveSet(), QProblemB::changeActiveSet(), QProblemB::clear(), copy(), QProblemB::copy(), QProblemB::getDualSolution(), getDualSolution(), SolutionAnalysis::getKktViolation(), performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), performRamping(), performStep(), QProblemB::performStep(), printIteration(), QProblemB::printIteration(), QProblem(), QProblemB::QProblemB(), setupAuxiliaryQP(), QProblemB::setupAuxiliaryQP(), setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), setupAuxiliaryQPsolution(), QProblemB::setupAuxiliaryQPsolution(), and SQProblem::setupNewAuxiliaryQP().
real_t* QProblem::ZFR_delta_xFRz [protected] |
Temporary for determineStepDirection.
Referenced by clear(), copy(), determineStepDirection(), and QProblem().