qpOASES  3.2.1
An Implementation of the Online Active Set Strategy
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SQProblem Class Reference

Implements the online active set strategy for QPs with varying matrices. More...

#include <SQProblem.hpp>

Inheritance diagram for SQProblem:
QProblem QProblemB SQProblemSchur

Public Member Functions

 SQProblem ()
 
 SQProblem (int_t _nV, int_t _nC, HessianType _hessianType=HST_UNKNOWN, BooleanType allocDenseMats=BT_TRUE)
 
 SQProblem (const SQProblem &rhs)
 
virtual ~SQProblem ()
 
virtual SQProblemoperator= (const SQProblem &rhs)
 
returnValue hotstart (SymmetricMatrix *H_new, const real_t *const g_new, Matrix *A_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_t &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0)
 
returnValue hotstart (const real_t *const H_new, const real_t *const g_new, const real_t *const A_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_t &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0)
 
returnValue hotstart (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_t &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=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_t &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_t &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0)
 
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_t &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_t &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_t &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 init (SymmetricMatrix *_H, const real_t *const _g, const real_t *const _lb, const real_t *const _ub, int_t &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_t &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_t &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_t &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_t &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0)
 
returnValue solveCurrentEQP (const int_t 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_t getNC () const
 
int_t getNEC () const
 
int_t getNAC () const
 
int_t getNIAC () const
 
virtual int_t getNZ () const
 
virtual returnValue getDualSolution (real_t *const yOpt) const
 
returnValue setConstraintProduct (ConstraintProduct *const _constraintProduct)
 
virtual returnValue printProperties ()
 
returnValue getFreeVariablesFlags (BooleanType *varIsFree)
 
returnValue writeQpDataIntoMatFile (const char *const filename) const
 
returnValue writeQpWorkspaceIntoMatFile (const char *const filename)
 
returnValue getBounds (Bounds &_bounds) const
 
int_t getNV () const
 
int_t getNFR () const
 
int_t getNFX () const
 
int_t 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)
 
uint_t getCount () const
 
returnValue resetCounter ()
 
returnValue printOptions () const
 

Protected Member Functions

virtual returnValue setupNewAuxiliaryQP (SymmetricMatrix *H_new, Matrix *A_new, const real_t *lb_new, const real_t *ub_new, const real_t *lbA_new, const real_t *ubA_new)
 
virtual returnValue setupNewAuxiliaryQP (const real_t *const H_new, const real_t *const A_new, const real_t *lb_new, const real_t *ub_new, const real_t *lbA_new, const real_t *ubA_new)
 
returnValue clear ()
 
returnValue copy (const QProblem &rhs)
 
returnValue copy (const QProblemB &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_t &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_t &nWSR, real_t *const cputime, int_t 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_t &nWSR, real_t *const cputime, int_t nWSRperformed=0, BooleanType isFirstCall=BT_TRUE)
 
virtual returnValue updateActivitiesForHotstart (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 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)
 
virtual returnValue setupSubjectToType ()
 
virtual returnValue setupSubjectToType (const real_t *const lb_new, const real_t *const ub_new)
 
virtual returnValue setupSubjectToType (const real_t *const lb_new, const real_t *const ub_new)
 
virtual returnValue computeProjectedCholesky ()
 
virtual returnValue setupInitialCholesky ()
 
virtual 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 obtainAuxiliaryWorkingSet (const real_t *const xOpt, const real_t *const yOpt, const Bounds *const guessedBounds, Bounds *auxiliaryBounds) const
 
virtual 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)
 
virtual returnValue addConstraint (int_t number, SubjectToStatus C_status, BooleanType updateCholesky, BooleanType ensureLI=BT_TRUE)
 
virtual returnValue addConstraint_checkLI (int_t number)
 
virtual returnValue addConstraint_ensureLI (int_t number, SubjectToStatus C_status)
 
virtual returnValue addBound (int_t number, SubjectToStatus B_status, BooleanType updateCholesky, BooleanType ensureLI=BT_TRUE)
 
virtual returnValue addBound_checkLI (int_t number)
 
virtual returnValue addBound_ensureLI (int_t number, SubjectToStatus B_status)
 
virtual returnValue removeConstraint (int_t number, BooleanType updateCholesky, BooleanType allowFlipping=BT_FALSE, BooleanType ensureNZC=BT_FALSE)
 
virtual returnValue removeBound (int_t number, BooleanType updateCholesky, BooleanType allowFlipping=BT_FALSE, BooleanType ensureNZC=BT_FALSE)
 
returnValue performPlainRatioTest (int_t nIdx, const int_t *const idxList, const real_t *const num, const real_t *const den, real_t epsNum, real_t epsDen, real_t &t, int_t &BC_idx) const
 
returnValue ensureNonzeroCurvature (BooleanType removeBoundNotConstraint, int_t remIdx, BooleanType &exchangeHappened, BooleanType &addBoundNotConstraint, int_t &addIdx, SubjectToStatus &addStatus)
 
virtual 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 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)
 
virtual 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_t &BC_idx, SubjectToStatus &BC_status, BooleanType &BC_isBound)
 
returnValue changeActiveSet (int_t 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)
 
real_t getRelativeHomotopyLength (const real_t *const g_new, const real_t *const lb_new, const real_t *const ub_new)
 
virtual returnValue performRamping ()
 
