%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           Selector                            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Recieves measurement of the current flow
% and decides which loop/valve in the 
% measurement station to be fully open (60%).
% If flow [m3/h]:
%           <400 => loop three is active
%           >400 % <1800 => loop one is active   %
%           >1800 => loops one and two is active %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [signal] = selector(u)
global rho;
flow=u;
    if flow<400 && flow>=0
        signal=[0 0 0.6];
    elseif flow>400 && flow<1800
        signal=[0.6 0 0];
    elseif flow>1800
        signal=[0.6 0.6 0];
    else
        signal =[0 0 0];
    end
end