function [CAin CBin]=scenario(t,par)
%% This function defines the disturbance scenario
CAin = par.CAin; 
CBin = par.CBin; 


if t>500&&t<=1000
	CAin = CAin-0.03*sin((t-500)/30);
elseif t > 1000 && t<=1500
	CAin = 1;
elseif t > 1500 && t<=2000
    CAin = CAin-0.3*((t-1500))/500;
elseif t>2000 && t<= 2500;
    CAin = 0.7;
elseif t>2500 && t<=3000;
	CAin = 0.7+0.3*((t-2500))/500;
elseif t>3000 && t<=3500;
    CAin = 0.7;
elseif t>3500 &&t<=4000;
    CAin=1.3;
elseif t>4000 && t<=4500;
    CBin=0.2;
    CAin=1.3;
elseif t>4500 && t<=5000;
    CBin=0.2;	
    CAin=1.3;
end