returnValue updateFarBounds (real_t curFarBound, int_t 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
 
returnValue updateFarBounds (real_t curFarBound, int_t 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
 
virtual returnValue performDriftCorrection ()
 
virtual returnValue setupAuxiliaryQP (const Bounds *const guessedBounds, const Constraints *const guessedConstraints)
 
virtual returnValue setupAuxiliaryQP (const Bounds *const guessedBounds)
 
virtual returnValue setupAuxiliaryQP (const Bounds *const guessedBounds)
 
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 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 A_file, const char *const lb_file, const char *const ub_file, const char *const lbA_file, const char *const ubA_file)
 
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, 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 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 printIteration (int_t iter, int_t 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_t number, real_t value)
 
returnValue setUBA (const real_t *const ubA_new)
 
returnValue setUBA (int_t number, real_t value)
 
returnValue dropInfeasibles (int_t 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 areBoundsConsistent (const real_t *const lb, const real_t *const ub) const
 
returnValue determineHessianType ()
 
virtual returnValue computeCholesky ()
 
virtual returnValue backsolveR (const real_t *const b, BooleanType transposed, real_t *const a) const
 
virtual returnValue backsolveR (const real_t *const b, BooleanType transposed, BooleanType removingBound, real_t *const a) const
 
returnValue setInfeasibilityFlag (returnValue returnvalue, BooleanType doThrowError=BT_FALSE)
 
BooleanType isCPUtimeLimitExceeded (const real_t *const cputime, real_t starttime, int_t 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_t number, real_t value)
 
returnValue setUB (const real_t *const ub_new)
 
returnValue setUB (int_t 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
 
returnValue performRatioTest (int_t nIdx, const int_t *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_t &BC_idx) const
 
BooleanType isBlocking (real_t num, real_t den, real_t epsNum, real_t epsDen, real_t &t) const
 
SymSparseMatcreateDiagSparseMat (int_t n, real_t diagVal=1.0)
 

Protected Attributes

BooleanType freeConstraintMatrix
 
MatrixA
 
real_tlbA
 
real_tubA
 
Constraints constraints
 
real_tT
 
real_tQ
 
int_t sizeT
 
real_tAx
 
real_tAx_l
 
real_tAx_u
 
ConstraintProductconstraintProduct
 
real_ttempA
 
real_ttempB
 
real_tZFR_delta_xFRz
 
real_tdelta_xFRy
 
real_tdelta_xFRz
 
real_tdelta_yAC_TMP
 
real_ttempC
 
BooleanType freeHessian
 
SymmetricMatrixH
 
real_tg
 
real_tlb
 
real_tub
 
Bounds bounds
 
real_tR
 
BooleanType haveCholesky
 
real_tx
 
real_ty
 
real_t tau
 
QProblemStatus status
 
BooleanType infeasible
 
BooleanType unbounded
 
HessianType hessianType
 
real_t regVal
 
uint_t count
 
real_tdelta_xFR_TMP
 
real_t ramp0
 
real_t ramp1
 
int_t rampOffset
 
Options options
 
Flipper flipper
 
TabularOutput tabularOutput
 

Friends

class SolutionAnalysis
 

Detailed Description

A class for setting up and solving quadratic programs with varying QP matrices. The main feature is the possibily to use the newly developed online active set strategy for parametric quadratic programming.

Author
Hans Joachim Ferreau, Andreas Potschka, Christian Kirches
Version
3.2
Date
2007-2017

Constructor & Destructor Documentation

◆ SQProblem() [1/3]

BEGIN_NAMESPACE_QPOASES SQProblem::SQProblem ( )

Default constructor.

◆ SQProblem() [2/3]

SQProblem::SQProblem ( int_t  _nV,
int_t  _nC,
HessianType  _hessianType = HST_UNKNOWN,
BooleanType  allocDenseMats = BT_TRUE 
)

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.

Parameters
_nVNumber of variables.
_nCNumber of constraints.
_hessianTypeType of Hessian matrix.
allocDenseMatsEnable allocation of dense matrices.

◆ SQProblem() [3/3]

SQProblem::SQProblem ( const SQProblem rhs)

Copy constructor (deep copy).

Parameters
rhsRhs object.

◆ ~SQProblem()

SQProblem::~SQProblem ( )
virtual

Destructor.

Member Function Documentation

◆ addBound()

returnValue QProblem::addBound ( int_t  number,
SubjectToStatus  B_status,
BooleanType  updateCholesky,
BooleanType  ensureLI = BT_TRUE 
)
protectedvirtualinherited

◆ addBound_checkLI()

returnValue QProblem::addBound_checkLI ( int_t  number)
protectedvirtualinherited

Checks if new active bound to be added is linearly dependent from from row of the active constraints matrix.

Returns
RET_LINEARLY_DEPENDENT
RET_LINEARLY_INDEPENDENT
Parameters
numberNumber of bound to be added to active set.

Reimplemented in SQProblemSchur.

References BT_FALSE, QProblem::determineStepDirection(), Options::enableFullLITests, Options::epsLITests, getAbs(), QProblem::getNAC(), QProblem::getNC(), QProblemB::getNFR(), QProblemB::getNFX(), QProblemB::getNV(), QProblem::getNZ(), QProblemB::options, QQ, real_t, RET_LINEARLY_DEPENDENT, RET_LINEARLY_INDEPENDENT, SUCCESSFUL_RETURN, and THROWINFO.

Referenced by QProblem::addBound_ensureLI(), QProblem::setupAuxiliaryWorkingSet(), and QProblem::updateActivitiesForHotstart().

◆ addBound_ensureLI()

returnValue QProblem::addBound_ensureLI ( int_t  number,
SubjectToStatus  B_status 
)
protectedvirtualinherited

Ensures linear independence of constraint matrix when a new bound is added. To this end a bound or constraint is removed simultaneously if necessary.

Returns
SUCCESSFUL_RETURN
RET_LI_RESOLVED
RET_ENSURELI_FAILED
RET_ENSURELI_FAILED_TQ
RET_ENSURELI_FAILED_NOINDEX
RET_REMOVE_FROM_ACTIVESET
Parameters
numberNumber of bound to be added to active set.
B_statusStatus of new active bound.

Reimplemented in SQProblemSchur.

References __FILE__, __FUNC__, __LINE__, QProblem::A, QProblem::addBound_checkLI(), QProblem::backsolveT(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraints, QProblem::dropInfeasibles(), Options::enableDropInfeasibles, Options::epsDen, Options::epsNum, TabularOutput::excRemB, TabularOutput::excRemC, Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getGlobalMessageHandler(), QProblem::getNAC(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), QProblem::getNZ(), MAX_STRING_LENGTH, Options::maxDualJump, QProblemB::options, QProblemB::performRatioTest(), QQ, real_t, QProblem::removeBound(), QProblem::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 QProblem::addBound().

◆ addConstraint()

returnValue QProblem::addConstraint ( int_t  number,
SubjectToStatus  C_status,
BooleanType  updateCholesky,
BooleanType  ensureLI = BT_TRUE 
)
protectedvirtualinherited

Adds a constraint to active set.

Returns
SUCCESSFUL_RETURN
RET_ADDCONSTRAINT_FAILED
RET_ADDCONSTRAINT_FAILED_INFEASIBILITY
RET_ENSURELI_FAILED
Parameters
numberNumber of constraint to be added to active set.
C_statusStatus of new active constraint.
updateCholeskyFlag indicating if Cholesky decomposition shall be updated.
ensureLIEnsure linear independence by exchange rules by default.

Reimplemented in SQProblemSchur.

References QProblem::A, QProblem::addConstraint_ensureLI(), QProblemB::applyGivens(), QProblemB::bounds, BT_TRUE, QProblemB::computeGivens(), QProblem::constraints, Bounds::getFree(), QProblem::getNAC(), Constraints::getNC(), QProblemB::getNFR(), Constraints::getNUC(), Indexlist::getNumberArray(), QProblemB::getNV(), QProblem::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, QProblem::sizeT, ST_INACTIVE, SUCCESSFUL_RETURN, QProblemB::tabularOutput, THROWERROR, and TT.

Referenced by QProblem::changeActiveSet(), QProblem::removeBound(), QProblem::removeConstraint(), and QProblem::setupAuxiliaryWorkingSet().

◆ addConstraint_checkLI()

returnValue QProblem::addConstraint_checkLI ( int_t  number)
protectedvirtualinherited

◆ addConstraint_ensureLI()

returnValue QProblem::addConstraint_ensureLI ( int_t  number,
SubjectToStatus  C_status 
)
protectedvirtualinherited

Ensures linear independence of constraint matrix when a new constraint is added. To this end a bound or constraint is removed simultaneously if necessary.

Returns
SUCCESSFUL_RETURN
RET_LI_RESOLVED
RET_ENSURELI_FAILED
RET_ENSURELI_FAILED_TQ
RET_ENSURELI_FAILED_NOINDEX
RET_REMOVE_FROM_ACTIVESET
Parameters
numberNumber of constraint to be added to active set.
C_statusStatus of new active bound.

Reimplemented in SQProblemSchur.

References __FILE__, __FUNC__, __LINE__, QProblem::A, QProblem::addConstraint_checkLI(), QProblem::backsolveT(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraints, QProblem::dropInfeasibles(), Options::enableDropInfeasibles, Options::epsDen, Options::epsNum, TabularOutput::excRemB, TabularOutput::excRemC, Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getGlobalMessageHandler(), QProblem::getNAC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), QProblem::getNZ(), Matrix::getRow(), MAX_STRING_LENGTH, Options::maxDualJump, QProblemB::options, QProblemB::performRatioTest(), QQ, real_t, QProblem::removeBound(), QProblem::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 QProblem::addConstraint().

◆ applyGivens()

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
inlineprotectedinherited

Applies Givens matrix determined by c and s (cf. computeGivens).

Returns
SUCCESSFUL_RETURN
Parameters
cCosine entry of Givens matrix.
sSine entry of Givens matrix.
nuFurther factor: s/(1+c).
xoldMatrix entry to be transformed corresponding to the normalised entry of the original matrix.
yoldMatrix entry to be transformed corresponding to the annihilated entry of the original matrix.
xnewOutput: Transformed matrix entry corresponding to the normalised entry of the original matrix.
ynewOutput: Transformed matrix entry corresponding to the annihilated entry of the original matrix.

Referenced by QProblem::addBound(), QProblemB::addBound(), QProblem::addConstraint(), SQProblemSchur::calcDetSchur(), QProblem::removeBound(), QProblem::removeConstraint(), and SQProblemSchur::updateSchurQR().

◆ areBoundsConsistent() [1/2]

returnValue QProblemB::areBoundsConsistent ( const real_t *const  lb,
const real_t *const  ub 
) const
protectedinherited

Decides if lower bounds are smaller than upper bounds

Returns
SUCCESSFUL_RETURN
RET_QP_INFEASIBLE
Parameters
lbVector of lower bounds
ubVector of upper bounds

References EPS, QProblemB::getNV(), RET_QP_INFEASIBLE, and SUCCESSFUL_RETURN.

Referenced by QProblem::areBoundsConsistent(), and QProblemB::hotstart().

◆ areBoundsConsistent() [2/2]

returnValue QProblem::areBoundsConsistent ( const real_t *const  lb,
const real_t *const  ub,
const real_t *const  lbA,
const real_t *const  ubA 
) const
protectedinherited

Decides if lower bounds are smaller than upper bounds

Returns
SUCCESSFUL_RETURN
RET_QP_INFEASIBLE
Parameters
lbVector of lower bounds
ubVector of upper bounds
lbAVector of lower constraints
ubAVector of upper constraints

References QProblemB::areBoundsConsistent(), EPS, QProblem::getNC(), RET_QP_INFEASIBLE, and SUCCESSFUL_RETURN.

Referenced by QProblem::hotstart().

◆ backsolveR() [1/2]

returnValue QProblemB::backsolveR ( const real_t *const  b,
BooleanType  transposed,
real_t *const  a 
) const
protectedvirtualinherited

Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.

Returns
SUCCESSFUL_RETURN
RET_DIV_BY_ZERO
Parameters
bRight hand side vector.
transposedIndicates if the transposed system shall be solved.
aOutput: Solution vector

Reimplemented in SQProblemSchur.

References BT_FALSE.

Referenced by QProblem::determineStepDirection(), QProblemB::determineStepDirection(), QProblem::removeBound(), QProblemB::removeBound(), and QProblem::removeConstraint().

◆ backsolveR() [2/2]

returnValue QProblemB::backsolveR ( const real_t *const  b,
BooleanType  transposed,
BooleanType  removingBound,
real_t *const  a 
) const
protectedvirtualinherited

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()".

Returns
SUCCESSFUL_RETURN
RET_DIV_BY_ZERO
Parameters
bRight hand side vector.
transposedIndicates if the transposed system shall be solved.
removingBoundIndicates if function is called from "removeBound()".
aOutput: Solution vector

Reimplemented in SQProblemSchur.

References BT_FALSE, BT_TRUE, getAbs(), QProblemB::getNV(), QProblemB::getNZ(), real_t, RET_DIV_BY_ZERO, RR, SUCCESSFUL_RETURN, THROWERROR, and ZERO.

◆ backsolveT()

returnValue QProblem::backsolveT ( const real_t *const  b,
BooleanType  transposed,
real_t *const  a 
) const
protectedvirtualinherited

Solves the system Ta = b or T^Ta = b where T is a reverse upper triangular matrix.

Returns
SUCCESSFUL_RETURN
RET_DIV_BY_ZERO
Parameters
bRight hand side vector.
transposedIndicates if the transposed system shall be solved.
aOutput: Solution vector

Reimplemented in SQProblemSchur.

References BT_FALSE, EPS, getAbs(), QProblem::getNAC(), real_t, RET_DIV_BY_ZERO, QProblem::sizeT, SUCCESSFUL_RETURN, THROWERROR, and TT.

Referenced by QProblem::addBound_ensureLI(), QProblem::addConstraint_ensureLI(), and QProblem::determineStepDirection().

◆ changeActiveSet()

returnValue QProblem::changeActiveSet ( int_t  BC_idx,
SubjectToStatus  BC_status,
BooleanType  BC_isBound 
)
protectedinherited

◆ clear()

returnValue QProblem::clear ( )
protectedinherited

◆ computeCholesky()

returnValue QProblemB::computeCholesky ( )
protectedvirtualinherited

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.

Returns
SUCCESSFUL_RETURN
RET_HESSIAN_NOT_SPD
RET_INDEXLIST_CORRUPTED

References QProblemB::bounds, BT_TRUE, Matrix::getCol(), Bounds::getFree(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), getSqrt(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, QProblemB::R, QProblemB::regVal, RET_CHOLESKY_OF_ZERO_HESSIAN, RR, THROWERROR, and QProblemB::usingRegularisation().

Referenced by QProblem::computeProjectedCholesky(), QProblemB::setupAuxiliaryQP(), QProblemB::setupInitialCholesky(), and QProblemB::solveQP().

◆ computeGivens()

void QProblemB::computeGivens ( real_t  xold,
real_t  yold,
real_t xnew,
real_t ynew,
real_t c,
real_t s 
) const
inlineprotectedinherited

Computes parameters for the Givens matrix G for which [x,y]*G = [z,0]

Returns
SUCCESSFUL_RETURN
Parameters
xoldMatrix entry to be normalised.
yoldMatrix entry to be annihilated.
xnewOutput: Normalised matrix entry.
ynewOutput: Annihilated matrix entry.
cOutput: Cosine entry of Givens matrix.
sOutput: Sine entry of Givens matrix.

References BT_TRUE, getAbs(), getSqrt(), isZero(), and real_t.

Referenced by QProblem::addBound(), QProblemB::addBound(), QProblem::addConstraint(), SQProblemSchur::calcDetSchur(), QProblem::removeBound(), QProblem::removeConstraint(), and SQProblemSchur::updateSchurQR().

◆ computeProjectedCholesky()

returnValue QProblem::computeProjectedCholesky ( )
protectedvirtualinherited

◆ copy() [1/2]

returnValue QProblem::copy ( const QProblem rhs)
protectedinherited

Copies all members from given rhs object.

Returns
SUCCESSFUL_RETURN
Parameters
rhsRhs object.

Referenced by QProblem::operator=(), and QProblem::QProblem().

◆ copy() [2/2]

returnValue QProblemB::copy ( const QProblemB rhs)
protectedinherited

Copies all members from given rhs object.

Returns
SUCCESSFUL_RETURN
Parameters
rhsRhs object.

Referenced by QProblemB::operator=(), and QProblemB::QProblemB().

◆ createDiagSparseMat()

SymSparseMat * QProblemB::createDiagSparseMat ( int_t  n,
real_t  diagVal = 1.0 
)
protectedinherited

Creates a sparse diagonal (square-)matrix which is a given multiple of the identity matrix.

Returns
Diagonal matrix
Parameters
nRow/column dimension of matrix to be created.
diagValValue of all diagonal entries.

References SparseMatrix::createDiagInfo(), Matrix::doFreeMemory(), and real_t.

Referenced by QProblem::computeProjectedCholesky().

◆ determineDataShift() [1/2]

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 
)
protectedinherited

Determines step direction of the shift of the QP data.

Returns
SUCCESSFUL_RETURN
Parameters
g_newNew gradient vector.
lb_newNew lower bounds.
ub_newNew upper bounds.
delta_gOutput: Step direction of gradient vector.
delta_lbOutput: Step direction of lower bounds.
delta_ubOutput: Step direction of upper bounds.
Delta_bB_isZeroOutput: 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 QProblem::determineDataShift(), and QProblemB::solveQP().

◆ determineDataShift() [2/2]

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 
)
protectedinherited

Determines step direction of the shift of the QP data.

Returns
SUCCESSFUL_RETURN
Parameters
g_newNew gradient vector.
lbA_newNew lower constraints' bounds.
ubA_newNew upper constraints' bounds.
lb_newNew lower bounds.
ub_newNew upper bounds.
delta_gOutput: Step direction of gradient vector.
delta_lbAOutput: Step direction of lower constraints' bounds.
delta_ubAOutput: Step direction of upper constraints' bounds.
delta_lbOutput: Step direction of lower bounds.
delta_ubOutput: Step direction of upper bounds.
Delta_bC_isZeroOutput: Indicates if active constraints' bounds are to be shifted.
Delta_bB_isZeroOutput: Indicates if active bounds are to be shifted.

References QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraints, QProblemB::determineDataShift(), EPS, getAbs(), Constraints::getActive(), Bounds::getFixed(), QProblem::getNAC(), QProblem::getNC(), Indexlist::getNumberArray(), INFTY, QProblem::lbA, SUCCESSFUL_RETURN, and QProblem::ubA.

Referenced by QProblem::solveQP().

◆ determineHessianType()

returnValue QProblemB::determineHessianType ( )
protectedinherited

◆ determineStepDirection()

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 
)
protectedvirtualinherited

Determines step direction of the homotopy path.

Returns
SUCCESSFUL_RETURN
RET_STEPDIRECTION_FAILED_TQ
RET_STEPDIRECTION_FAILED_CHOLESKY
Parameters
delta_gStep direction of gradient vector.
delta_lbAStep direction of lower constraints' bounds.
delta_ubAStep direction of upper constraints' bounds.
delta_lbStep direction of lower bounds.
delta_ubStep direction of upper bounds.
Delta_bC_isZeroIndicates if active constraints' bounds are to be shifted.
Delta_bB_isZeroIndicates if active bounds are to be shifted.
delta_xFXOutput: Primal homotopy step direction of fixed variables.
delta_xFROutput: Primal homotopy step direction of free variables.
delta_yACOutput: Dual homotopy step direction of active constraints' multiplier.
delta_yFXOutput: Dual homotopy step direction of fixed variables' multiplier.

Reimplemented in SQProblemSchur.

References QProblem::A, QProblemB::backsolveR(), QProblem::backsolveT(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraints, QProblemB::delta_xFR_TMP, QProblem::delta_xFRy, QProblem::delta_xFRz, QProblem::delta_yAC_TMP, Options::epsIterRef, getAbs(), Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), QProblem::getNAC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), QProblem::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, QProblem::tempA, QProblem::tempB, THROWERROR, Matrix::times(), Matrix::transTimes(), QProblemB::usingRegularisation(), and QProblem::ZFR_delta_xFRz.

Referenced by QProblem::addBound_checkLI(), QProblem::addConstraint_checkLI(), QProblem::ensureNonzeroCurvature(), SolutionAnalysis::getVarianceCovariance(), QProblem::solveCurrentEQP(), and QProblem::solveQP().

◆ dropInfeasibles()

returnValue QProblem::dropInfeasibles ( int_t  BC_number,
SubjectToStatus  BC_status,
BooleanType  BC_isBound,
real_t xiB,
real_t xiC 
)
protectedinherited

Drops the blocking bound/constraint that led to infeasibility, or finds another bound/constraint to drop according to drop priorities.

Returns
SUCCESSFUL_RETURN
Parameters
BC_numberNumber of the bound or constraint to be added.
BC_statusNew status of the bound or constraint to be added.
BC_isBoundWhether a bound or a constraint is to be added.
xiB(not yet documented)
xiC(not yet documented)

References QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraints, Options::dropBoundPriority, Options::dropEqConPriority, Options::dropIneqConPriority, Options::epsDen, getAbs(), Constraints::getActive(), Bounds::getFixed(), QProblem::getNAC(), QProblemB::getNFX(), Indexlist::getNumberArray(), SubjectTo::getStatus(), SubjectTo::getType(), QProblemB::options, QProblem::removeBound(), QProblem::removeConstraint(), RET_ENSURELI_DROPPED, SubjectTo::setStatus(), ST_BOUNDED, ST_EQUALITY, ST_INFEASIBLE_LOWER, ST_INFEASIBLE_UPPER, ST_LOWER, and SUCCESSFUL_RETURN.

Referenced by SQProblemSchur::addBound_ensureLI(), QProblem::addBound_ensureLI(), SQProblemSchur::addConstraint_ensureLI(), and QProblem::addConstraint_ensureLI().

◆ ensureNonzeroCurvature()

returnValue QProblem::ensureNonzeroCurvature ( BooleanType  removeBoundNotConstraint,
int_t  remIdx,
BooleanType exchangeHappened,
BooleanType addBoundNotConstraint,
int_t addIdx,
SubjectToStatus addStatus 
)
protectedinherited

◆ getBounds()

BEGIN_NAMESPACE_QPOASES returnValue QProblemB::getBounds ( Bounds _bounds) const
inlineinherited

Returns current bounds object of the QP (deep copy).

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
Parameters
_boundsOutput: Bounds object.

References QProblemB::bounds, QProblemB::getNV(), RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.

Referenced by SolutionAnalysis::checkCurvatureOnStronglyActiveConstraints().

◆ getConstraints()

BEGIN_NAMESPACE_QPOASES returnValue QProblem::getConstraints ( Constraints _constraints) const
inlineinherited

Returns current constraints object of the QP (deep copy).

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
Parameters
_constraintsOutput: Constraints object.

References QProblem::constraints, QProblemB::getNV(), RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.

◆ getCount()

uint_t QProblemB::getCount ( ) const
inlineinherited

Returns the current number of QP problems solved.

Returns
Number of QP problems solved.

References QProblemB::count.

◆ getDualSolution()

returnValue QProblem::getDualSolution ( real_t *const  yOpt) const
virtualinherited

Returns the dual solution vector (deep copy).

Returns
SUCCESSFUL_RETURN
RET_QP_NOT_SOLVED
Parameters
yOptOutput: Dual solution vector (if QP has been solved).

Reimplemented from QProblemB.

References QProblem::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().

◆ getFreeVariablesFlags()

returnValue QProblem::getFreeVariablesFlags ( BooleanType varIsFree)
inherited

Set the incoming array to true for each variable entry that is in the set of free variables

References QProblemB::bounds, BT_FALSE, BT_TRUE, Bounds::getFree(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), and SUCCESSFUL_RETURN.

◆ getHessianType()

HessianType QProblemB::getHessianType ( ) const
inlineinherited

Returns Hessian type flag (type is not determined due to this call!).

Returns
Hessian type.

References QProblemB::hessianType.

Referenced by SolutionAnalysis::getKktViolation().

◆ getNAC()

int_t QProblem::getNAC ( ) const
inlineinherited

◆ getNC()

int_t QProblem::getNC ( ) const
inlineinherited

Returns the number of constraints.

Returns
Number of constraints.

References QProblem::constraints, and Constraints::getNC().

Referenced by QProblem::addBound_checkLI(), SQProblemSchur::addBound_checkLISchur(), QProblem::addConstraint_checkLI(), SQProblemSchur::addConstraint_checkLISchur(), QProblem::areBoundsConsistent(), QProblem::determineDataShift(), QProblem::ensureNonzeroCurvature(), QProblem::getDualSolution(), SolutionAnalysis::getKktViolation(), QProblem::getRelativeHomotopyLength(), SolutionAnalysis::getVarianceCovariance(), QProblem::getWorkingSetConstraints(), hotstart(), QProblem::hotstart(), QProblem::init(), QProblem::loadQPvectorsFromFile(), QProblem::obtainAuxiliaryWorkingSet(), QProblem::performDriftCorrection(), QProblem::performRamping(), QProblem::performStep(), QProblem::printIteration(), QProblem::printProperties(), QProblem::reset(), QProblem::setA(), QProblem::setLBA(), QProblem::setUBA(), SQProblemSchur::setupAuxiliaryQP(), QProblem::setupAuxiliaryQP(), QProblem::setupAuxiliaryQPbounds(), QProblem::setupAuxiliaryQPgradient(), QProblem::setupAuxiliaryQPsolution(), SQProblemSchur::setupAuxiliaryWorkingSet(), QProblem::setupAuxiliaryWorkingSet(), setupNewAuxiliaryQP(), QProblem::setupQPdata(), QProblem::setupQPdataFromFile(), QProblem::setupSubjectToType(), QProblem::shallRefactorise(), QProblem::solveCurrentEQP(), QProblem::solveInitialQP(), QProblem::solveQP(), QProblem::updateFarBounds(), QProblem::writeQpDataIntoMatFile(), and QProblem::writeQpWorkspaceIntoMatFile().

◆ getNEC()

int_t QProblem::getNEC ( ) const
inlineinherited

Returns the number of (implicitly defined) equality constraints.

Returns
Number of (implicitly defined) equality constraints.

References QProblem::constraints, and Constraints::getNEC().

Referenced by QProblem::printProperties().

◆ getNFR()

int_t QProblemB::getNFR ( ) const
inlineinherited

◆ getNFV()

int_t QProblemB::getNFV ( ) const
inlineinherited

Returns the number of implicitly fixed variables.

Returns
Number of implicitly fixed variables.

References QProblemB::bounds, and Bounds::getNFV().

Referenced by QProblemB::setupInitialCholesky(), and QProblem::setupInitialCholesky().

◆ getNFX()

int_t QProblemB::getNFX ( ) const
inlineinherited

◆ getNIAC()

int_t QProblem::getNIAC ( ) const
inlineinherited

Returns the number of inactive constraints.

Returns
Number of inactive constraints.

References QProblem::constraints, and Constraints::getNIAC().

Referenced by QProblem::ensureNonzeroCurvature(), QProblem::performStep(), and QProblem::writeQpWorkspaceIntoMatFile().

◆ getNV()

int_t QProblemB::getNV ( ) const
inlineinherited

Returns the number of variables.

Returns
Number of variables.

References QProblemB::bounds, and Bounds::getNV().

Referenced by QProblem::addBound(), QProblemB::addBound(), QProblem::addBound_checkLI(), SQProblemSchur::addBound_checkLISchur(), SQProblemSchur::addBound_ensureLI(), QProblem::addBound_ensureLI(), QProblem::addConstraint(), QProblem::addConstraint_checkLI(), SQProblemSchur::addConstraint_checkLISchur(), SQProblemSchur::addConstraint_ensureLI(), QProblem::addConstraint_ensureLI(), QProblemB::areBoundsConsistent(), QProblemB::backsolveR(), QProblem::changeActiveSet(), QProblemB::computeCholesky(), QProblem::computeProjectedCholesky(), QProblemB::determineDataShift(), QProblemB::determineHessianType(), QProblem::determineStepDirection(), QProblem::ensureNonzeroCurvature(), QProblemB::getBounds(), QProblem::getConstraints(), QProblemB::getDualSolution(), QProblem::getDualSolution(), QProblem::getFreeVariablesFlags(), SolutionAnalysis::getKktViolation(), QProblemB::getObjVal(), QProblemB::getPrimalSolution(), QProblemB::getRelativeHomotopyLength(), SolutionAnalysis::getVarianceCovariance(), QProblem::getWorkingSet(), QProblemB::getWorkingSetBounds(), hotstart(), QProblemB::hotstart(), QProblem::hotstart(), QProblem::init(), QProblemB::init(), QProblemB::loadQPvectorsFromFile(), QProblemB::obtainAuxiliaryWorkingSet(), QProblem::obtainAuxiliaryWorkingSet(), QProblem::performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), QProblem::performRamping(), QProblem::performStep(), QProblemB::performStep(), QProblem::printIteration(), QProblemB::printIteration(), QProblem::printProperties(), QProblemB::printProperties(), QProblemB::regulariseHessian(), QProblem::removeBound(), QProblemB::removeBound(), QProblem::removeConstraint(), QProblem::reset(), QProblemB::reset(), QProblem::setA(), QProblemB::setH(), QProblemB::setLB(), QProblem::setLBA(), QProblemB::setUB(), QProblem::setUBA(), SQProblemSchur::setupAuxiliaryQP(), QProblem::setupAuxiliaryQP(), QProblemB::setupAuxiliaryQP(), QProblem::setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), QProblem::setupAuxiliaryQPgradient(), QProblemB::setupAuxiliaryQPgradient(), QProblem::setupAuxiliaryQPsolution(), QProblemB::setupAuxiliaryQPsolution(), SQProblemSchur::setupAuxiliaryWorkingSet(), QProblem::setupAuxiliaryWorkingSet(), QProblemB::setupAuxiliaryWorkingSet(), QProblemB::setupInitialCholesky(), QProblem::setupInitialCholesky(), setupNewAuxiliaryQP(), QProblem::setupQPdata(), QProblemB::setupQPdataFromFile(), QProblem::setupQPdataFromFile(), QProblemB::setupSubjectToType(), QProblem::setupTQfactorisation(), QProblem::shallRefactorise(), QProblemB::shallRefactorise(), QProblem::solveCurrentEQP(), QProblem::solveInitialQP(), QProblemB::solveInitialQP(), QProblem::solveQP(), QProblemB::solveQP(), QProblem::solveRegularisedQP(), QProblemB::solveRegularisedQP(), QProblem::updateActivitiesForHotstart(), QProblemB::updateFarBounds(), QProblem::updateFarBounds(), QProblem::writeQpDataIntoMatFile(), and QProblem::writeQpWorkspaceIntoMatFile().

