5 template<
class T,
class Y>
6 void eraseFunctionFromSolver
11 (solver->*internalRemove)(*v.back());
46 if(constraint.isEquality())
56 if(constraint.isEquality())
66 addBounds_(constraint);
71 addBounds_(constraint);
76 ocra_assert(constraint.isInequality() &&
"How queer! A bound constraint that is no inequality...");
89 removeBounds_(constraint);
94 removeBounds_(constraint);
99 ocra_assert(constraint.isInequality() &&
"How queer! A bound constraint that is no inequality...");
139 std::cout <<
"objective(s):" <<std::endl;
141 std::cout <<
_objectives[i]->getValue() << std::endl;
142 std::cout <<
"equalities:" <<std::endl;
145 std::cout <<
"inequalities:" <<std::endl;
177 std::stringstream ss;
179 ss <<
"P = " << std::endl <<
getP() << std::endl << std::endl;
180 ss <<
"q = " << std::endl <<
getq() << std::endl << std::endl;
181 ss <<
"A = " << std::endl <<
getA() << std::endl << std::endl;
182 ss <<
"b = " << std::endl <<
getb() << std::endl << std::endl;
183 ss <<
"b' = " << std::endl <<
getbp() << std::endl << std::endl;
184 ss <<
"C = " << std::endl <<
getC() << std::endl << std::endl;
185 ss <<
"d = " << std::endl <<
getd() << std::endl << std::endl;
186 ss <<
"l = " << std::endl <<
getl() << std::endl << std::endl;
187 ss <<
"u = " << std::endl <<
getu() << std::endl << std::endl;
188 ss <<
"xl = " << std::endl <<
getxl() << std::endl << std::endl;
189 ss <<
"xu = " << std::endl <<
getxu() << std::endl << std::endl;
void internalAddConstraint(const GenericConstraint &constraint)
virtual VectorXd getxl() const =0
void printValuesAtSolution()
void internalRemoveConstraint(const GenericConstraint &constraint)
Declaration file of the QuadraticSolver class.
virtual MatrixXd getC() const =0
void internalAddObjective(const GenericObjective &objective)
virtual VectorXd getb() const =0
std::vector< LinearConstraint * > _equalityConstraints
void removeConstraint(LinearConstraint &constraint)
virtual VectorXd getu() const =0
void clearEqualityConstraints()
void addBounds(BoundConstraint &constraint)
void internalRemoveObjective(const GenericObjective &objective)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
virtual VectorXd getd() const =0
void removeBounds(BoundConstraint &constraint)
void addConstraint(LinearConstraint &constraint)
void clearInequalityConstraints()
virtual VectorXd getq() const =0
virtual VectorXd getxu() const =0
std::vector< LinearConstraint * > _inequalityConstraints
virtual VectorXd getbp() const =0
void addObjective(QuadraticObjective &obj)
void removeObjective(QuadraticFunction &obj)
virtual MatrixXd getP() const =0
std::vector< DiagonalLinearConstraint * > _bounds
std::vector< QuadraticObjective * > _objectives
virtual MatrixXd getA() const =0
virtual VectorXd getl() const =0
const bool _boundsAsConstraints
void onConstraintResize(int timestamp)
#define ocra_assert(ocra_expression)