stages times longer</span>
0051 nb_stages=Sys.nb_stages;
0052 ntime = zeros(1, nb_stages*numel(time));
0053 <span class="keyword">for</span> istage = 0:nb_stages-1
0054     ntime(istage*numel(time)+1:(istage+1)*numel(time))= time+istage*(time(end)+time(2)) ;
0055 <span class="keyword">end</span>
0056 time = ntime;
0057 Wref = repmat(Wref,1,Sys.nb_stages);
0058 
0059 
0060 <span class="comment">%%  Solving for the first horizon L</span>
0061 M = Sys.bigM; <span class="comment">% big M</span>
0062 
0063 <span