◆ getNZ()

int_t QProblem::getNZ ( ) const
virtualinherited

◆ getObjVal() [1/2]

real_t QProblemB::getObjVal ( ) const
inherited

Returns the optimal objective function value.

Returns
finite value: Optimal objective function value (QP was solved)
+infinity: QP was not yet solved

References QProblemB::getStatus(), INFTY, QPS_AUXILIARYQPSOLVED, QPS_HOMOTOPYQPSOLVED, QPS_SOLVED, real_t, and QProblemB::x.

Referenced by main().

◆ getObjVal() [2/2]

real_t QProblemB::getObjVal ( const real_t *const  _x) const
inherited

Returns the objective function value at an arbitrary point x.

Returns
Objective function value at point x
Parameters
_xPoint 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().

◆ getOptions()

Options QProblemB::getOptions ( ) const
inlineinherited

Returns current options struct.

Returns
Current options struct.

References QProblemB::options.

◆ getPrimalSolution()

returnValue QProblemB::getPrimalSolution ( real_t *const  xOpt) const
inherited

Returns the primal solution vector.

Returns
SUCCESSFUL_RETURN
RET_QP_NOT_SOLVED
Parameters
xOptOutput: 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().

◆ getPrintLevel()

PrintLevel QProblemB::getPrintLevel ( ) const
inlineinherited

Returns the print level.

Returns
Print level.

References QProblemB::options, and Options::printLevel.

◆ getRelativeHomotopyLength() [1/2]

real_t QProblemB::getRelativeHomotopyLength ( const real_t *const  g_new,
const real_t *const  lb_new,
const real_t *const  ub_new 
)
protectedinherited

Compute relative length of homotopy in data space for termination criterion.

Returns
Relative length in data space.
Parameters
g_newFinal gradient.
lb_newFinal lower variable bounds.
ub_newFinal upper variable bounds.

References QProblemB::g, getAbs(), QProblemB::getNV(), QProblemB::lb, real_t, and QProblemB::ub.

Referenced by QProblem::getRelativeHomotopyLength(), and QProblemB::solveQP().

◆ getRelativeHomotopyLength() [2/2]

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 
)
protectedinherited

Compute relative length of homotopy in data space for termination criterion.

Returns
Relative length in data space.
Parameters
g_newFinal gradient.
lb_newFinal lower variable bounds.
ub_newFinal upper variable bounds.
lbA_newFinal lower constraint bounds.
ubA_newFinal upper constraint bounds.

References getAbs(), QProblem::getNC(), QProblemB::getRelativeHomotopyLength(), QProblem::lbA, real_t, and QProblem::ubA.

Referenced by QProblem::solveQP().

◆ getStatus()

QProblemStatus QProblemB::getStatus ( ) const
inlineinherited

◆ getWorkingSet()

returnValue QProblem::getWorkingSet ( real_t workingSet)
virtualinherited

Writes a vector with the state of the working set

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
workingSetOutput: array containing state of the working set.

Reimplemented from QProblemB.

References QProblemB::getNV(), QProblem::getWorkingSetBounds(), QProblem::getWorkingSetConstraints(), RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.

◆ getWorkingSetBounds()

returnValue QProblem::getWorkingSetBounds ( real_t workingSetB)
virtualinherited

Writes a vector with the state of the working set of bounds

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
workingSetBOutput: array containing state of the working set of bounds.

Reimplemented from QProblemB.

References QProblemB::getWorkingSetBounds().

Referenced by SolutionAnalysis::getKktViolation(), and QProblem::getWorkingSet().

◆ getWorkingSetConstraints()

returnValue QProblem::getWorkingSetConstraints ( real_t workingSetC)
virtualinherited

Writes a vector with the state of the working set of constraints

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
workingSetCOutput: array containing state of the working set of constraints.

Reimplemented from QProblemB.

References QProblem::constraints, QProblem::getNC(), SubjectTo::getStatus(), RET_INVALID_ARGUMENTS, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, and THROWERROR.

Referenced by SolutionAnalysis::getKktViolation(), and QProblem::getWorkingSet().

◆ hotstart() [1/7]

returnValue SQProblem::hotstart ( SymmetricMatrix H_new,
const real_t *const  g_new,
Matrix A_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_t nWSR,
real_t *const  cputime = 0,
const Bounds *const  guessedBounds = 0,
const Constraints *const  guessedConstraints = 0 
)

Solves an initialised QP sequence with matrix shift using the online active set strategy.

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_MATRIX_SHIFT_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
RET_SETUP_AUXILIARYQP_FAILED
Parameters
H_newHessian matrix of neighbouring QP to be solved (a shallow copy is made).
If Hessian matrix is trivial, a NULL pointer can be passed.
g_newGradient of neighbouring QP to be solved.
A_newConstraint matrix of neighbouring QP to be solved (a shallow copy is made).
If QP sequence does not involve constraints, a NULL pointer can be passed.
lb_newLower bounds of neighbouring QP to be solved.
If no lower bounds exist, a NULL pointer can be passed.
ub_newUpper bounds of neighbouring QP to be solved.
If no upper bounds exist, a NULL pointer can be passed.
lbA_newLower constraints' bounds of neighbouring QP to be solved.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_newUpper constraints' bounds of neighbouring QP to be solved.
If no upper constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spen for QP solution (or to perform nWSR iterations).
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of bounds is kept!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of constraints is kept!)

References getCPUtime(), QProblemB::getStatus(), QProblem::hotstart(), QPS_NOTINITIALISED, QPS_PERFORMINGHOMOTOPY, QPS_PREPARINGAUXILIARYQP, real_t, RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, RET_SETUP_AUXILIARYQP_FAILED, setupNewAuxiliaryQP(), SUCCESSFUL_RETURN, and THROWERROR.

Referenced by hotstart(), and main().

◆ hotstart() [2/7]

returnValue SQProblem::hotstart ( const real_t *const  H_new,
const real_t *const  g_new,
const real_t *const  A_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_t nWSR,
real_t *const  cputime = 0,
const Bounds *const  guessedBounds = 0,
const Constraints *const  guessedConstraints = 0 
)

Solves an initialised QP sequence with matrix shift using the online active set strategy.

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_MATRIX_SHIFT_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
RET_SETUP_AUXILIARYQP_FAILED
Parameters
H_newHessian matrix of neighbouring QP to be solved (a shallow copy is made).
If Hessian matrix is trivial, a NULL pointer can be passed.
g_newGradient of neighbouring QP to be solved.
A_newConstraint matrix of neighbouring QP to be solved (a shallow copy is made).
If QP sequence does not involve constraints, a NULL pointer can be passed.
lb_newLower bounds of neighbouring QP to be solved.
If no lower bounds exist, a NULL pointer can be passed.
ub_newUpper bounds of neighbouring QP to be solved.
If no upper bounds exist, a NULL pointer can be passed.
lbA_newLower constraints' bounds of neighbouring QP to be solved.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_newUpper constraints' bounds of neighbouring QP to be solved.
If no upper constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of bounds is kept!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of constraints is kept!)

