36 #include <qpOASES.hpp> 77 fprintf(
stdFile,
"Solved dense problem in %d iterations, %.3f seconds.\n", (
int)nWSR, toc-tic);
80 real_t statD, feasD, cmplD;
84 printf(
"stat = %e\nfeas = %e\ncmpl = %e\n\n", statD,feasD,cmplD );
96 fprintf(
stdFile,
"Solved sparse problem in %d iterations, %.3f seconds.\n", (
int)nWSR, toc-tic);
99 real_t statS, feasS, cmplS;
103 printf(
"stat = %e\nfeas = %e\ncmpl = %e\n\n", statS,feasS,cmplS );
106 for (i = 0; i < 180; i++)
107 if (
getAbs(x1[i] - x2[i]) > errP)
108 errP =
getAbs(x1[i] - x2[i]);
109 fprintf(
stdFile,
"Primal error: %9.2e\n", errP);
111 for (i = 0; i < 271; i++)
112 if (
getAbs(y1[i] - y2[i]) > errD)
113 errD =
getAbs(y1[i] - y2[i]);
114 fprintf(
stdFile,
"Dual error: %9.2e (might not be unique)\n", errD);
returnValue getPrimalSolution(real_t *const xOpt) const
#define USING_NAMESPACE_QPOASES
Interfaces matrix-vector operations tailored to symmetric sparse matrices.
returnValue init(const real_t *const _H, const real_t *const _g, const real_t *const _A, const real_t *const _lb, const real_t *const _ub, const real_t *const _lbA, const real_t *const _ubA, int &nWSR, const real_t *const yOpt=0, real_t *const cputime=0)
Interfaces matrix-vector operations tailored to symmetric dense matrices.
Interfaces matrix-vector operations tailored to general dense matrices.
Interfaces matrix-vector operations tailored to general sparse matrices.
Provides additional tools for analysing QP solutions.
#define QPOASES_TEST_FOR_TOL(x, tol)
real_t getKktViolation(QProblemB *const qp, real_t *const maxStat=0, real_t *const maxFeas=0, real_t *const maxCmpl=0) const
Implements the online active set strategy for QPs with general constraints.
returnValue getDualSolution(real_t *const yOpt) const