i_transient+1;
0119 <span class="keyword">while</span> (time_d(end)+ts&lt; time(end))
0120     <span class="comment">% pause;</span>
0121     x0 = x_new;
0122     time_new = time_new+ts;
0123     
0124     <span class="comment">%% updates the model of controller and environment for the next horizon</span>
0125     <a href="#_sub3" class="code" title="subfunction update_controller_data()">update_controller_data</a>();
0126     
0127     <span class="comment">%% compute input for the next horizon</span>
0128 