Solver.hpp 755 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Solver.hpp
  3. *
  4. * Created on: Jan 8, 2009
  5. * Author: rubensmits
  6. */
  7. #ifndef SOLVER_HPP_
  8. #define SOLVER_HPP_
  9. #include <vector>
  10. #include "eigen_types.hpp"
  11. namespace iTaSC{
  12. class Solver{
  13. public:
  14. enum SolverParam {
  15. DLS_QMAX = 0,
  16. DLS_LAMBDA_MAX,
  17. DLS_EPSILON
  18. };
  19. virtual ~Solver(){};
  20. // gc = grouping of constraint output ,
  21. // size of vector = nc, alternance of true / false to indicate the grouping of output
  22. virtual bool init(unsigned int nq, unsigned int nc, const std::vector<bool>& gc)=0;
  23. virtual bool solve(const e_matrix& A, const e_vector& Wy, const e_vector& ydot, const e_matrix& Wq, e_vector& qdot, e_scalar& nlcoef)=0;
  24. virtual void setParam(SolverParam param, double value)=0;
  25. };
  26. }
  27. #endif /* SOLVER_HPP_ */