59 qp =
new qpOASES::SQProblem( *(rhs.
qp) );
83 qp =
new qpOASES::SQProblem( *(rhs.
qp) );
131 if ( (
bool)
qp->isInitialised( ) == false )
137 int performHotstart = 0;
140 if ( (
bool)performHotstart == true )
190 return solve( H,A,g,lb,ub,lbA,ubA,1 );
204 return solve( H,A,g,lb,ub,lbA,ubA,1 );
214 double* xOptTmp =
new double[
dim];
236 double* yOptTmp =
new double[
dim];
257 if ( (
isSolved( ) ==
false ) || (
qp == 0 ) )
260 return qp->getObjVal( );
295 qpOASES::SolutionAnalysis
analyser ;
303 double *
Var =
new double[(2*NV+NC)*(2*NV+NC)];
304 double *PrimalDualVar =
new double[(2*NV+NC)*(2*NV+NC)];
306 for( run1 = 0; run1 < (2*NV+NC)*(2*NV+NC); run1++ )
309 for( run1 = 0; run1 < NV; run1++ )
310 for( run2 = 0; run2 < NV; run2++ )
311 Var[run1*(2*NV+NC)+run2] =
H(run1,run2);
313 returnvalue = analyser.getVarianceCovariance(
qp, Var, PrimalDualVar );
317 delete[] PrimalDualVar;
323 for( run1 = 0; run1 < NV; run1++ )
324 for( run2 = 0; run2 < NV; run2++ )
325 var( run1, run2 ) = PrimalDualVar[run1*(2*NV+NC)+run2];
328 delete[] PrimalDualVar;
345 qp =
new qpOASES::SQProblem( nV,nC );
350 qp->setOptions( options );
393 if ( (
bool)
qp->isInfeasible( ) == true )
400 if ( (
bool)
qp->isUnbounded( ) == true )
returnValue setLast(LogName _name, int lastValue, double time=-INFTY)
void init(unsigned _nRows=0, unsigned _nCols=0)
QPsolver_qpOASES & operator=(const QPsolver_qpOASES &rhs)
virtual returnValue solve(DenseCP *cp_)
DenseQPsolver & operator=(const DenseQPsolver &rhs)
Allows to pass back messages to the calling function.
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
virtual returnValue getVarianceCovariance(DMatrix &var)
BooleanType isUnbounded() const
virtual returnValue getDualSolution(DVector &yOpt) const
#define CLOSE_NAMESPACE_ACADO
virtual returnValue getPrimalSolution(DVector &xOpt) const
Abstract base class for algorithms solving quadratic programs.
BooleanType isSolved() const
virtual returnValue setupQPobject(uint nV, uint nC)
virtual DenseQPsolver * cloneDenseQPsolver() const
Data class for storing generic conic programs.
returnValue updateQPstatus(int ret)
virtual double getObjVal() const
Encapsulates all user interaction for setting options, logging data and plotting results.
void rhs(const real_t *x, real_t *f)
EIGEN_STRONG_INLINE const Scalar * data() const
virtual returnValue step(double *H, double *A, double *g, double *lb, double *ub, double *lbA, double *ubA)
GenericVector< double > DVector
virtual returnValue solve(DenseCP *cp_)
#define BEGIN_NAMESPACE_ACADO
virtual ~QPsolver_qpOASES()
Base class for algorithms solving conic programs.
virtual uint getNumberOfVariables() const
virtual DenseCPsolver * clone() const
#define ACADOERROR(retval)
virtual uint getNumberOfConstraints() const