Abstract base class for algorithms solving quadratic programs. More...
#include <dense_qp_solver.hpp>
Abstract base class for algorithms solving quadratic programs.
The class DenseQPsolver provides an abstract base class for different algorithms for solving quadratic programming (QP) problems.
Definition at line 57 of file dense_qp_solver.hpp.
Default constructor.
Definition at line 44 of file dense_qp_solver.cpp.
DenseQPsolver::DenseQPsolver | ( | UserInteraction * | _userInteraction | ) |
Definition at line 53 of file dense_qp_solver.cpp.
DenseQPsolver::DenseQPsolver | ( | const DenseQPsolver & | rhs | ) |
Copy constructor (deep copy).
Definition at line 62 of file dense_qp_solver.cpp.
Destructor.
Definition at line 69 of file dense_qp_solver.cpp.
virtual DenseCPsolver* DenseQPsolver::clone | ( | ) | const [pure virtual] |
Implements DenseCPsolver.
Implemented in QPsolver_qpOASES.
virtual DenseQPsolver* DenseQPsolver::cloneDenseQPsolver | ( | ) | const [pure virtual] |
Implemented in QPsolver_qpOASES.
virtual returnValue DenseQPsolver::getDualSolution | ( | DVector & | yOpt | ) | const [pure virtual] |
Returns dual solution vector if QP has been solved.
yOpt | OUTPUT: dual solution vector. |
Implemented in QPsolver_qpOASES.
virtual uint DenseQPsolver::getNumberOfConstraints | ( | ) | const [pure virtual] |
Implemented in QPsolver_qpOASES.
uint DenseQPsolver::getNumberOfIterations | ( | ) | const [virtual] |
Returns number of iterations performed at last QP solution.
Implements DenseCPsolver.
Definition at line 141 of file dense_qp_solver.cpp.
virtual uint DenseQPsolver::getNumberOfVariables | ( | ) | const [pure virtual] |
Implemented in QPsolver_qpOASES.
virtual double DenseQPsolver::getObjVal | ( | ) | const [pure virtual] |
Returns optimal objective function value.
Implemented in QPsolver_qpOASES.
virtual returnValue DenseQPsolver::getPrimalSolution | ( | DVector & | xOpt | ) | const [pure virtual] |
Returns primal solution vector if QP has been solved.
xOpt | OUTPUT: primal solution vector. |
Implemented in QPsolver_qpOASES.
QPStatus DenseQPsolver::getStatus | ( | ) | const [inline] |
Returns QP status.
virtual returnValue DenseQPsolver::getVarianceCovariance | ( | DMatrix & | var | ) | [pure virtual] |
Returns a variance-covariance estimate if possible or an error message otherwise.
Implements DenseCPsolver.
Implemented in QPsolver_qpOASES.
virtual returnValue DenseQPsolver::getVarianceCovariance | ( | DMatrix & | H, |
DMatrix & | var | ||
) | [pure virtual] |
Returns a variance-covariance estimate if possible or an error message otherwise.
Implements DenseCPsolver.
Implemented in QPsolver_qpOASES.
returnValue DenseQPsolver::init | ( | const DenseCP * | cp | ) | [virtual] |
Initializes QP object.
Implements DenseCPsolver.
Definition at line 93 of file dense_qp_solver.cpp.
returnValue DenseQPsolver::init | ( | uint | nV, |
uint | nC | ||
) | [virtual] |
Alternative way to initialize QP object.
nV | Number of QP variables. |
nC | Number of QP constraints (without bounds). |
Definition at line 86 of file dense_qp_solver.cpp.
BooleanType DenseQPsolver::isInfeasible | ( | ) | const [inline] |
Returns if QP has been found to be infeasible.
BooleanType DenseQPsolver::isSolved | ( | ) | const [inline] |
Returns if QP (or its relaxation) has been solved.
BooleanType DenseQPsolver::isUnbounded | ( | ) | const [inline] |
Returns if QP has been found to be unbounded.
returnValue DenseQPsolver::makeBoundsConsistent | ( | DenseCP * | cp | ) | const [protected, virtual] |
Definition at line 168 of file dense_qp_solver.cpp.
DenseQPsolver & DenseQPsolver::operator= | ( | const DenseQPsolver & | rhs | ) |
Assignment operator (deep copy).
Definition at line 74 of file dense_qp_solver.cpp.
returnValue DenseQPsolver::setupLogging | ( | ) | [protected, virtual] |
Reimplemented from DenseCPsolver.
Definition at line 154 of file dense_qp_solver.cpp.
virtual returnValue DenseQPsolver::setupQPobject | ( | uint | nV, |
uint | nC | ||
) | [protected, pure virtual] |
Setups QP object.
nV | Number of QP variables. |
nC | Number of QP constraints (without bounds). |
Implemented in QPsolver_qpOASES.
returnValue DenseQPsolver::solve | ( | DenseCP * | cp_ | ) | [virtual] |
Solves the QP.
Implements DenseCPsolver.
Reimplemented in QPsolver_qpOASES.
Definition at line 104 of file dense_qp_solver.cpp.
virtual returnValue DenseQPsolver::solve | ( | double * | H, |
double * | A, | ||
double * | g, | ||
double * | lb, | ||
double * | ub, | ||
double * | lbA, | ||
double * | ubA, | ||
uint | maxIter | ||
) | [pure virtual] |
Solves QP using at most <maxIter> iterations.
H | Hessian matrix of neighbouring QP to be solved. |
A | Constraint matrix of neighbouring QP to be solved. |
g | Gradient of neighbouring QP to be solved. |
lb | Lower bounds of neighbouring QP to be solved. |
ub | Upper bounds of neighbouring QP to be solved. |
lbA | Lower constraints' bounds of neighbouring QP to be solved. |
ubA | Upper constraints' bounds of neighbouring QP to be solved. |
maxIter | Maximum number of iterations. |
Implemented in QPsolver_qpOASES.
virtual returnValue DenseQPsolver::solve | ( | DMatrix * | H, |
DMatrix * | A, | ||
DVector * | g, | ||
DVector * | lb, | ||
DVector * | ub, | ||
DVector * | lbA, | ||
DVector * | ubA, | ||
uint | maxIter | ||
) | [pure virtual] |
Solves QP using at most <maxIter> iterations.
H | Hessian matrix of neighbouring QP to be solved. |
A | Constraint matrix of neighbouring QP to be solved. |
g | Gradient of neighbouring QP to be solved. |
lb | Lower bounds of neighbouring QP to be solved. |
ub | Upper bounds of neighbouring QP to be solved. |
lbA | Lower constraints' bounds of neighbouring QP to be solved. |
ubA | Upper constraints' bounds of neighbouring QP to be solved. |
maxIter | Maximum number of iterations. |
Implemented in QPsolver_qpOASES.
virtual returnValue DenseQPsolver::step | ( | double * | H, |
double * | A, | ||
double * | g, | ||
double * | lb, | ||
double * | ub, | ||
double * | lbA, | ||
double * | ubA | ||
) | [pure virtual] |
Performs exactly one QP iteration.
H | Hessian matrix of neighbouring QP to be solved. |
A | Constraint matrix of neighbouring QP to be solved. |
g | Gradient of neighbouring QP to be solved. |
lb | Lower bounds of neighbouring QP to be solved. |
ub | Upper bounds of neighbouring QP to be solved. |
lbA | Lower constraints' bounds of neighbouring QP to be solved. |
ubA | Upper constraints' bounds of neighbouring QP to be solved. |
Implemented in QPsolver_qpOASES.
virtual returnValue DenseQPsolver::step | ( | DMatrix * | H, |
DMatrix * | A, | ||
DVector * | g, | ||
DVector * | lb, | ||
DVector * | ub, | ||
DVector * | lbA, | ||
DVector * | ubA | ||
) | [pure virtual] |
Performs exactly one QP iteration.
H | Hessian matrix of neighbouring QP to be solved. |
A | Constraint matrix of neighbouring QP to be solved. |
g | Gradient of neighbouring QP to be solved. |
lb | Lower bounds of neighbouring QP to be solved. |
ub | Upper bounds of neighbouring QP to be solved. |
lbA | Lower constraints' bounds of neighbouring QP to be solved. |
ubA | Upper constraints' bounds of neighbouring QP to be solved. |
Implemented in QPsolver_qpOASES.
int DenseQPsolver::numberOfSteps [protected] |
Definition at line 236 of file dense_qp_solver.hpp.
QPStatus DenseQPsolver::qpStatus [protected] |
Definition at line 235 of file dense_qp_solver.hpp.