Changeset 565 for library/bdm/design
- Timestamp:
- 08/19/09 16:54:24 (15 years ago)
- Location:
- library/bdm/design
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/design/ctrlbase.cpp
r508 r565 8 8 dimu = B0.cols(); 9 9 10 it_assert_debug ( A0.cols() == dimx, "LQG: A is not square" );11 it_assert_debug ( B0.rows() == dimx, "LQG: B is not compatible" );12 it_assert_debug ( C0.cols() == dimx, "LQG: C is not square" );10 bdm_assert_debug ( A0.cols() == dimx, "LQG: A is not square" ); 11 bdm_assert_debug ( B0.rows() == dimx, "LQG: B is not compatible" ); 12 bdm_assert_debug ( C0.cols() == dimx, "LQG: C is not square" ); 13 13 14 14 A=A0; … … 20 20 21 21 void LQG::set_control_parameters(const mat &Qy0, const mat &Qu0, const vec y_req0, int horizon0){ 22 it_assert_debug ( Qy0.cols() == dimy, "LQG: wrong dimensions of Qy " );23 it_assert_debug ( Qu0.cols() == dimu, "LQG: wrong dimensions of Qu " );24 it_assert_debug ( y_req0.length() == dimy, "LQG: wrong dimensions of y_req " );22 bdm_assert_debug ( Qy0.cols() == dimy, "LQG: wrong dimensions of Qy " ); 23 bdm_assert_debug ( Qu0.cols() == dimu, "LQG: wrong dimensions of Qu " ); 24 bdm_assert_debug ( y_req0.length() == dimy, "LQG: wrong dimensions of y_req " ); 25 25 26 26 Qy=Qy0; -
library/bdm/design/ctrlbase.h
r508 r565 19 19 public: 20 20 //! Redesign control strategy 21 virtual void redesign(){it_error("Not implemented"); }; 21 virtual void redesign() { 22 bdm_error("Not implemented"); 23 } 24 22 25 //! apply control strategy to obtain control input 23 virtual vec apply(const vec &cond){it_error("Not implemented"); return vec(0);} 26 virtual vec apply(const vec &cond) { 27 bdm_error("Not implemented"); 28 return vec(); 29 } 24 30 }; 25 31 … … 89 95 pre_qr.set_submatrix(0,0,s*pr); 90 96 pre_qr.set_submatrix(dimx+dimu+dimy, dimu+dimx, -Qy*y_req); 91 if (!qr(pre_qr,post_qr)) it_warning("QR in LQG unstable");97 if (!qr(pre_qr,post_qr)) bdm_warning("QR in LQG unstable"); 92 98 triu(post_qr); 93 99 // hn(m+1:2*m+n+r,m+1:2*m+n+r);