Show
Ignore:
Timestamp:
10/15/09 00:10:19 (15 years ago)
Author:
smidl
Message:

doc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/ctrlbase_8h_source.html

    r656 r661  
    114114<a name="l00088"></a>00088 <span class="comment">//              void set_system_parameters(const Kalman &amp;K);</span> 
    115115<a name="l00090"></a>00090 <span class="comment"></span>                <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#aec1a44c57a4569335a943462b35c3156" title="set system parameters from Kalman filter">initialize</a>(); 
    116 <a name="l00091"></a>00091                 <span class="keywordtype">void</span> validate(); 
    117 <a name="l00093"></a><a class="code" href="classbdm_1_1LQG.html#a5016aebbb654a0e3d653b8485e0ea86c">00093</a>                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#a5016aebbb654a0e3d653b8485e0ea86c" title="function for future use which is called at each time td; Should call initialize()!...">update_state</a>(){}; 
    118 <a name="l00095"></a><a class="code" href="classbdm_1_1LQG.html#addc5444b092fdb36239f83ab1ae85805">00095</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#addc5444b092fdb36239f83ab1ae85805" title="redesign one step of the">ricatti_step</a>(){ 
    119 <a name="l00096"></a>00096                         <a class="code" href="classbdm_1_1LQG.html#ae6c9db2abc7a3290f8e2bb851683d7a0" title="pre qr matrix">pre_qr</a>.set_submatrix(0,0,<a class="code" href="classbdm_1_1LQG.html#a5fc6fe8a5205a1698fb319b58315671b" title="internal quadratic form">s</a>*<a class="code" href="classbdm_1_1LQG.html#a3f7d31ad976ed1debeeda12949048909" title="parameters">pr</a>); 
    120 <a name="l00097"></a>00097                         <a class="code" href="classbdm_1_1LQG.html#ae6c9db2abc7a3290f8e2bb851683d7a0" title="pre qr matrix">pre_qr</a>.set_submatrix(dimx+<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>, <a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx, -<a class="code" href="classbdm_1_1LQG.html#a484963959d51059d73d9c6174782cc2f" title="penalization matrix Qy">Qy</a>*<a class="code" href="classbdm_1_1LQG.html#aad002e3dc31c59db7f286b00a8e2fc65" title="required value of the output y at time t (assumed constant)">y_req</a>); 
    121 <a name="l00098"></a>00098                         <span class="keywordflow">if</span> (!qr(<a class="code" href="classbdm_1_1LQG.html#ae6c9db2abc7a3290f8e2bb851683d7a0" title="pre qr matrix">pre_qr</a>,<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>)){ <a class="code" href="bdmerror_8h.html#a59c5a63b3878ebcd6cc952fc2b47191c" title="Display a warning message.">bdm_warning</a>(<span class="stringliteral">&quot;QR in LQG unstable&quot;</span>);} 
    122 <a name="l00099"></a>00099                         triu(<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>); 
    123 <a name="l00100"></a>00100         <span class="comment">// hn(m+1:2*m+n+r,m+1:2*m+n+r);</span> 
    124 <a name="l00101"></a>00101                         <a class="code" href="classbdm_1_1LQG.html#a5fc6fe8a5205a1698fb319b58315671b" title="internal quadratic form">s</a>=<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>.get(<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>, 2*<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>-1, <a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>, 2*<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>-1); 
    125 <a name="l00102"></a>00102                 }; 
    126 <a name="l00103"></a><a class="code" href="classbdm_1_1LQG.html#ae8df589bbdbdd40515f837c9c9560ed8">00103</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#ae8df589bbdbdd40515f837c9c9560ed8" title="Redesign control strategy.">redesign</a>(){ 
    127 <a name="l00104"></a>00104                         <span class="keywordflow">for</span>(<a class="code" href="classbdm_1_1LQG.html#a6c9fa6d9bb0be47ac5ed9183eb38562e" title="time of the design step - from horizon-&amp;gt;0">td</a>=<a class="code" href="classbdm_1_1LQG.html#ae770d283502cf4da978d1d8523309869" title="Control horizon, set to maxint for infinite horizons.">horizon</a>; <a class="code" href="classbdm_1_1LQG.html#a6c9fa6d9bb0be47ac5ed9183eb38562e" title="time of the design step - from horizon-&amp;gt;0">td</a>&gt;0; <a class="code" href="classbdm_1_1LQG.html#a6c9fa6d9bb0be47ac5ed9183eb38562e" title="time of the design step - from horizon-&amp;gt;0">td</a>--){ 
    128 <a name="l00105"></a>00105                                 <a class="code" href="classbdm_1_1LQG.html#a5016aebbb654a0e3d653b8485e0ea86c" title="function for future use which is called at each time td; Should call initialize()!...">update_state</a>(); 
    129 <a name="l00106"></a>00106                                 <a class="code" href="classbdm_1_1LQG.html#addc5444b092fdb36239f83ab1ae85805" title="redesign one step of the">ricatti_step</a>(); 
    130 <a name="l00107"></a>00107                         } 
    131 <a name="l00108"></a>00108 <span class="comment">/*                      ws=hn(1:m,m+1:2*m+n+r);</span> 
    132 <a name="l00109"></a>00109 <span class="comment">                        wsd=hn(1:m,1:m);</span> 
    133 <a name="l00110"></a>00110 <span class="comment">                        Lklq=-inv(wsd)*ws;*/</span> 
    134 <a name="l00111"></a>00111                         <a class="code" href="classbdm_1_1LQG.html#ad78bb29a213eef033a9657ec2f592e80" title="controller parameters">L</a> = -inv(<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>.get(0,<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>-1, 0,<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>-1)) * <a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>.get(0,<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>-1, <a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>, 2*<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>-1); 
    135 <a name="l00112"></a>00112                 } 
    136 <a name="l00113"></a>00113                 vec apply(<span class="keyword">const</span> vec &amp;state, <span class="keyword">const</span> vec &amp;ukm){vec pom=concat(state, ones(<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>), ukm); <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1LQG.html#ad78bb29a213eef033a9657ec2f592e80" title="controller parameters">L</a>*pom;} 
    137 <a name="l00114"></a>00114         } ; 
    138 <a name="l00115"></a>00115  
    139 <a name="l00119"></a><a class="code" href="classbdm_1_1Controller.html">00119</a>         <span class="keyword">class </span><a class="code" href="classbdm_1_1Controller.html">Controller</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1root.html" title="Root class of BDM objects.">root</a> { 
    140 <a name="l00120"></a>00120                 <span class="keyword">protected</span>: 
    141 <a name="l00122"></a><a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18">00122</a>                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>; 
    142 <a name="l00124"></a><a class="code" href="classbdm_1_1Controller.html#a357598cc95da1eed3d50751847e71f37">00124</a>                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1Controller.html#a357598cc95da1eed3d50751847e71f37" title="identifier of the system input;">urv</a>; 
    143 <a name="l00126"></a><a class="code" href="classbdm_1_1Controller.html#a10a2a88a4c275ead6aa2887a3b826b19">00126</a>                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1Controller.html#a10a2a88a4c275ead6aa2887a3b826b19" title="description of data needed for ctrlaction , required for automatic connection to...">drv</a>; 
    144 <a name="l00128"></a><a class="code" href="classbdm_1_1Controller.html#a8574445175a07f536fd3db007e1eac41">00128</a>                 ivec <a class="code" href="classbdm_1_1Controller.html#a8574445175a07f536fd3db007e1eac41" title="vector of logger IDs">LIDs</a>; 
    145 <a name="l00129"></a>00129                 <span class="keyword">public</span>: 
    146 <a name="l00131"></a><a class="code" href="classbdm_1_1Controller.html#ad8bf38082502020d56dbd48806018774">00131</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#ad8bf38082502020d56dbd48806018774" title="function processing new observations and adapting control strategy accordingly">adapt</a>(<span class="keyword">const</span> vec &amp;data){}; 
    147 <a name="l00133"></a><a class="code" href="classbdm_1_1Controller.html#a7103224088fcd72bc44eeb08ad5ce180">00133</a>                         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1Controller.html#a7103224088fcd72bc44eeb08ad5ce180" title="returns designed control action">ctrlaction</a>(<span class="keyword">const</span> vec &amp;data){<span class="keywordflow">return</span> vec(0);} 
    148 <a name="l00134"></a>00134                          
    149 <a name="l00135"></a><a class="code" href="classbdm_1_1Controller.html#aa8dfccd2b84552efcdc7f595c021ff77">00135</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#aa8dfccd2b84552efcdc7f595c021ff77" title="This method arrange instance properties according the data stored in the Setting...">from_setting</a>(<span class="keyword">const</span> Setting &amp;<span class="keyword">set</span>){ 
    150 <a name="l00136"></a>00136                                 <a class="code" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">UI::get</a>(<a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>,<span class="keyword">set</span>,<span class="stringliteral">&quot;yrv&quot;</span>,UI::optional); 
    151 <a name="l00137"></a>00137                                 <a class="code" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">UI::get</a>(<a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>,<span class="keyword">set</span>,<span class="stringliteral">&quot;urv&quot;</span>,UI::optional); 
    152 <a name="l00138"></a>00138                         } 
    153 <a name="l00140"></a><a class="code" href="classbdm_1_1Controller.html#a5c5b40a9e65abc1434c8a34c9752e25d">00140</a>                         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1Controller.html#a5c5b40a9e65abc1434c8a34c9752e25d" title="access function">_urv</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1Controller.html#a357598cc95da1eed3d50751847e71f37" title="identifier of the system input;">urv</a>;} 
    154 <a name="l00142"></a><a class="code" href="classbdm_1_1Controller.html#a258f7c6435343b088ed02a304cab99b0">00142</a>                         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1Controller.html#a258f7c6435343b088ed02a304cab99b0" title="access function">_yrv</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>;} 
    155 <a name="l00144"></a><a class="code" href="classbdm_1_1Controller.html#a51e1fbd42ba80789f31b5bc14068f498">00144</a>                         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1Controller.html#a51e1fbd42ba80789f31b5bc14068f498" title="access function">_drv</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1Controller.html#a10a2a88a4c275ead6aa2887a3b826b19" title="description of data needed for ctrlaction , required for automatic connection to...">drv</a>;} 
    156 <a name="l00146"></a><a class="code" href="classbdm_1_1Controller.html#a2a9541449b90cb80203a17af66cf64b7">00146</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#a2a9541449b90cb80203a17af66cf64b7" title="register this controller with given datasource under name &amp;quot;name&amp;quot;">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;name = <span class="stringliteral">&quot;&quot;</span> ) { } 
    157 <a name="l00148"></a><a class="code" href="classbdm_1_1Controller.html#a2b05de6453a4ca665c662e998c53f31c">00148</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#a2b05de6453a4ca665c662e998c53f31c" title="write requested values into the logger">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L ) { } 
    158 <a name="l00149"></a>00149                          
    159 <a name="l00150"></a>00150         }; 
     116<a name="l00092"></a>00092                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#a96c8fb67798ccd783467fcb607296954" title="validation procedure">validate</a>(); 
     117<a name="l00094"></a><a class="code" href="classbdm_1_1LQG.html#a5016aebbb654a0e3d653b8485e0ea86c">00094</a>                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#a5016aebbb654a0e3d653b8485e0ea86c" title="function for future use which is called at each time td; Should call initialize()!...">update_state</a>(){}; 
     118<a name="l00096"></a><a class="code" href="classbdm_1_1LQG.html#addc5444b092fdb36239f83ab1ae85805">00096</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#addc5444b092fdb36239f83ab1ae85805" title="redesign one step of the">ricatti_step</a>(){ 
     119<a name="l00097"></a>00097                         <a class="code" href="classbdm_1_1LQG.html#ae6c9db2abc7a3290f8e2bb851683d7a0" title="pre qr matrix">pre_qr</a>.set_submatrix(0,0,<a class="code" href="classbdm_1_1LQG.html#a5fc6fe8a5205a1698fb319b58315671b" title="internal quadratic form">s</a>*<a class="code" href="classbdm_1_1LQG.html#a3f7d31ad976ed1debeeda12949048909" title="parameters">pr</a>); 
     120<a name="l00098"></a>00098                         <a class="code" href="classbdm_1_1LQG.html#ae6c9db2abc7a3290f8e2bb851683d7a0" title="pre qr matrix">pre_qr</a>.set_submatrix(dimx+<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>, <a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx, -<a class="code" href="classbdm_1_1LQG.html#a484963959d51059d73d9c6174782cc2f" title="penalization matrix Qy">Qy</a>*<a class="code" href="classbdm_1_1LQG.html#aad002e3dc31c59db7f286b00a8e2fc65" title="required value of the output y at time t (assumed constant)">y_req</a>); 
     121<a name="l00099"></a>00099                         <span class="keywordflow">if</span> (!qr(<a class="code" href="classbdm_1_1LQG.html#ae6c9db2abc7a3290f8e2bb851683d7a0" title="pre qr matrix">pre_qr</a>,<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>)){ <a class="code" href="bdmerror_8h.html#a59c5a63b3878ebcd6cc952fc2b47191c" title="Display a warning message.">bdm_warning</a>(<span class="stringliteral">&quot;QR in LQG unstable&quot;</span>);} 
     122<a name="l00100"></a>00100                         triu(<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>); 
     123<a name="l00101"></a>00101         <span class="comment">// hn(m+1:2*m+n+r,m+1:2*m+n+r);</span> 
     124<a name="l00102"></a>00102                         <a class="code" href="classbdm_1_1LQG.html#a5fc6fe8a5205a1698fb319b58315671b" title="internal quadratic form">s</a>=<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>.get(<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>, 2*<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>-1, <a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>, 2*<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>-1); 
     125<a name="l00103"></a>00103                 }; 
     126<a name="l00104"></a><a class="code" href="classbdm_1_1LQG.html#ae8df589bbdbdd40515f837c9c9560ed8">00104</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1LQG.html#ae8df589bbdbdd40515f837c9c9560ed8" title="Redesign control strategy.">redesign</a>(){ 
     127<a name="l00105"></a>00105                         <span class="keywordflow">for</span>(<a class="code" href="classbdm_1_1LQG.html#a6c9fa6d9bb0be47ac5ed9183eb38562e" title="time of the design step - from horizon-&amp;gt;0">td</a>=<a class="code" href="classbdm_1_1LQG.html#ae770d283502cf4da978d1d8523309869" title="Control horizon, set to maxint for infinite horizons.">horizon</a>; <a class="code" href="classbdm_1_1LQG.html#a6c9fa6d9bb0be47ac5ed9183eb38562e" title="time of the design step - from horizon-&amp;gt;0">td</a>&gt;0; <a class="code" href="classbdm_1_1LQG.html#a6c9fa6d9bb0be47ac5ed9183eb38562e" title="time of the design step - from horizon-&amp;gt;0">td</a>--){ 
     128<a name="l00106"></a>00106                                 <a class="code" href="classbdm_1_1LQG.html#a5016aebbb654a0e3d653b8485e0ea86c" title="function for future use which is called at each time td; Should call initialize()!...">update_state</a>(); 
     129<a name="l00107"></a>00107                                 <a class="code" href="classbdm_1_1LQG.html#addc5444b092fdb36239f83ab1ae85805" title="redesign one step of the">ricatti_step</a>(); 
     130<a name="l00108"></a>00108                         } 
     131<a name="l00109"></a>00109 <span class="comment">/*                      ws=hn(1:m,m+1:2*m+n+r);</span> 
     132<a name="l00110"></a>00110 <span class="comment">                        wsd=hn(1:m,1:m);</span> 
     133<a name="l00111"></a>00111 <span class="comment">                        Lklq=-inv(wsd)*ws;*/</span> 
     134<a name="l00112"></a>00112                         <a class="code" href="classbdm_1_1LQG.html#ad78bb29a213eef033a9657ec2f592e80" title="controller parameters">L</a> = -inv(<a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>.get(0,<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>-1, 0,<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>-1)) * <a class="code" href="classbdm_1_1LQG.html#a13eb495eb5e3c3477e2ebaa4640a642e" title="post qr matrix">post_qr</a>.get(0,<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>-1, <a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>, 2*<a class="code" href="classbdm_1_1LQG.html#aff701d81aa4f32e0a07a5910f06c8969" title="convenience parameters">dimu</a>+dimx+<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>-1); 
     135<a name="l00113"></a>00113                 } 
     136<a name="l00115"></a><a class="code" href="classbdm_1_1LQG.html#abd673ed2fee4289c212e03df084e8af5">00115</a>                 vec <a class="code" href="classbdm_1_1LQG.html#abd673ed2fee4289c212e03df084e8af5" title="compute control action">apply</a>(<span class="keyword">const</span> vec &amp;state, <span class="keyword">const</span> vec &amp;ukm){vec pom=concat(state, ones(<a class="code" href="classbdm_1_1LQG.html#a753e909ac3694cde54b4fc718e24fa09" title="convenience parameters">dimy</a>), ukm); <span class="keywordflow">return</span> <a class="code" href="classbdm_1_1LQG.html#ad78bb29a213eef033a9657ec2f592e80" title="controller parameters">L</a>*pom;} 
     137<a name="l00116"></a>00116         } ; 
     138<a name="l00117"></a>00117  
     139<a name="l00121"></a><a class="code" href="classbdm_1_1Controller.html">00121</a>         <span class="keyword">class </span><a class="code" href="classbdm_1_1Controller.html">Controller</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1root.html" title="Root class of BDM objects.">root</a> { 
     140<a name="l00122"></a>00122                 <span class="keyword">protected</span>: 
     141<a name="l00124"></a><a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18">00124</a>                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>; 
     142<a name="l00126"></a><a class="code" href="classbdm_1_1Controller.html#a357598cc95da1eed3d50751847e71f37">00126</a>                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1Controller.html#a357598cc95da1eed3d50751847e71f37" title="identifier of the system input;">urv</a>; 
     143<a name="l00128"></a><a class="code" href="classbdm_1_1Controller.html#a10a2a88a4c275ead6aa2887a3b826b19">00128</a>                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classbdm_1_1Controller.html#a10a2a88a4c275ead6aa2887a3b826b19" title="description of data needed for ctrlaction , required for automatic connection to...">drv</a>; 
     144<a name="l00130"></a><a class="code" href="classbdm_1_1Controller.html#a8574445175a07f536fd3db007e1eac41">00130</a>                 ivec <a class="code" href="classbdm_1_1Controller.html#a8574445175a07f536fd3db007e1eac41" title="vector of logger IDs">LIDs</a>; 
     145<a name="l00131"></a>00131                 <span class="keyword">public</span>: 
     146<a name="l00133"></a><a class="code" href="classbdm_1_1Controller.html#ad8bf38082502020d56dbd48806018774">00133</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#ad8bf38082502020d56dbd48806018774" title="function processing new observations and adapting control strategy accordingly">adapt</a>(<span class="keyword">const</span> vec &amp;data){}; 
     147<a name="l00135"></a><a class="code" href="classbdm_1_1Controller.html#a7103224088fcd72bc44eeb08ad5ce180">00135</a>                         <span class="keyword">virtual</span> vec <a class="code" href="classbdm_1_1Controller.html#a7103224088fcd72bc44eeb08ad5ce180" title="returns designed control action">ctrlaction</a>(<span class="keyword">const</span> vec &amp;data){<span class="keywordflow">return</span> vec(0);} 
     148<a name="l00136"></a>00136                          
     149<a name="l00137"></a><a class="code" href="classbdm_1_1Controller.html#aa8dfccd2b84552efcdc7f595c021ff77">00137</a>                         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#aa8dfccd2b84552efcdc7f595c021ff77" title="This method arrange instance properties according the data stored in the Setting...">from_setting</a>(<span class="keyword">const</span> Setting &amp;<span class="keyword">set</span>){ 
     150<a name="l00138"></a>00138                                 <a class="code" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">UI::get</a>(<a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>,<span class="keyword">set</span>,<span class="stringliteral">&quot;yrv&quot;</span>,UI::optional); 
     151<a name="l00139"></a>00139                                 <a class="code" href="classbdm_1_1UI.html#acd1667e6fec99ec64dabcb3ca2ff922d">UI::get</a>(<a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>,<span class="keyword">set</span>,<span class="stringliteral">&quot;urv&quot;</span>,UI::optional); 
     152<a name="l00140"></a>00140                         } 
     153<a name="l00142"></a><a class="code" href="classbdm_1_1Controller.html#a5c5b40a9e65abc1434c8a34c9752e25d">00142</a>                         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1Controller.html#a5c5b40a9e65abc1434c8a34c9752e25d" title="access function">_urv</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1Controller.html#a357598cc95da1eed3d50751847e71f37" title="identifier of the system input;">urv</a>;} 
     154<a name="l00144"></a><a class="code" href="classbdm_1_1Controller.html#a258f7c6435343b088ed02a304cab99b0">00144</a>                         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1Controller.html#a258f7c6435343b088ed02a304cab99b0" title="access function">_yrv</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1Controller.html#a2ae938d29716585c5385df37ae861e18" title="identifier of the system output;">yrv</a>;} 
     155<a name="l00146"></a><a class="code" href="classbdm_1_1Controller.html#a51e1fbd42ba80789f31b5bc14068f498">00146</a>                         <span class="keyword">const</span> <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>&amp; <a class="code" href="classbdm_1_1Controller.html#a51e1fbd42ba80789f31b5bc14068f498" title="access function">_drv</a>() {<span class="keywordflow">return</span> <a class="code" href="classbdm_1_1Controller.html#a10a2a88a4c275ead6aa2887a3b826b19" title="description of data needed for ctrlaction , required for automatic connection to...">drv</a>;} 
     156<a name="l00148"></a><a class="code" href="classbdm_1_1Controller.html#a2a9541449b90cb80203a17af66cf64b7">00148</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#a2a9541449b90cb80203a17af66cf64b7" title="register this controller with given datasource under name &amp;quot;name&amp;quot;">log_add</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;name = <span class="stringliteral">&quot;&quot;</span> ) { } 
     157<a name="l00150"></a><a class="code" href="classbdm_1_1Controller.html#a2b05de6453a4ca665c662e998c53f31c">00150</a>                         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1Controller.html#a2b05de6453a4ca665c662e998c53f31c" title="write requested values into the logger">logit</a> ( <a class="code" href="classbdm_1_1logger.html" title="Class for storing results (and semi-results) of an experiment.">logger</a> &amp;L ) { } 
    160158<a name="l00151"></a>00151                          
    161 <a name="l00152"></a>00152 } <span class="comment">// namespace</span> 
     159<a name="l00152"></a>00152         }; 
     160<a name="l00153"></a>00153                          
     161<a name="l00154"></a>00154 } <span class="comment">// namespace</span> 
    162162</pre></div></div> 
    163 <hr size="1"/><address style="text-align: right;"><small>Generated on Mon Oct 12 19:37:19 2009 for mixpp by&nbsp; 
     163<hr size="1"/><address style="text-align: right;"><small>Generated on Thu Oct 15 00:07:48 2009 for mixpp by&nbsp; 
    164164<a href="http://www.doxygen.org/index.html"> 
    165165<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>