WSDLSSolver.hpp 888 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * WSDLSSolver.hpp
  3. *
  4. * Created on: Mar 26, 2009
  5. * Author: benoit bolsee
  6. */
  7. #ifndef WSDLSSOLVER_HPP_
  8. #define WSDLSSOLVER_HPP_
  9. #include "Solver.hpp"
  10. namespace iTaSC {
  11. class WSDLSSolver: public iTaSC::Solver {
  12. private:
  13. e_matrix m_AWq,m_WyAWq,m_WyAWqt,m_U,m_V,m_WqV;
  14. e_vector m_S,m_temp,m_Wy_ydot;
  15. std::vector<bool> m_ytask;
  16. e_scalar m_qmax;
  17. unsigned int m_ns, m_nc, m_nq;
  18. bool m_transpose;
  19. public:
  20. WSDLSSolver();
  21. virtual ~WSDLSSolver();
  22. virtual bool init(unsigned int _nq, unsigned int _nc, const std::vector<bool>& gc);
  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);
  24. virtual void setParam(SolverParam param, double value)
  25. {
  26. switch (param) {
  27. case DLS_QMAX:
  28. m_qmax = value;
  29. break;
  30. default:
  31. break;
  32. }
  33. }
  34. };
  35. }
  36. #endif /* WSDLSSOLVER_HPP_ */