References getCPUtime(), QProblemB::getStatus(), QProblem::hotstart(), QPS_NOTINITIALISED, QPS_PERFORMINGHOMOTOPY, QPS_PREPARINGAUXILIARYQP, real_t, RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, RET_SETUP_AUXILIARYQP_FAILED, setupNewAuxiliaryQP(), SUCCESSFUL_RETURN, and THROWERROR.

◆ hotstart() [3/7]

returnValue SQProblem::hotstart ( 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_t nWSR,
real_t *const  cputime = 0,
const Bounds *const  guessedBounds = 0,
const Constraints *const  guessedConstraints = 0 
)

Solves an initialised QP sequence with matrix shift using the online active set strategy, where QP data is read from files.

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_MATRIX_SHIFT_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
RET_SETUP_AUXILIARYQP_FAILED
RET_UNABLE_TO_READ_FILE
RET_INVALID_ARGUMENTS
Parameters
H_fileName of file where Hessian matrix is stored.
If Hessian matrix is trivial, a NULL pointer can be passed.
g_fileName of file where gradient, of neighbouring QP to be solved, is stored.
A_fileName of file where constraint matrix is stored.
If QP sequence does not involve constraints, a NULL pointer can be passed.
lb_fileName 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_fileName 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_fileName 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_fileName 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.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of bounds is kept!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of constraints is kept!)

References QProblem::getNC(), QProblemB::getNV(), hotstart(), QProblem::loadQPvectorsFromFile(), readFromFile(), real_t, RET_INVALID_ARGUMENTS, RET_UNABLE_TO_READ_FILE, SUCCESSFUL_RETURN, and THROWERROR.

◆ hotstart() [4/7]

returnValue SQProblem::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_t nWSR,
real_t *const  cputime = 0,
const Bounds *const  guessedBounds = 0,
const Constraints *const  guessedConstraints = 0 
)

Solves an initialised QP sequence (without matrix shift) 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 functions just forwards to the corresponding QProblem::hotstart member function.

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
Parameters
g_newGradient of neighbouring QP to be solved.
lb_newLower bounds of neighbouring QP to be solved.
If no lower bounds exist, a NULL pointer can be passed.
ub_newUpper bounds of neighbouring QP to be solved.
If no upper bounds exist, a NULL pointer can be passed.
lbA_newLower constraints' bounds of neighbouring QP to be solved.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_newUpper constraints' bounds of neighbouring QP to be solved.
If no upper constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of bounds is kept!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of constraints is kept!)

References QProblem::hotstart().

◆ hotstart() [5/7]

returnValue QProblemB::hotstart ( const real_t *const  g_new,
const real_t *const  lb_new,
const real_t *const  ub_new,
int_t 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!

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
RET_SETUP_AUXILIARYQP_FAILED
Parameters
g_newGradient of neighbouring QP to be solved.
lb_newLower bounds of neighbouring QP to be solved.
If no lower bounds exist, a NULL pointer can be passed.
ub_newUpper bounds of neighbouring QP to be solved.
If no upper bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
guessedBoundsOptimal 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().

◆ hotstart() [6/7]

returnValue SQProblem::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_t nWSR,
real_t *const  cputime = 0,
const Bounds *const  guessedBounds = 0,
const Constraints *const  guessedConstraints = 0 
)

Solves an initialised QP sequence (without matrix shift) 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 functions just forwards to the corresponding QProblem::hotstart member function.

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
RET_UNABLE_TO_READ_FILE
RET_INVALID_ARGUMENTS
Parameters
g_fileName of file where gradient, of neighbouring QP to be solved, is stored.
lb_fileName 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_fileName 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_fileName 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_fileName 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.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of bounds is kept!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, the previous working set of constraints is kept!)

References QProblem::hotstart().

◆ hotstart() [7/7]

returnValue QProblemB::hotstart ( const char *const  g_file,
const char *const  lb_file,
const char *const  ub_file,
int_t 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!

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
RET_UNABLE_TO_READ_FILE
RET_SETUP_AUXILIARYQP_FAILED
RET_INVALID_ARGUMENTS
Parameters
g_fileName of file where gradient, of neighbouring QP to be solved, is stored.
lb_fileName 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_fileName of file where upper bounds, of neighbouring QP to be solved, is stored.
If no upper bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
guessedBoundsOptimal 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.

◆ init() [1/6]

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_t 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 
)
inherited

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!

Returns
SUCCESSFUL_RETURN
RET_INIT_FAILED
RET_INIT_FAILED_CHOLESKY
RET_INIT_FAILED_TQ
RET_INIT_FAILED_HOTSTART
RET_INIT_FAILED_INFEASIBILITY
RET_INIT_FAILED_UNBOUNDEDNESS
RET_MAX_NWSR_REACHED
RET_INVALID_ARGUMENTS
Parameters
_HHessian matrix (a shallow copy is made).
_gGradient vector.
_AConstraint matrix (a shallow copy is made).
_lbLower bound vector (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper bound vector (on variables).
If no upper bounds exist, a NULL pointer can be passed.
_lbALower constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.
_ubAUpper constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP initialisation.
Output: CPU time spent for QP initialisation (if pointer passed).
xOptOptimal primal solution vector.
(If a null pointer is passed, the old primal solution is kept!)
yOptOptimal dual solution vector.
(If a null pointer is passed, the old dual solution is kept!)
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, all bounds are assumed inactive!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, all constraints are assumed inactive!)
_RPre-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, QProblem::getNC(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), QProblem::reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, QProblem::setupQPdata(), QProblem::solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.

Referenced by main(), and solveOqpBenchmark().

◆ init() [2/6]

returnValue QProblemB::init ( SymmetricMatrix _H,
const real_t *const  _g,
const real_t *const  _lb,
const real_t *const  _ub,
int_t 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!

Returns
SUCCESSFUL_RETURN
RET_INIT_FAILED
RET_INIT_FAILED_CHOLESKY
RET_INIT_FAILED_HOTSTART
RET_INIT_FAILED_INFEASIBILITY
RET_INIT_FAILED_UNBOUNDEDNESS
RET_MAX_NWSR_REACHED
RET_INVALID_ARGUMENTS
Parameters
_HHessian matrix (a shallow copy is made).
_gGradient vector.
_lbLower bounds (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper bounds (on variables).
If no upper bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations when using initial homotopy.
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP initialisation.
Output: CPU time spent for QP initialisation (if pointer passed).
xOptOptimal primal solution vector. A NULL pointer can be passed.
(If a null pointer is passed, the old primal solution is kept!)
yOptOptimal dual solution vector. A NULL pointer can be passed.
(If a null pointer is passed, the old dual solution is kept!)
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, all bounds are assumed inactive!)
_RPre-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().

◆ init() [3/6]

returnValue QProblemB::init ( const real_t *const  _H,
const real_t *const  _g,
const real_t *const  _lb,
const real_t *const  _ub,
int_t 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!

Returns
SUCCESSFUL_RETURN
RET_INIT_FAILED
RET_INIT_FAILED_CHOLESKY
RET_INIT_FAILED_HOTSTART
RET_INIT_FAILED_INFEASIBILITY
RET_INIT_FAILED_UNBOUNDEDNESS
RET_MAX_NWSR_REACHED
RET_INVALID_ARGUMENTS
Parameters
_HHessian matrix (a shallow copy is made).
If Hessian matrix is trivial, a NULL pointer can be passed.
_gGradient vector.
_lbLower bounds (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper bounds (on variables).
If no upper bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations when using initial homotopy.
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP initialisation.
Output: CPU time spent for QP initialisation (if pointer passed).
xOptOptimal primal solution vector. A NULL pointer can be passed.
(If a null pointer is passed, the old primal solution is kept!)
yOptOptimal dual solution vector. A NULL pointer can be passed.
(If a null pointer is passed, the old dual solution is kept!)
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, all bounds are assumed inactive!)
_RPre-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.

◆ init() [4/6]

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_t 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 
)
inherited

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!

Returns
SUCCESSFUL_RETURN
RET_INIT_FAILED
RET_INIT_FAILED_CHOLESKY
RET_INIT_FAILED_TQ
RET_INIT_FAILED_HOTSTART
RET_INIT_FAILED_INFEASIBILITY
RET_INIT_FAILED_UNBOUNDEDNESS
RET_MAX_NWSR_REACHED
RET_INVALID_ARGUMENTS
Parameters
_HHessian matrix (a shallow copy is made).
If Hessian matrix is trivial, a NULL pointer can be passed.
_gGradient vector.
_AConstraint matrix (a shallow copy is made).
_lbLower bound vector (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper bound vector (on variables).
If no upper bounds exist, a NULL pointer can be passed.
_lbALower constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.
_ubAUpper constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP initialisation.
Output: CPU time spent for QP initialisation (if pointer passed).
xOptOptimal primal solution vector.
(If a null pointer is passed, the old primal solution is kept!)
yOptOptimal dual solution vector.
(If a null pointer is passed, the old dual solution is kept!)
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, all bounds are assumed inactive!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, all constraints are assumed inactive!)
_RPre-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, QProblem::getNC(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), QProblem::reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, QProblem::setupQPdata(), QProblem::solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.

◆ init() [5/6]

returnValue QProblemB::init ( const char *const  H_file,
const char *const  g_file,
const char *const  lb_file,
const char *const  ub_file,
int_t 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!

Returns
SUCCESSFUL_RETURN
RET_INIT_FAILED
RET_INIT_FAILED_CHOLESKY
RET_INIT_FAILED_HOTSTART
RET_INIT_FAILED_INFEASIBILITY
RET_INIT_FAILED_UNBOUNDEDNESS
RET_MAX_NWSR_REACHED
RET_UNABLE_TO_READ_FILE
Parameters
H_fileName of file where Hessian matrix is stored.
If Hessian matrix is trivial, a NULL pointer can be passed.
g_fileName of file where gradient vector is stored.
lb_fileName of file where lower bound vector.
If no lower bounds exist, a NULL pointer can be passed.
ub_fileName of file where upper bound vector.
If no upper bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations when using initial homotopy.
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP initialisation.
Output: CPU time spent for QP initialisation (if pointer passed).
xOptOptimal primal solution vector. A NULL pointer can be passed.
(If a null pointer is passed, the old primal solution is kept!)
yOptOptimal dual solution vector. A NULL pointer can be passed.
(If a null pointer is passed, the old dual solution is kept!)
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, all bounds are assumed inactive!)
R_fileName 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.

◆ init() [6/6]

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_t 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 
)
inherited

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!

