Program listing for file control/src/Observer/SlidingReducedOrderObserver.hpp

Program listing for file control/src/Observer/SlidingReducedOrderObserver.hpp#

 1#ifndef SlidingReducedOrderObserver_H
 2#define SlidingReducedOrderObserver_H
 3
 4#include "Observer.hpp"
 5#include "SiconosAlgebraTypeDef.hpp"
 6
 7class SlidingReducedOrderObserver : public Observer
 8{
 9private:
10
11  ACCEPT_SERIALIZATION(SlidingReducedOrderObserver);
12
13
14  SlidingReducedOrderObserver() {};
15
16protected:
17
18
19  SP::SimpleMatrix _C;
20
21
22  SP::SimpleMatrix _L;
23
24  double _theta;
25
26
27  bool _pass;
28
29public:
30
31
32  SlidingReducedOrderObserver(SP::ControlSensor sensor, const SiconosVector& xHat0):
33    Observer(SLIDING_REDUCED_ORDER, sensor, xHat0), _pass(false) {}
34
35
36  SlidingReducedOrderObserver(SP::ControlSensor sensor, const SiconosVector& xHat0, SP::SimpleMatrix C, SP::SimpleMatrix L):
37    Observer(SLIDING_REDUCED_ORDER, sensor, xHat0), _C(C), _L(L), _pass(false) {}
38
39
40  virtual void process();
41
42
43  virtual void initialize(const NonSmoothDynamicalSystem& nsds, const Simulation& s);
44
45
46  inline void setLPtr(SP::SimpleMatrix L)
47  {
48    _L = L;
49  };
50
51
52  inline void setCPtr(SP::SimpleMatrix C)
53  {
54    _C = C;
55  };
56
57};
58#endif