2011-10-23 17:52:20 +00:00
|
|
|
/*
|
2009-09-24 21:22:24 +00:00
|
|
|
* WSDLSSolver.hpp
|
|
|
|
*
|
|
|
|
* Created on: Mar 26, 2009
|
|
|
|
* Author: benoit bolsee
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WSDLSSOLVER_HPP_
|
|
|
|
#define WSDLSSOLVER_HPP_
|
|
|
|
|
|
|
|
#include "Solver.hpp"
|
|
|
|
|
|
|
|
namespace iTaSC {
|
|
|
|
|
|
|
|
class WSDLSSolver: public iTaSC::Solver {
|
|
|
|
private:
|
2009-09-27 16:20:42 +00:00
|
|
|
e_matrix m_AWq,m_WyAWq,m_WyAWqt,m_U,m_V,m_WqV;
|
2009-09-24 21:22:24 +00:00
|
|
|
e_vector m_S,m_temp,m_Wy_ydot;
|
|
|
|
std::vector<bool> m_ytask;
|
|
|
|
e_scalar m_qmax;
|
|
|
|
unsigned int m_ns, m_nc, m_nq;
|
2009-09-27 16:20:42 +00:00
|
|
|
bool m_transpose;
|
2009-09-24 21:22:24 +00:00
|
|
|
public:
|
|
|
|
WSDLSSolver();
|
|
|
|
virtual ~WSDLSSolver();
|
|
|
|
|
|
|
|
virtual bool init(unsigned int _nq, unsigned int _nc, const std::vector<bool>& gc);
|
|
|
|
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);
|
|
|
|
virtual void setParam(SolverParam param, double value)
|
|
|
|
{
|
|
|
|
switch (param) {
|
|
|
|
case DLS_QMAX:
|
|
|
|
m_qmax = value;
|
|
|
|
break;
|
2009-09-25 09:33:46 +00:00
|
|
|
default:
|
|
|
|
break;
|
2009-09-24 21:22:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* WSDLSSOLVER_HPP_ */
|