Returns
SUCCESSFUL_RETURN
RET_INIT_FAILED
RET_INIT_FAILED_CHOLESKY
RET_INIT_FAILED_TQ
RET_INIT_FAILED_HOTSTART
RET_INIT_FAILED_INFEASIBILITY
RET_INIT_FAILED_UNBOUNDEDNESS
RET_MAX_NWSR_REACHED
RET_UNABLE_TO_READ_FILE
RET_INVALID_ARGUMENTS
Parameters
H_fileName of file where Hessian matrix is stored.
If Hessian matrix is trivial, a NULL pointer can be passed.
g_fileName of file where gradient vector is stored.
A_fileName of file where constraint matrix is stored.
lb_fileName of file where lower bound vector.
If no lower bounds exist, a NULL pointer can be passed.
ub_fileName of file where upper bound vector.
If no upper bounds exist, a NULL pointer can be passed.
lbA_fileName of file where lower constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_fileName of file where upper constraints' bound vector.
If no upper constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations when using initial homotopy. Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP initialisation.
Output: CPU time spent for QP initialisation (if pointer passed).
xOptOptimal primal solution vector.
(If a null pointer is passed, the old primal solution is kept!)
yOptOptimal dual solution vector.
(If a null pointer is passed, the old dual solution is kept!)
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
(If a null pointer is passed, all bounds are assumed inactive!)
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
(If a null pointer is passed, all constraints are assumed inactive!)
R_fileName 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, QProblem::getNC(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::isInitialised(), QProblemB::R, readFromFile(), QProblem::reset(), RET_INVALID_ARGUMENTS, RET_NO_CHOLESKY_WITH_INITIAL_GUESS, RET_QP_ALREADY_INITIALISED, RET_QPOBJECT_NOT_SETUP, RET_UNABLE_TO_READ_FILE, QProblem::setupQPdataFromFile(), QProblem::solveInitialQP(), ST_UNDEFINED, SUCCESSFUL_RETURN, THROWERROR, and THROWWARNING.

◆ isBlocking()

BooleanType QProblemB::isBlocking ( real_t  num,
real_t  den,
real_t  epsNum,
real_t  epsDen,
real_t t 
) const
inlineprotectedinherited

Checks whether given ratio is blocking, i.e. limits the maximum step length along the homotopy path to a value lower than given one.

Returns
SUCCESSFUL_RETURN
Parameters
numNumerator for performing the ratio test.
denDenominator for performing the ratio test.
epsNumNumerator tolerance.
epsDenDenominator tolerance.
tInput: 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().

◆ isCPUtimeLimitExceeded()

BooleanType QProblemB::isCPUtimeLimitExceeded ( const real_t *const  cputime,
real_t  starttime,
int_t  nWSR 
) const
protectedinherited

Determines if next QP iteration can be performed within given CPU time limit.

Returns
BT_TRUE: CPU time limit is exceeded, stop QP solution.
BT_FALSE: Sufficient CPU time for next QP iteration.
Parameters
cputimeMaximum CPU time allowed for QP solution.
starttimeStart time of current QP solution.
nWSRNumber of working set recalculations performed so far.

References BT_FALSE, BT_TRUE, getCPUtime(), and real_t.

Referenced by QProblem::solveQP(), and QProblemB::solveQP().

◆ isInfeasible()

BooleanType QProblemB::isInfeasible ( ) const
inlineinherited

Returns if the QP is infeasible.

Returns
BT_TRUE: QP infeasible
BT_FALSE: QP feasible (or not known to be infeasible!)

References QProblemB::infeasible.

Referenced by QProblem::solveInitialQP(), QProblemB::solveInitialQP(), and QProblem::solveQP().

◆ isInitialised()

BooleanType QProblemB::isInitialised ( ) const
inlineinherited

Returns if the QProblem object is initialised.

Returns
BT_TRUE: QProblemB initialised
BT_FALSE: QProblemB not initialised

References BT_FALSE, BT_TRUE, QPS_NOTINITIALISED, and QProblemB::status.

Referenced by QProblem::init(), and QProblemB::init().

◆ isSolved()

BooleanType QProblemB::isSolved ( ) const
inlineinherited

Returns if the QP has been solved.

Returns
BT_TRUE: QProblemB solved
BT_FALSE: QProblemB not solved

References BT_FALSE, BT_TRUE, QPS_SOLVED, and QProblemB::status.

◆ isUnbounded()

BooleanType QProblemB::isUnbounded ( ) const
inlineinherited

Returns if the QP is unbounded.

Returns
BT_TRUE: QP unbounded
BT_FALSE: QP unbounded (or not known to be unbounded!)

References QProblemB::unbounded.

Referenced by QProblem::solveInitialQP(), and QProblemB::solveInitialQP().

◆ loadQPvectorsFromFile() [1/2]

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
protectedinherited

Loads new QP vectors from files (internal members are not affected!).

Returns
SUCCESSFUL_RETURN
RET_UNABLE_TO_OPEN_FILE
RET_UNABLE_TO_READ_FILE
RET_INVALID_ARGUMENTS
Parameters
g_fileName of file where gradient, of neighbouring QP to be solved, is stored.
lb_fileName 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_fileName 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_newOutput: Gradient of neighbouring QP to be solved.
lb_newOutput: Lower bounds of neighbouring QP to be solved
ub_newOutput: Upper bounds of neighbouring QP to be solved

References QProblemB::getNV(), readFromFile(), RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.

Referenced by QProblemB::hotstart(), and QProblem::loadQPvectorsFromFile().

◆ loadQPvectorsFromFile() [2/2]

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
protectedinherited

Loads new QP vectors from files (internal members are not affected!).

Returns
SUCCESSFUL_RETURN
RET_UNABLE_TO_OPEN_FILE
RET_UNABLE_TO_READ_FILE
RET_INVALID_ARGUMENTS
Parameters
g_fileName of file where gradient, of neighbouring QP to be solved, is stored.
lb_fileName 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_fileName 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_fileName 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_fileName 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_newOutput: Gradient of neighbouring QP to be solved.
lb_newOutput: Lower bounds of neighbouring QP to be solved
ub_newOutput: Upper bounds of neighbouring QP to be solved
lbA_newOutput: Lower constraints' bounds of neighbouring QP to be solved
ubA_newOutput: Upper constraints' bounds of neighbouring QP to be solved

References QProblem::getNC(), QProblemB::loadQPvectorsFromFile(), readFromFile(), RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.

Referenced by hotstart(), and QProblem::hotstart().

◆ obtainAuxiliaryWorkingSet() [1/2]

returnValue QProblemB::obtainAuxiliaryWorkingSet ( const real_t *const  xOpt,
const real_t *const  yOpt,
const Bounds *const  guessedBounds,
Bounds auxiliaryBounds 
) const
protectedinherited

Obtains the desired working set for the auxiliary initial QP in accordance with the user specifications

Returns
SUCCESSFUL_RETURN
RET_OBTAINING_WORKINGSET_FAILED
RET_INVALID_ARGUMENTS
Parameters
xOptOptimal primal solution vector. If a NULL pointer is passed, all entries are assumed to be zero.
yOptOptimal dual solution vector. If a NULL pointer is passed, all entries are assumed to be zero.
guessedBoundsGuessed working set for solution (xOpt,yOpt).
auxiliaryBoundsInput: 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 QProblem::obtainAuxiliaryWorkingSet(), and QProblemB::solveInitialQP().

◆ obtainAuxiliaryWorkingSet() [2/2]

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
protectedinherited

Obtains the desired working set for the auxiliary initial QP in accordance with the user specifications (assumes that member AX has already been initialised!)

Returns
SUCCESSFUL_RETURN
RET_OBTAINING_WORKINGSET_FAILED
RET_INVALID_ARGUMENTS
Parameters
xOptOptimal primal solution vector. If a NULL pointer is passed, all entries are assumed to be zero.
yOptOptimal dual solution vector. If a NULL pointer is passed, all entries are assumed to be zero.
guessedBoundsGuessed working set of bounds for solution (xOpt,yOpt).
guessedConstraintsGuessed working set for solution (xOpt,yOpt).
auxiliaryBoundsInput: Allocated bound object.
Ouput: Working set of constraints for auxiliary QP.
auxiliaryConstraintsInput: Allocated bound object.
Ouput: Working set for auxiliary QP.

References QProblem::Ax, QProblem::Ax_u, Options::boundTolerance, QProblem::constraints, EPS, QProblem::getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), QProblem::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 QProblem::ubA.

Referenced by QProblem::solveInitialQP().

◆ operator=()

SQProblem & SQProblem::operator= ( const SQProblem rhs)
virtual

Assignment operator (deep copy).

Parameters
rhsRhs object.

References QProblem::operator=().

Referenced by SQProblemSchur::operator=().

◆ performDriftCorrection()

returnValue QProblem::performDriftCorrection ( )
protectedvirtualinherited

◆ performPlainRatioTest()

returnValue QProblem::performPlainRatioTest ( int_t  nIdx,
const int_t *const  idxList,
const real_t *const  num,
const real_t *const  den,
real_t  epsNum,
real_t  epsDen,
real_t t,
int_t BC_idx 
) const
protectedinherited

Performs robustified ratio test yield the maximum possible step length along the homotopy path.

Returns
SUCCESSFUL_RETURN
Parameters
nIdxNumber of ratios to be checked.
idxListArray containing the indices of all ratios to be checked.
numArray containing all numerators for performing the ratio test.
denArray containing all denominators for performing the ratio test.
epsNumNumerator tolerance.
epsDenDenominator tolerance.
tOutput: Maximum possible step length along the homotopy path.
BC_idxOutput: Index of blocking constraint.

References SUCCESSFUL_RETURN.

Referenced by QProblem::ensureNonzeroCurvature().

◆ performRamping()

returnValue QProblem::performRamping ( )
protectedvirtualinherited

◆ performRatioTest()

returnValue QProblemB::performRatioTest ( int_t  nIdx,
const int_t *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_t BC_idx 
) const
protectedinherited

Performs robustified ratio test yield the maximum possible step length along the homotopy path.

Returns
SUCCESSFUL_RETURN
Parameters
nIdxNumber of ratios to be checked.
idxListArray containing the indices of all ratios to be checked.
subjectToBound/Constraint object corresponding to ratios to be checked.
numArray containing all numerators for performing the ratio test.
denArray containing all denominators for performing the ratio test.
epsNumNumerator tolerance.
epsDenDenominator tolerance.
tOutput: Maximum possible step length along the homotopy path.
BC_idxOutput: 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 SQProblemSchur::addBound_ensureLI(), QProblem::addBound_ensureLI(), SQProblemSchur::addConstraint_ensureLI(), QProblem::addConstraint_ensureLI(), QProblem::performStep(), and QProblemB::performStep().

◆ 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_t BC_idx,
SubjectToStatus BC_status,
BooleanType BC_isBound 
)
protectedinherited

Determines the maximum possible step length along the homotopy path and performs this step (without changing working set).

Returns
SUCCESSFUL_RETURN
RET_ERROR_IN_CONSTRAINTPRODUCT
RET_QP_INFEASIBLE
Parameters
delta_gStep direction of gradient.
delta_lbAStep direction of lower constraints' bounds.
delta_ubAStep direction of upper constraints' bounds.
delta_lbStep direction of lower bounds.
delta_ubStep direction of upper bounds.
delta_xFXPrimal homotopy step direction of fixed variables.
delta_xFRPrimal homotopy step direction of free variables.
delta_yACDual homotopy step direction of active constraints' multiplier.
delta_yFXDual homotopy step direction of fixed variables' multiplier.
BC_idxOutput: Index of blocking constraint.
BC_statusOutput: Status of blocking constraint.
BC_isBoundOutput: Indicates if blocking constraint is a bound.

References __FILE__, __FUNC__, __LINE__, QProblem::A, QProblem::Ax, QProblem::Ax_l, QProblem::Ax_u, QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraintProduct, QProblem::constraints, Options::epsDen, Options::epsNum, QProblemB::g, Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), getGlobalMessageHandler(), Constraints::getInactive(), getMax(), QProblem::getNAC(), QProblem::getNC(), QProblemB::getNFR(), QProblemB::getNFX(), QProblem::getNIAC(), Indexlist::getNumberArray(), QProblemB::getNV(), SubjectTo::getType(), SubjectTo::hasNoLower(), SubjectTo::hasNoUpper(), QProblemB::lb, QProblem::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, QProblem::ubA, VS_VISIBLE, QProblemB::x, QProblemB::y, and ZERO.

Referenced by QProblem::solveQP().

◆ printIteration()

returnValue QProblem::printIteration ( int_t  iter,
int_t  BC_idx,
SubjectToStatus  BC_status,
BooleanType  BC_isBound,
real_t  homotopyLength,
BooleanType  isFirstCall = BT_TRUE 
)
protectedinherited

Prints concise information on the current iteration.

Returns
SUCCESSFUL_RETURN
Parameters
iterNumber of current iteration.
BC_idxIndex of blocking constraint.
BC_statusStatus of blocking constraint.
BC_isBoundIndicates if blocking constraint is a bound.
homotopyLengthCurrent homotopy distance.
isFirstCallIndicating whether this is the first call for current QP.

