function F=TS2(x)
 
YgSS=x(1);
YbSS=x(2);
WSS=x(3);
MSS=x(4);
omegab=x(5);

sigma=2; 
phi=1; 
phi1=0.0326;
phi2=2.6;
phiC=0.7;
tauCRSS=0.1044; 
tauCNRSS=0.1044; 
tauCGSS=0.1044;
tauLSS=0.1539;  
tauKSS=0.3;
gamma=15;  
varphi=0.6;
m=200; 
deltaKP=0.025; 
deltaKG=0.0125;   
chi=0.000457;
deltaX=0.0021;
epsilonY=2;
alphab=0.37;
alphag=0.33;
gammag=0.06;
beta=0.9925;
omegaR=0.3;
pZSS=0.03;


PSS=1;
PISS=1;
LRSS=1/3;
LNRSS=1/3;
ASS=1.5;
 
RSS=1/beta;

qSS=PSS*(1+tauCRSS);

RKSS=qSS*(1-beta*(1-deltaKP))/(beta*(1-tauKSS));

UbSS=(varphi*pZSS/(phi1*phi2))^(1/(phi2-1));

ZRSS=(1-UbSS)*varphi*YbSS;

XSS=3.04*ZRSS/deltaX;

FSS=exp(-chi*(XSS-100));

EbSS=(1/(PSS*ASS*FSS))*(WSS/(1-alphab))^(1-alphab)*(RKSS/ alphab)^(alphab);

HSS=1-exp(-m*MSS);

VbSS=pZSS/HSS;

pbSS=EbSS+phi1*(UbSS^phi2)+pZSS*(1-UbSS-VbSS)*varphi+0.5*HSS*varphi*(VbSS^2);

LbSS=(1-alphab)*EbSS*YbSS*PSS/WSS;

LSS=omegaR*LRSS+(1-omegaR)*LNRSS;
 
LgSS=LSS-LbSS;
 
KbPSS=alphab*EbSS*YbSS*PSS/RKSS;
 
YSS=YbSS*(pbSS^epsilonY)/omegab;
 
pgSS=((1-omegab)*YSS/YgSS)^(1/epsilonY);
 
EgSS=pgSS;
 
KgGSS=((1/(PSS*ASS*FSS*EgSS))*(WSS/(1-alphag))^(1-alphag)*(RKSS/alphag)^(alphag))^(1/gammag);
 
KGSS=KgGSS;
 
IGSS=deltaKG*KGSS;
 
KgPSS=alphag*EgSS*YgSS*PSS/RKSS;
 
KPSS=KbPSS+KgPSS;
 
KRSS=KPSS/omegaR;
 
IRSS=KRSS*deltaKP;
 
IPSS=IRSS*omegaR;
 
BSS=0.1702*YSS;
BRSS=BSS/omegaR;
 
CRSS=(WSS*(1-tauLSS)*LRSS+RKSS*(1-tauKSS)*KRSS+(1-beta)*BRSS)/(PSS*(1+tauCRSS))-IRSS;
 
CNRSS=CRSS;
 
CSS=omegaR*CRSS+(1-omegaR)*CNRSS;
 
GSS=YSS-CSS-IGSS-IPSS-MSS-phi1*(UbSS^phi2)*YbSS;
 
TSS=omegaR*tauCRSS*(CRSS+IRSS)+(1-omegaR)*tauCNRSS*CNRSS+tauCGSS*GSS+tauLSS*LSS*WSS/PSS+tauKSS*KPSS*RKSS/PSS;
 
TRSS=(beta-1)*BSS/PSS+TSS-IGSS-GSS*(1+tauCGSS);
 
TRNRSS=TRSS/(1-omegaR);
 
MCbSS=pbSS;
 
TCbSS=MCbSS*YbSS;
 
MCgSS=pgSS;
 
TCgSS=MCgSS*YgSS;
 
ZLSS=(1-UbSS-VbSS)*varphi*YbSS;
 
 
F1=YgSS-FSS*ASS*LgSS^(1-alphag)*KgPSS^alphag*KgGSS^gammag;
 
F2=YbSS-FSS*ASS*LbSS^(1-alphab)*KbPSS^alphab; 
 
F3=MSS-pZSS*(1-UbSS-VbSS)*varphi*YbSS-0.5*HSS*varphi*YbSS*(VbSS^2);
 
F4=LgSS-(1-alphag)*EgSS*YgSS*PSS/WSS;
 
F5=YSS-(omegab^(1/epsilonY)*(YbSS^((epsilonY-1)/epsilonY))+(1-omegab)^(1/epsilonY)*(YgSS^((epsilonY-1)/epsilonY)))^(epsilonY/(epsilonY-1)); 
 
F=[F1;F4;F3;F4;F5]
end
