
    % =======================================================================
    %                          Intilization and Simulation
    % =======================================================================

    clear;
    % Simulation Time steps
        T = 200;
    % Number of Rooms
        h = 5;
    %upper xui and lower xli thershold for Room i
        xl    = [17 20 18 18 21];
        xu    = [22 23 23 22 24];    
        
    %heater suppliyng rate of ith room
     %   ci = [ 0.65 0.6  0.66];
        ci = [ 6 6  4 6 30];
       
    [x_Path, Q_Path, statVec] =  DTSHS(xl, xu , ci);



    % =======================================================================
    %                          SUMMARIES AND PLOTS
    % =======================================================================





    v = linspace(1,T,T+1);
   colores = [ 'b' 'g' 'r' 'k' 'c'];


    for k = 1 : h
        subplot(h,1,k);
        plot( x_Path(:,k), 'Color', colores(k));
        line ( [1 T], [xl(k) xl(k)],'LineWidth', 2, 'Color', colores(k));
        line ( [1 T], [xu(k) xu(k)],'LineWidth', 2, 'Color', colores(k));
        grid on;
        hold on;
        axis([1 T xl(k)-5 xu(k)+2]);
    
    end
    hold off;
    