References QProblem::A, BT_TRUE, QProblemB::count, EPS, TabularOutput::excAddB, TabularOutput::excAddC, TabularOutput::excRemB, TabularOutput::excRemC, QProblemB::g, getAbs(), QProblem::getNAC(), QProblem::getNC(), QProblemB::getNFX(), QProblemB::getNV(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_ZERO, TabularOutput::idxAddB, TabularOutput::idxAddC, TabularOutput::idxRemB, TabularOutput::idxRemC, QProblemB::lb, QProblem::lbA, MAX_STRING_LENGTH, myPrintf(), QProblemB::options, PL_DEBUG_ITER, PL_MEDIUM, PL_TABULAR, Options::printLevel, real_t, QProblemB::regVal, RET_INVALID_ARGUMENTS, QProblem::sizeT, ST_INACTIVE, ST_UNDEFINED, SUCCESSFUL_RETURN, QProblemB::tabularOutput, QProblemB::tau, THROWERROR, Matrix::times(), Matrix::transTimes(), TT, QProblemB::ub, QProblem::ubA, QProblemB::x, and QProblemB::y.

Referenced by QProblem::solveQP().

◆ printOptions()

returnValue QProblemB::printOptions ( ) const
inherited

Prints a list of all options and their current values.

Returns
SUCCESSFUL_RETURN

References QProblemB::options, and Options::print().

Referenced by main().

◆ printProperties()

returnValue QProblem::printProperties ( )
virtualinherited

◆ regulariseHessian()

returnValue QProblemB::regulariseHessian ( )
protectedinherited

◆ removeBound()

returnValue QProblem::removeBound ( int_t  number,
BooleanType  updateCholesky,
BooleanType  allowFlipping = BT_FALSE,
BooleanType  ensureNZC = BT_FALSE 
)
protectedvirtualinherited

Removes a bounds from active set.

Returns
SUCCESSFUL_RETURN
RET_BOUND_NOT_ACTIVE
RET_HESSIAN_NOT_SPD
RET_REMOVEBOUND_FAILED
Parameters
numberNumber of bound to be removed from active set.
updateCholeskyFlag indicating if Cholesky decomposition shall be updated.
allowFlippingFlag indicating if flipping bounds are allowed.
ensureNZCFlag indicating if non-zero curvature is ensured by exchange rules.

Reimplemented in SQProblemSchur.

References QProblem::A, QProblem::addBound(), QProblem::addConstraint(), QProblemB::applyGivens(), QProblemB::backsolveR(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblemB::computeGivens(), QProblem::constraints, Matrix::diag(), Options::enableFlippingBounds, QProblem::ensureNonzeroCurvature(), EPS, Options::epsFlipping, TabularOutput::excAddB, TabularOutput::excAddC, Bounds::flipFixed(), QProblemB::flipper, Flipper::get(), Constraints::getActive(), Matrix::getCol(), Bounds::getFree(), QProblem::getNAC(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), QProblem::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, QProblem::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(), QProblem::sizeT, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, QProblem::T, QProblemB::tabularOutput, THROWERROR, Matrix::times(), TT, QProblemB::ub, and ZERO.

Referenced by QProblem::addBound_ensureLI(), QProblem::addConstraint_ensureLI(), QProblem::changeActiveSet(), QProblem::dropInfeasibles(), QProblem::setupAuxiliaryWorkingSet(), and QProblem::updateActivitiesForHotstart().

◆ removeConstraint()

returnValue QProblem::removeConstraint ( int_t  number,
BooleanType  updateCholesky,
BooleanType  allowFlipping = BT_FALSE,
BooleanType  ensureNZC = BT_FALSE 
)
protectedvirtualinherited

Removes a constraint from active set.

Returns
SUCCESSFUL_RETURN
RET_CONSTRAINT_NOT_ACTIVE
RET_REMOVECONSTRAINT_FAILED
RET_HESSIAN_NOT_SPD
Parameters
numberNumber of constraint to be removed from active set.
updateCholeskyFlag indicating if Cholesky decomposition shall be updated.
allowFlippingFlag indicating if flipping bounds are allowed.
ensureNZCFlag indicating if non-zero curvature is ensured by exchange rules.

Reimplemented in SQProblemSchur.

References QProblem::addBound(), QProblem::addConstraint(), QProblemB::applyGivens(), QProblem::Ax_l, QProblem::Ax_u, QProblemB::backsolveR(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblemB::computeGivens(), QProblem::constraints, Options::enableFlippingBounds, QProblem::ensureNonzeroCurvature(), EPS, Options::epsFlipping, TabularOutput::excAddB, TabularOutput::excAddC, Constraints::flipFixed(), QProblemB::flipper, Flipper::get(), Constraints::getActive(), Bounds::getFree(), Indexlist::getIndex(), QProblem::getNAC(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), QProblem::getNZ(), getSqrt(), SubjectTo::getStatus(), QProblemB::getStatus(), QProblemB::H, QProblemB::hessianType, HST_IDENTITY, HST_SEMIDEF, HST_ZERO, TabularOutput::idxAddC, TabularOutput::idxRemC, QProblem::lbA, Constraints::moveActiveToInactive(), QProblemB::options, QProblem::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(), QProblem::sizeT, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, QProblem::T, QProblemB::tabularOutput, THROWERROR, Matrix::times(), TT, QProblem::ubA, and ZERO.

Referenced by QProblem::addBound_ensureLI(), QProblem::addConstraint_ensureLI(), QProblem::changeActiveSet(), QProblem::dropInfeasibles(), and QProblem::setupAuxiliaryWorkingSet().

◆ reset()

returnValue QProblem::reset ( )
virtualinherited

◆ resetCounter()

returnValue QProblemB::resetCounter ( )
inlineinherited

Resets QP problem counter (to zero).

Returns
SUCCESSFUL_RETURN.

References QProblemB::count, and SUCCESSFUL_RETURN.

◆ setA() [1/2]

returnValue QProblem::setA ( Matrix A_new)
inlineprotectedinherited

◆ setA() [2/2]

returnValue QProblem::setA ( const real_t *const  A_new)
inlineprotectedinherited

Sets dense constraint matrix of the QP.
Note: Also internal vector Ax is recomputed!

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
A_newNew dense constraint matrix (with correct dimension!), a shallow copy is made.

References QProblem::A, QProblem::Ax, QProblem::Ax_l, QProblem::Ax_u, BT_TRUE, QProblem::freeConstraintMatrix, QProblem::getNC(), QProblemB::getNV(), QProblem::lbA, real_t, RET_INVALID_ARGUMENTS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, THROWERROR, Matrix::times(), QProblem::ubA, and QProblemB::x.

◆ setConstraintProduct()

returnValue QProblem::setConstraintProduct ( ConstraintProduct *const  _constraintProduct)
inherited

Defines user-defined routine for calculating the constraint product A*x

Returns
SUCCESSFUL_RETURN

References QProblem::constraintProduct, and SUCCESSFUL_RETURN.

Referenced by main().

◆ setG()

returnValue QProblemB::setG ( const real_t *const  g_new)
inlineprotectedinherited

Changes gradient vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
g_newNew gradient vector (with correct dimension!).

Referenced by QProblemB::setupQPdata().

◆ setH() [1/2]

returnValue QProblemB::setH ( SymmetricMatrix H_new)
inlineprotectedinherited

Sets Hessian matrix of the QP.

Returns
SUCCESSFUL_RETURN
Parameters
H_newNew Hessian matrix (a shallow copy is made).

References BT_FALSE, BT_TRUE, QProblemB::freeHessian, QProblemB::H, and SUCCESSFUL_RETURN.

Referenced by SQProblemSchur::setupAuxiliaryQP(), setupNewAuxiliaryQP(), QProblemB::setupQPdata(), and QProblemB::setupQPdataFromFile().

◆ setH() [2/2]

returnValue QProblemB::setH ( const real_t *const  H_new)
inlineprotectedinherited

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.

Returns
SUCCESSFUL_RETURN
Parameters
H_newNew 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.

◆ setHessianType()

returnValue QProblemB::setHessianType ( HessianType  _hessianType)
inlineinherited

Changes the print level.

Returns
SUCCESSFUL_RETURN
Parameters
_hessianTypeNew Hessian type.

References QProblemB::hessianType, and SUCCESSFUL_RETURN.

◆ setInfeasibilityFlag()

returnValue QProblemB::setInfeasibilityFlag ( returnValue  returnvalue,
BooleanType  doThrowError = BT_FALSE 
)
protectedinherited

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).

Returns
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_ENSURELI_FAILED_CYCLING
RET_ENSURELI_FAILED_NOINDEX
Parameters
returnvalueReturnvalue to be tunneled.
doThrowErrorFlag forcing to throw an error.

References BT_FALSE, BT_TRUE, Options::enableFarBounds, QProblemB::infeasible, QProblemB::options, and THROWERROR.

Referenced by SQProblemSchur::addBound_ensureLI(), QProblem::addBound_ensureLI(), SQProblemSchur::addConstraint_ensureLI(), QProblem::addConstraint_ensureLI(), QProblemB::hotstart(), QProblem::hotstart(), QProblem::solveQP(), and QProblemB::solveQP().

◆ setLB() [1/2]

returnValue QProblemB::setLB ( const real_t *const  lb_new)
inlineprotectedinherited

Changes lower bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
Parameters
lb_newNew lower bound vector (with correct dimension!).

Referenced by QProblemB::setupQPdata().

◆ setLB() [2/2]

returnValue QProblemB::setLB ( int_t  number,
real_t  value 
)
inlineprotectedinherited

Changes single entry of lower bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
RET_INDEX_OUT_OF_BOUNDS
Parameters
numberNumber of entry to be changed.
valueNew 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.

◆ setLBA() [1/2]

returnValue QProblem::setLBA ( const real_t *const  lbA_new)
inlineprotectedinherited

Sets constraints' lower bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
Parameters
lbA_newNew constraints' lower bound vector (with correct dimension!).

Referenced by QProblem::setupQPdata().

◆ setLBA() [2/2]

returnValue QProblem::setLBA ( int_t  number,
real_t  value 
)
inlineprotectedinherited

Changes single entry of lower constraints' bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
RET_INDEX_OUT_OF_BOUNDS
Parameters
numberNumber of entry to be changed.
valueNew value for entry of lower constraints' bound vector (with correct dimension!).

References QProblem::getNC(), QProblemB::getNV(), QProblem::lbA, RET_INDEX_OUT_OF_BOUNDS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, and THROWERROR.

◆ setOptions()

returnValue QProblemB::setOptions ( const Options _options)
inlineinherited

Overrides current options with given ones.

Returns
SUCCESSFUL_RETURN
Parameters
_optionsNew options.

References Options::ensureConsistency(), QProblemB::options, Options::printLevel, QProblemB::setPrintLevel(), and SUCCESSFUL_RETURN.

Referenced by main(), and solveOqpBenchmark().

◆ setPrintLevel()

returnValue QProblemB::setPrintLevel ( PrintLevel  _printlevel)
inherited

◆ setUB() [1/2]

returnValue QProblemB::setUB ( const real_t *const  ub_new)
inlineprotectedinherited

Changes upper bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
Parameters
ub_newNew upper bound vector (with correct dimension!).

Referenced by QProblemB::setupQPdata().

◆ setUB() [2/2]

returnValue QProblemB::setUB ( int_t  number,
real_t  value 
)
inlineprotectedinherited

Changes single entry of upper bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
RET_INDEX_OUT_OF_BOUNDS
Parameters
numberNumber of entry to be changed.
valueNew 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.

◆ setUBA() [1/2]

returnValue QProblem::setUBA ( const real_t *const  ubA_new)
inlineprotectedinherited

Sets constraints' upper bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
Parameters
ubA_newNew constraints' upper bound vector (with correct dimension!).

Referenced by QProblem::setupQPdata().

◆ setUBA() [2/2]

returnValue QProblem::setUBA ( int_t  number,
real_t  value 
)
inlineprotectedinherited

Changes single entry of upper constraints' bound vector of the QP.

Returns
SUCCESSFUL_RETURN
RET_QPOBJECT_NOT_SETUP
RET_INDEX_OUT_OF_BOUNDS
Parameters
numberNumber of entry to be changed.
valueNew value for entry of upper constraints' bound vector (with correct dimension!).

References QProblem::getNC(), QProblemB::getNV(), RET_INDEX_OUT_OF_BOUNDS, RET_QPOBJECT_NOT_SETUP, SUCCESSFUL_RETURN, THROWERROR, and QProblem::ubA.

◆ setupAuxiliaryQP() [1/3]

returnValue QProblemB::setupAuxiliaryQP
protectedinherited

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 and constraints.

Returns
SUCCESSFUL_RETURN
RET_SETUP_AUXILIARYQP_FAILED
RET_INVALID_ARGUMENTS

◆ setupAuxiliaryQP() [2/3]

returnValue QProblem::setupAuxiliaryQP ( const Bounds *const  guessedBounds,
const Constraints *const  guessedConstraints 
)
protectedvirtualinherited

◆ setupAuxiliaryQP() [3/3]

returnValue QProblemB::setupAuxiliaryQP ( const Bounds *const  guessedBounds)
protectedvirtualinherited

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

Returns
SUCCESSFUL_RETURN
RET_SETUP_AUXILIARYQP_FAILED
Parameters
guessedBoundsInitial 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().

◆ setupAuxiliaryQPbounds()

returnValue QProblem::setupAuxiliaryQPbounds ( const Bounds *const  auxiliaryBounds,
const Constraints *const  auxiliaryConstraints,
BooleanType  useRelaxation 
)
protectedinherited

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!).

Returns
SUCCESSFUL_RETURN
RET_UNKNOWN_BUG
Parameters
auxiliaryBoundsWorking set of bounds for auxiliary QP.
auxiliaryConstraintsWorking set of constraints for auxiliary QP.
useRelaxationFlag indicating if inactive (constraints') bounds shall be relaxed.

References QProblem::Ax_l, QProblem::Ax_u, Options::boundRelaxation, QProblemB::bounds, BT_TRUE, QProblem::constraints, QProblem::getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), QProblemB::lb, QProblem::lbA, QProblemB::options, RET_UNKNOWN_BUG, ST_EQUALITY, ST_INACTIVE, ST_INFEASIBLE_LOWER, ST_INFEASIBLE_UPPER, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, THROWERROR, QProblemB::ub, QProblem::ubA, and QProblemB::x.

Referenced by QProblem::setupAuxiliaryQP(), setupNewAuxiliaryQP(), and QProblem::solveInitialQP().

◆ setupAuxiliaryQPgradient()

returnValue QProblem::setupAuxiliaryQPgradient ( )
protectedinherited

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!).

Returns
SUCCESSFUL_RETURN

References QProblem::A, BT_FALSE, QProblemB::g, QProblem::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 QProblem::performDriftCorrection(), QProblem::performRamping(), SQProblemSchur::setupAuxiliaryQP(), QProblem::setupAuxiliaryQP(), setupNewAuxiliaryQP(), and QProblem::solveInitialQP().

◆ setupAuxiliaryQPsolution()

returnValue QProblem::setupAuxiliaryQPsolution ( const real_t *const  xOpt,
const real_t *const  yOpt 
)
protectedinherited

Sets up the optimal primal/dual solution of the auxiliary initial QP.

Returns
SUCCESSFUL_RETURN
Parameters
xOptOptimal primal solution vector. If a NULL pointer is passed, all entries are set to zero.
yOptOptimal dual solution vector. If a NULL pointer is passed, all entries are set to zero.

References QProblem::A, QProblem::Ax, QProblem::Ax_l, QProblem::Ax_u, QProblem::getNC(), QProblemB::getNV(), SUCCESSFUL_RETURN, Matrix::times(), QProblemB::x, and QProblemB::y.

Referenced by QProblem::solveInitialQP().

◆ setupAuxiliaryWorkingSet()

returnValue QProblem::setupAuxiliaryWorkingSet ( const Bounds *const  auxiliaryBounds,
const Constraints *const  auxiliaryConstraints,
BooleanType  setupAfresh 
)
protectedvirtualinherited

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!)

Returns
SUCCESSFUL_RETURN
RET_SETUP_WORKINGSET_FAILED
RET_INVALID_ARGUMENTS
RET_UNKNOWN_BUG
Parameters
auxiliaryBoundsWorking set of bounds for auxiliary QP.
auxiliaryConstraintsWorking set of constraints for auxiliary QP.
setupAfreshFlag indicating if given working set shall be setup afresh or by updating the current one.

Reimplemented in SQProblemSchur.

References QProblem::addBound(), QProblem::addBound_checkLI(), QProblem::addConstraint(), QProblem::addConstraint_checkLI(), QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraints, Options::enableFullLITests, Options::enableNZCTests, Options::epsLITests, QProblem::getNC(), QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), Bounds::moveFreeToFixed(), QProblemB::options, real_t, QProblem::removeBound(), QProblem::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 QProblem::setupAuxiliaryQP(), setupNewAuxiliaryQP(), and QProblem::solveInitialQP().

◆ setupInitialCholesky()

returnValue QProblem::setupInitialCholesky ( )
protectedvirtualinherited

Computes initial Cholesky decomposition of the projected Hessian making use of the function computeCholesky() or computeProjectedCholesky().

Returns
SUCCESSFUL_RETURN
RET_HESSIAN_NOT_SPD
RET_INDEXLIST_CORRUPTED

Reimplemented from QProblemB.

References BT_TRUE, QProblem::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 QProblem::hotstart().

◆ setupNewAuxiliaryQP() [1/2]

returnValue SQProblem::setupNewAuxiliaryQP ( SymmetricMatrix H_new,
Matrix A_new,
const real_t lb_new,
const real_t ub_new,
const real_t lbA_new,
const real_t ubA_new 
)
protectedvirtual

Sets new matrices and calculates their factorisations. 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. Afterwards, all QP vectors are transformed in order to start from an optimal solution.

Returns
SUCCESSFUL_RETURN
RET_MATRIX_FACTORISATION_FAILED
RET_NO_HESSIAN_SPECIFIED
Parameters
H_newNew Hessian matrix.
If Hessian matrix is trivial, a NULL pointer can be passed.
A_newNew constraint matrix.
If QP sequence does not involve constraints, a NULL pointer can be passed.
lb_newNew lower bounds.
If no lower bounds exist, a NULL pointer can be passed.
ub_newNew upper bounds.
If no lower bounds exist, a NULL pointer can be passed.
lbA_newNew lower constraints' bounds.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_newNew lower constraints' bounds.
If no lower constraints' bounds exist, a NULL pointer can be passed.

References QProblem::Ax, QProblem::Ax_l, QProblem::Ax_u, QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::computeProjectedCholesky(), QProblem::constraints, QProblemB::determineHessianType(), QProblem::getNC(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::getStatus(), SubjectTo::getType(), QProblemB::H, QProblemB::hessianType, HST_SEMIDEF, HST_UNKNOWN, HST_ZERO, Bounds::init(), Constraints::init(), Options::initialStatusBounds, QProblem::lbA, QProblemB::options, QPS_AUXILIARYQPSOLVED, QPS_NOTINITIALISED, QPS_PERFORMINGHOMOTOPY, QPS_PREPARINGAUXILIARYQP, QProblemB::regulariseHessian(), QProblemB::regVal, RET_INVALID_ARGUMENTS, RET_NO_HESSIAN_SPECIFIED, RET_SETUP_AUXILIARYQP_FAILED, RET_UPDATEMATRICES_FAILED_AS_QP_NOT_SOLVED, QProblem::setA(), QProblemB::setH(), SubjectTo::setStatus(), Bounds::setupAllFree(), Constraints::setupAllInactive(), QProblem::setupAuxiliaryQPbounds(), QProblem::setupAuxiliaryQPgradient(), QProblem::setupAuxiliaryWorkingSet(), QProblem::setupSubjectToType(), QProblem::setupTQfactorisation(), ST_BOUNDED, ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UPPER, QProblemB::status, SUCCESSFUL_RETURN, THROWERROR, QProblem::ubA, QProblemB::usingRegularisation(), and QProblemB::y.

Referenced by hotstart(), and setupNewAuxiliaryQP().

◆ setupNewAuxiliaryQP() [2/2]

returnValue SQProblem::setupNewAuxiliaryQP ( const real_t *const  H_new,
const real_t *const  A_new,
const real_t lb_new,
const real_t ub_new,
const real_t lbA_new,
const real_t ubA_new 
)
protectedvirtual

Sets new matrices and calculates their factorisations. 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. Afterwards, all QP vectors are transformed in order to start from an optimal solution.

Returns
SUCCESSFUL_RETURN
RET_MATRIX_FACTORISATION_FAILED
RET_NO_HESSIAN_SPECIFIED
Parameters
H_newNew Hessian matrix.
If Hessian matrix is trivial, a NULL pointer can be passed.
A_newNew constraint matrix.
If QP sequence does not involve constraints, a NULL pointer can be passed.
lb_newNew lower bounds.
If no lower bounds exist, a NULL pointer can be passed.
ub_newNew upper bounds.
If no lower bounds exist, a NULL pointer can be passed.
lbA_newNew lower constraints' bounds.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_newNew lower constraints' bounds.
If no lower constraints' bounds exist, a NULL pointer can be passed.

References BT_TRUE, QProblem::freeConstraintMatrix, QProblemB::freeHessian, QProblem::getNC(), QProblemB::getNV(), real_t, RET_INVALID_ARGUMENTS, setupNewAuxiliaryQP(), and THROWERROR.

◆ setupQPdata() [1/4]

returnValue QProblemB::setupQPdata ( SymmetricMatrix _H,
const real_t *const  _g,
const real_t *const  _lb,
const real_t *const  _ub 
)
protectedinherited

Sets up internal QP data.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
Parameters
_HHessian matrix.
_gGradient vector.
_lbLower bounds (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper 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 QProblem::setupQPdata().

◆ setupQPdata() [2/4]

returnValue QProblemB::setupQPdata ( const real_t *const  _H,
const real_t *const  _g,
const real_t *const  _lb,
const real_t *const  _ub 
)
protectedinherited

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.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
RET_NO_HESSIAN_SPECIFIED
Parameters
_HHessian matrix.
If Hessian matrix is trivial,a NULL pointer can be passed.
_gGradient vector.
_lbLower bounds (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper 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.

◆ setupQPdata() [3/4]

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 
)
protectedinherited

Sets up internal QP data.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
RET_UNKNONW_BUG
Parameters
_HHessian matrix.
If Hessian matrix is trivial,a NULL pointer can be passed.
_gGradient vector.
_AConstraint matrix.
_lbLower bound vector (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper bound vector (on variables).
If no upper bounds exist, a NULL pointer can be passed.
_lbALower constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.
_ubAUpper constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.

References QProblem::getNC(), and QProblemB::getNV().

Referenced by QProblem::init().

◆ setupQPdata() [4/4]

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 
)
protectedinherited

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.

Returns
SUCCESSFUL_RETURN
RET_INVALID_ARGUMENTS
RET_UNKNONW_BUG
Parameters
_HHessian matrix.
If Hessian matrix is trivial,a NULL pointer can be passed.
_gGradient vector.
_AConstraint matrix.
_lbLower bound vector (on variables).
If no lower bounds exist, a NULL pointer can be passed.
_ubUpper bound vector (on variables).
If no upper bounds exist, a NULL pointer can be passed.
_lbALower constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.
_ubAUpper constraints' bound vector.
If no lower constraints' bounds exist, a NULL pointer can be passed.

References QProblem::getNC(), RET_INVALID_ARGUMENTS, QProblem::setA(), QProblem::setLBA(), QProblem::setUBA(), QProblemB::setupQPdata(), SUCCESSFUL_RETURN, and THROWERROR.

◆ setupQPdataFromFile() [1/2]

returnValue QProblemB::setupQPdataFromFile ( const char *const  H_file,
const char *const  g_file,
const char *const  lb_file,
const char *const  ub_file 
)
protectedinherited

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.

Returns
SUCCESSFUL_RETURN
RET_UNABLE_TO_OPEN_FILE
RET_UNABLE_TO_READ_FILE
RET_INVALID_ARGUMENTS
RET_NO_HESSIAN_SPECIFIED
Parameters
H_fileName 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_fileName of file where gradient, of neighbouring QP to be solved, is stored.
lb_fileName 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_fileName 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(), and QProblem::setupQPdataFromFile().

◆ setupQPdataFromFile() [2/2]

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 
)
protectedinherited

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.

Returns
SUCCESSFUL_RETURN
RET_UNABLE_TO_OPEN_FILE
RET_UNABLE_TO_READ_FILE
RET_INVALID_ARGUMENTS
RET_UNKNONW_BUG
Parameters
H_fileName 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_fileName of file where gradient, of neighbouring QP to be solved, is stored.
A_fileName of file where constraint matrix, of neighbouring QP to be solved, is stored.
lb_fileName 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_fileName 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_fileName 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_fileName 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 QProblem::A, Matrix::doFreeMemory(), QProblem::getNC(), QProblemB::getNV(), INFTY, QProblem::lbA, readFromFile(), real_t, RET_INVALID_ARGUMENTS, QProblem::setA(), QProblemB::setupQPdataFromFile(), SUCCESSFUL_RETURN, THROWERROR, and QProblem::ubA.

Referenced by QProblem::init().

◆ setupSubjectToType() [1/5]

returnValue QProblemB::setupSubjectToType ( const real_t *const  lb_new,
const real_t *const  ub_new 
)
protectedvirtualinherited

Determines type of new constraints and bounds (i.e. implicitly fixed, unbounded etc.).

Returns
SUCCESSFUL_RETURN
RET_SETUPSUBJECTTOTYPE_FAILED
Parameters
lb_newNew lower bounds.
ub_newNew 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.

◆ setupSubjectToType() [2/5]

returnValue QProblem::setupSubjectToType ( )
protectedvirtualinherited

Determines type of existing constraints and bounds (i.e. implicitly fixed, unbounded etc.).

Returns
SUCCESSFUL_RETURN
RET_SETUPSUBJECTTOTYPE_FAILED

Reimplemented from QProblemB.

References QProblemB::lb, QProblem::lbA, QProblemB::ub, and QProblem::ubA.

Referenced by QProblem::setupAuxiliaryQP(), setupNewAuxiliaryQP(), and QProblem::solveInitialQP().

◆ setupSubjectToType() [3/5]

returnValue QProblemB::setupSubjectToType
protectedinherited

Determines type of new constraints and bounds (i.e. implicitly fixed, unbounded etc.).

Returns
SUCCESSFUL_RETURN
RET_SETUPSUBJECTTOTYPE_FAILED

◆ setupSubjectToType() [4/5]

returnValue QProblemB::setupSubjectToType
protectedinherited

Determines type of new constraints and bounds (i.e. implicitly fixed, unbounded etc.).

Returns
SUCCESSFUL_RETURN
RET_SETUPSUBJECTTOTYPE_FAILED

◆ setupSubjectToType() [5/5]

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 
)
protectedvirtualinherited

◆ setupTQfactorisation()

returnValue QProblem::setupTQfactorisation ( )
protectedvirtualinherited

Initialises TQ factorisation of A (i.e. A*Q = [0 T]) if NO constraint is active.

Returns
SUCCESSFUL_RETURN
RET_INDEXLIST_CORRUPTED

Reimplemented in SQProblemSchur.

References QProblemB::bounds, Bounds::getFree(), QProblemB::getNFR(), Indexlist::getNumberArray(), QProblemB::getNV(), QProblem::Q, QQ, QProblem::sizeT, SUCCESSFUL_RETURN, and QProblem::T.

Referenced by QProblem::setupAuxiliaryQP(), setupNewAuxiliaryQP(), and QProblem::solveInitialQP().

◆ shallRefactorise()

BooleanType QProblem::shallRefactorise ( const Bounds *const  guessedBounds,
const Constraints *const  guessedConstraints 
) const
protectedinherited

Determines if it is more efficient to refactorise the matrices when hotstarting or not (i.e. better to update the existing factorisations).

Returns
BT_TRUE iff matrices shall be refactorised afresh
Parameters
guessedBoundsGuessed new working set of bounds.
guessedConstraintsGuessed new working set of constraints.

References QProblemB::bounds, BT_FALSE, BT_TRUE, QProblem::constraints, Constraints::getNAC(), QProblem::getNC(), Bounds::getNFX(), QProblemB::getNV(), SubjectTo::getStatus(), QProblemB::hessianType, HST_INDEF, and HST_SEMIDEF.

Referenced by QProblem::setupAuxiliaryQP().

◆ solveCurrentEQP()

returnValue QProblem::solveCurrentEQP ( const int_t  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 
)
inherited

Solves an equality-constrained QP problem resulting from the current working set.

Returns
SUCCESSFUL_RETURN
RET_STEPDIRECTION_FAILED_TQ
RET_STEPDIRECTION_FAILED_CHOLESKY
RET_INVALID_ARGUMENTS
Parameters
n_rhsNumber of consecutive right hand sides
g_inGradient of neighbouring QP to be solved.
lb_inLower bounds of neighbouring QP to be solved.
If no lower bounds exist, a NULL pointer can be passed.
ub_inUpper bounds of neighbouring QP to be solved.
If no upper bounds exist, a NULL pointer can be passed.
lbA_inLower constraints' bounds of neighbouring QP to be solved.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_inUpper constraints' bounds of neighbouring QP to be solved.
x_outOutput: Primal solution
y_outOutput: Dual solution

References QProblemB::bounds, BT_FALSE, QProblem::constraints, QProblem::determineStepDirection(), Constraints::getActive(), Bounds::getFixed(), Bounds::getFree(), QProblem::getNAC(), QProblem::getNC(), QProblemB::getNFR(), QProblemB::getNFX(), Indexlist::getNumberArray(), QProblemB::getNV(), real_t, RET_INVALID_ARGUMENTS, SUCCESSFUL_RETURN, and THROWERROR.

Referenced by main().

◆ solveInitialQP()

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_t nWSR,
real_t *const  cputime 
)
protectedinherited

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!

Returns
SUCCESSFUL_RETURN
RET_INIT_FAILED
RET_INIT_FAILED_CHOLESKY
RET_INIT_FAILED_TQ
RET_INIT_FAILED_HOTSTART
RET_INIT_FAILED_INFEASIBILITY
RET_INIT_FAILED_UNBOUNDEDNESS
RET_MAX_NWSR_REACHED
Parameters
xOptOptimal primal solution vector.
yOptOptimal dual solution vector.
guessedBoundsOptimal working set of bounds for solution (xOpt,yOpt).
guessedConstraintsOptimal working set of constraints for solution (xOpt,yOpt).
_RPre-computed (upper triangular) Cholesky factor of Hessian matrix.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: 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, QProblem::constraints, QProblemB::determineHessianType(), Options::enableRamping, QProblemB::g, getCPUtime(), QProblem::getNC(), QProblemB::getNV(), QProblemB::haveCholesky, QProblemB::hessianType, QProblem::hotstart(), HST_SEMIDEF, HST_ZERO, Options::initialStatusBounds, QProblemB::isInfeasible(), QProblemB::isUnbounded(), QProblemB::lb, QProblem::lbA, QProblem::obtainAuxiliaryWorkingSet(), QProblemB::options, QProblem::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(), QProblem::setupAuxiliaryQPbounds(), QProblem::setupAuxiliaryQPgradient(), QProblem::setupAuxiliaryQPsolution(), QProblem::setupAuxiliaryWorkingSet(), QProblem::setupSubjectToType(), QProblem::setupTQfactorisation(), ST_INACTIVE, QProblemB::status, SUCCESSFUL_RETURN, THROWERROR, THROWINFO, THROWWARNING, QProblemB::ub, and QProblem::ubA.

Referenced by QProblem::init().

◆ solveQP()

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_t nWSR,
real_t *const  cputime,
int_t  nWSRperformed = 0,
BooleanType  isFirstCall = BT_TRUE 
)
protectedinherited

Solves QProblem using online active set strategy. Note: This function is internally called by all hotstart functions!

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
Parameters
g_newGradient of neighbouring QP to be solved.
lb_newLower bounds of neighbouring QP to be solved.
If no lower bounds exist, a NULL pointer can be passed.
ub_newUpper bounds of neighbouring QP to be solved.
If no upper bounds exist, a NULL pointer can be passed.
lbA_newLower constraints' bounds of neighbouring QP to be solved.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_newUpper constraints' bounds of neighbouring QP to be solved.
If no upper constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
nWSRperformedNumber 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.
isFirstCallIndicating whether this is the first call for current QP.

References __FILE__, __FUNC__, __LINE__, BT_FALSE, BT_TRUE, QProblem::changeActiveSet(), QProblem::computeProjectedCholesky(), QProblem::determineDataShift(), QProblem::determineStepDirection(), Options::enableCholeskyRefactorisation, Options::enableDriftCorrection, Options::enableRamping, EPS, TabularOutput::excAddB, TabularOutput::excAddC, TabularOutput::excRemB, TabularOutput::excRemC, getCPUtime(), getGlobalMessageHandler(), QProblem::getNC(), QProblemB::getNV(), QProblem::getRelativeHomotopyLength(), QProblemB::getStatus(), TabularOutput::idxAddB, TabularOutput::idxAddC, TabularOutput::idxRemB, TabularOutput::idxRemC, QProblemB::infeasible, QProblemB::isCPUtimeLimitExceeded(), QProblemB::isInfeasible(), MAX_STRING_LENGTH, QProblemB::options, QProblem::performDriftCorrection(), QProblem::performRamping(), QProblem::performStep(), PL_HIGH, QProblem::printIteration(), Options::printLevel, QPS_HOMOTOPYQPSOLVED, QPS_NOTINITIALISED, QPS_PERFORMINGHOMOTOPY, QPS_PREPARINGAUXILIARYQP, QPS_SOLVED, real_t, RET_HOMOTOPY_STEP_FAILED, RET_HOTSTART_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, QProblem::updateActivitiesForHotstart(), and VS_VISIBLE.

Referenced by QProblem::solveRegularisedQP().

◆ 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_t nWSR,
real_t *const  cputime,
int_t  nWSRperformed = 0,
BooleanType  isFirstCall = BT_TRUE 
)
protectedinherited

Solves QProblem using online active set strategy. Note: This function is internally called by all hotstart functions!

Returns
SUCCESSFUL_RETURN
RET_MAX_NWSR_REACHED
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED
RET_HOTSTART_FAILED
RET_SHIFT_DETERMINATION_FAILED
RET_STEPDIRECTION_DETERMINATION_FAILED
RET_STEPLENGTH_DETERMINATION_FAILED
RET_HOMOTOPY_STEP_FAILED
RET_HOTSTART_STOPPED_INFEASIBILITY
RET_HOTSTART_STOPPED_UNBOUNDEDNESS
Parameters
g_newGradient of neighbouring QP to be solved.
lb_newLower bounds of neighbouring QP to be solved.
If no lower bounds exist, a NULL pointer can be passed.
ub_newUpper bounds of neighbouring QP to be solved.
If no upper bounds exist, a NULL pointer can be passed.
lbA_newLower constraints' bounds of neighbouring QP to be solved.
If no lower constraints' bounds exist, a NULL pointer can be passed.
ubA_newUpper constraints' bounds of neighbouring QP to be solved.
If no upper constraints' bounds exist, a NULL pointer can be passed.
nWSRInput: Maximum number of working set recalculations;
Output: Number of performed working set recalculations.
cputimeInput: Maximum CPU time allowed for QP solution.
Output: CPU time spent for QP solution (or to perform nWSR iterations).
nWSRperformedNumber 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.
isFirstCallIndicating 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, QProblem::solveQP(), SUCCESSFUL_RETURN, THROWWARNING, QProblemB::usingRegularisation(), and QProblemB::x.

Referenced by QProblem::hotstart().

◆ updateActivitiesForHotstart()

returnValue QProblem::updateActivitiesForHotstart ( const real_t *const  lb_new,
const real_t *const  ub_new,
const real_t *const  lbA_new,
const real_t *const  ubA_new 
)
protectedvirtualinherited

Update activities in a hot start if some of the bounds have become infinity or if variables have become fixed.

Parameters
lb_newNew lower bounds.
ub_newNew upper bounds.
lbA_newNew lower constraints' bounds.
ubA_newNew upper constraints' bounds.

References QProblem::addBound(), QProblem::addBound_checkLI(), Options::boundRelaxation, QProblemB::bounds, BT_FALSE, BT_TRUE, Options::enableNZCTests, QProblemB::g, QProblemB::getNV(), SubjectTo::getStatus(), SubjectTo::getType(), INFTY, QProblemB::lb, QProblemB::options, QProblem::removeBound(), RET_LINEARLY_INDEPENDENT, RET_SETUPSUBJECTTOTYPE_FAILED, QProblemB::setupSubjectToType(), ST_EQUALITY, ST_INACTIVE, ST_LOWER, ST_UPPER, SUCCESSFUL_RETURN, THROWERROR, QProblemB::ub, QProblemB::x, and QProblemB::y.

Referenced by QProblem::solveQP().

◆ updateFarBounds() [1/2]

returnValue QProblemB::updateFarBounds ( real_t  curFarBound,
int_t  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
protectedinherited

...

Parameters
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(), and QProblem::updateFarBounds().

◆ updateFarBounds() [2/2]

returnValue QProblem::updateFarBounds ( real_t  curFarBound,
int_t  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
protectedinherited

...

Parameters
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(), QProblem::getNC(), QProblemB::getNV(), QProblemB::options, QProblemB::ramp0, QProblemB::ramp1, QProblemB::rampOffset, real_t, SUCCESSFUL_RETURN, and QProblemB::updateFarBounds().

Referenced by QProblem::hotstart().

◆ usingRegularisation()

BooleanType QProblemB::usingRegularisation ( ) const
inlineinherited

◆ writeQpDataIntoMatFile()

returnValue QProblem::writeQpDataIntoMatFile ( const char *const  filename) const
inherited

◆ writeQpWorkspaceIntoMatFile()

returnValue QProblem::writeQpWorkspaceIntoMatFile ( const char *const  filename)
inherited

Member Data Documentation

◆ A

Matrix* QProblem::A
protectedinherited

◆ Ax

real_t* QProblem::Ax
protectedinherited

◆ Ax_l

real_t* QProblem::Ax_l
protectedinherited

◆ Ax_u

real_t* QProblem::Ax_u
protectedinherited

◆ bounds

Bounds QProblemB::bounds
protectedinherited

Data structure for problem's bounds.

Referenced by SQProblemSchur::addBound(), QProblem::addBound(), QProblemB::addBound(), SQProblemSchur::addBound_checkLISchur(), SQProblemSchur::addBound_ensureLI(), QProblem::addBound_ensureLI(), QProblem::addConstraint(), QProblem::addConstraint_checkLI(), SQProblemSchur::addConstraint_checkLISchur(), SQProblemSchur::addConstraint_ensureLI(), QProblem::addConstraint_ensureLI(), SolutionAnalysis::checkCurvatureOnStronglyActiveConstraints(), QProblemB::computeCholesky(), QProblem::computeProjectedCholesky(), SQProblemSchur::correctInertia(), QProblemB::determineDataShift(), QProblem::determineDataShift(), QProblem::determineStepDirection(), QProblemB::determineStepDirection(), SQProblemSchur::determineStepDirection2(), QProblem::dropInfeasibles(), QProblem::ensureNonzeroCurvature(), QProblemB::getBounds(), QProblem::getFreeVariablesFlags(), QProblemB::getNFR(), QProblemB::getNFV(), QProblemB::getNFX(), QProblemB::getNV(), SolutionAnalysis::getVarianceCovariance(), QProblemB::getWorkingSetBounds(), QProblem::hotstart(), QProblemB::obtainAuxiliaryWorkingSet(), QProblem::performDriftCorrection(), QProblemB::performDriftCorrection(), QProblemB::performRamping(), QProblem::performRamping(), QProblem::performStep(), QProblemB::performStep(), QProblem::printProperties(), QProblemB::printProperties(), QProblemB::QProblemB(), SQProblemSchur::removeBound(), QProblem::removeBound(), QProblemB::removeBound(), QProblem::removeConstraint(), SQProblemSchur::repairSingularWorkingSet(), QProblemB::reset(), QProblem::setupAuxiliaryQP(), QProblemB::setupAuxiliaryQP(), QProblem::setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), SQProblemSchur::setupAuxiliaryWorkingSet(), QProblem::setupAuxiliaryWorkingSet(), QProblemB::setupAuxiliaryWorkingSet(), setupNewAuxiliaryQP(), QProblemB::setupSubjectToType(), QProblem::setupTQfactorisation(), QProblem::shallRefactorise(), QProblemB::shallRefactorise(), QProblem::solveCurrentEQP(), QProblem::solveInitialQP(), QProblemB::solveInitialQP(), QProblem::updateActivitiesForHotstart(), and QProblem::writeQpWorkspaceIntoMatFile().

◆ constraintProduct

ConstraintProduct* QProblem::constraintProduct
protectedinherited

Pointer to user-defined constraint product function.

Referenced by QProblem::performStep(), QProblem::QProblem(), QProblem::reset(), and QProblem::setConstraintProduct().

◆ constraints

Constraints QProblem::constraints
protectedinherited

◆ count

uint_t QProblemB::count
protectedinherited

◆ delta_xFR_TMP

real_t* QProblemB::delta_xFR_TMP
protectedinherited

◆ delta_xFRy

real_t* QProblem::delta_xFRy
protectedinherited

Temporary for determineStepDirection.

Referenced by QProblem::clear(), QProblem::determineStepDirection(), and QProblem::QProblem().

◆ delta_xFRz

real_t* QProblem::delta_xFRz
protectedinherited

Temporary for determineStepDirection.

Referenced by QProblem::clear(), QProblem::determineStepDirection(), and QProblem::QProblem().

◆ delta_yAC_TMP

real_t* QProblem::delta_yAC_TMP
protectedinherited

Temporary for determineStepDirection.

Referenced by QProblem::clear(), QProblem::determineStepDirection(), and QProblem::QProblem().

◆ flipper

Flipper QProblemB::flipper
protectedinherited

◆ freeConstraintMatrix

BooleanType QProblem::freeConstraintMatrix
protectedinherited

Flag indicating whether the constraint matrix needs to be de-allocated.

Referenced by QProblem::clear(), QProblem::QProblem(), QProblem::setA(), and setupNewAuxiliaryQP().

◆ freeHessian

BooleanType QProblemB::freeHessian
protectedinherited

Flag indicating whether the Hessian matrix needs to be de-allocated.

Referenced by QProblemB::clear(), QProblemB::QProblemB(), QProblemB::setH(), and setupNewAuxiliaryQP().

◆ g

real_t* QProblemB::g
protectedinherited

◆ H

SymmetricMatrix* QProblemB::H
protectedinherited

◆ haveCholesky

BooleanType QProblemB::haveCholesky
protectedinherited

◆ hessianType

HessianType QProblemB::hessianType
protectedinherited

◆ infeasible

BooleanType QProblemB::infeasible
protectedinherited

◆ lb

real_t* QProblemB::lb
protectedinherited

◆ lbA

real_t* QProblem::lbA
protectedinherited

◆ options

Options QProblemB::options
protectedinherited

Struct containing all user-defined options for solving QPs.

Referenced by SQProblemSchur::addBound(), QProblem::addBound_checkLI(), SQProblemSchur::addBound_checkLISchur(), SQProblemSchur::addBound_ensureLI(), QProblem::addBound_ensureLI(), SQProblemSchur::addConstraint(), QProblem::addConstraint_checkLI(), SQProblemSchur::addConstraint_checkLISchur(), SQProblemSchur::addConstraint_ensureLI(), QProblem::addConstraint_ensureLI(), QProblem::changeActiveSet(), SQProblemSchur::correctInertia(), SQProblemSchur::deleteFromSchurComplement(), QProblemB::determineHessianType(), QProblem::determineStepDirection(), QProblemB::determineStepDirection(), SQProblemSchur::determineStepDirection2(), QProblem::dropInfeasibles(), QProblem::ensureNonzeroCurvature(), QProblemB::getOptions(), QProblemB::getPrintLevel(), QProblemB::hotstart(), QProblem::hotstart(), QProblemB::obtainAuxiliaryWorkingSet(), QProblem::obtainAuxiliaryWorkingSet(), QProblem::performStep(), QProblemB::performStep(), QProblem::printIteration(), QProblemB::printIteration(), QProblemB::printOptions(), QProblem::printProperties(), QProblemB::printProperties(), QProblemB::QProblemB(), QProblemB::regulariseHessian(), SQProblemSchur::removeBound(), QProblem::removeBound(), QProblemB::removeBound(), SQProblemSchur::removeConstraint(), QProblem::removeConstraint(), SQProblemSchur::repairSingularWorkingSet(), QProblemB::reset(), SQProblemSchur::resetSchurComplement(), QProblemB::setInfeasibilityFlag(), QProblemB::setOptions(), QProblemB::setPrintLevel(), SQProblemSchur::setupAuxiliaryQP(), QProblem::setupAuxiliaryQPbounds(), QProblemB::setupAuxiliaryQPbounds(), SQProblemSchur::setupAuxiliaryWorkingSet(), QProblem::setupAuxiliaryWorkingSet(), QProblemB::setupInitialCholesky(), QProblem::setupInitialCholesky(), setupNewAuxiliaryQP(), QProblemB::setupSubjectToType(), QProblem::setupSubjectToType(), QProblem::solveInitialQP(), QProblemB::solveInitialQP(), QProblem::solveQP(), QProblemB::solveQP(), QProblem::solveRegularisedQP(), QProblemB::solveRegularisedQP(), SQProblemSchur::undoDeleteFromSchurComplement(), QProblem::updateActivitiesForHotstart(), QProblemB::updateFarBounds(), and QProblem::updateFarBounds().

◆ Q

real_t* QProblem::Q
protectedinherited

◆ R

real_t* QProblemB::R
protectedinherited

◆ ramp0

real_t QProblemB::ramp0
protectedinherited

◆ ramp1

real_t QProblemB::ramp1
protectedinherited

◆ rampOffset

int_t QProblemB::rampOffset
protectedinherited

◆ regVal

real_t QProblemB::regVal
protectedinherited

◆ sizeT

int_t QProblem::sizeT
protectedinherited

◆ status

QProblemStatus QProblemB::status
protectedinherited

◆ T

real_t* QProblem::T
protectedinherited

◆ tabularOutput

TabularOutput QProblemB::tabularOutput
protectedinherited

◆ tau

real_t QProblemB::tau
protectedinherited

◆ tempA

real_t* QProblem::tempA
protectedinherited

Temporary for determineStepDirection.

Referenced by QProblem::clear(), QProblem::determineStepDirection(), and QProblem::QProblem().

◆ tempB

real_t* QProblem::tempB
protectedinherited

Temporary for determineStepDirection.

Referenced by QProblem::clear(), QProblem::determineStepDirection(), and QProblem::QProblem().

◆ tempC

real_t* QProblem::tempC
protectedinherited

Temporary for constraint types.

Referenced by QProblem::clear(), QProblem::QProblem(), and QProblem::setA().

◆ ub

real_t* QProblemB::ub
protectedinherited

◆ ubA

real_t* QProblem::ubA
protectedinherited

◆ unbounded

BooleanType QProblemB::unbounded
protectedinherited

◆ x

real_t* QProblemB::x
protectedinherited

◆ y

real_t* QProblemB::y
protectedinherited

◆ ZFR_delta_xFRz

real_t* QProblem::ZFR_delta_xFRz
protectedinherited

Temporary for determineStepDirection.

Referenced by QProblem::clear(), QProblem::determineStepDirection(), and QProblem::QProblem().


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