Error in NKDSGE non-linear and it's linear model

NKDSGE_L.mod (2.3 KB)
NKDSGE_NL.mod (2.5 KB)

I run a NKDSGE model in two different forms, non-linear and linear form.
in non-linear form it seems that there is steady state problem although I think that I calculated the
steady state values correctly.

in a linear form dynare error is that the second derivatives of the some of the equations are not zero, although I think that my log-linearization is correct.

My dynare version is 6.0

The model local variables in properly linearized models must not contain variables:

#Wss= (MC^(1/(1-alphha)))*((1-alphha)^(1/(1-alphha)))*((alphha/ (1-alphha)*RKss   )^(alphha / (1-alphha))) ;

should have MCss not MC. Similarly,

-C=betta*RK*(  RK(+1)-C  )- betta*(1-deltta)*C(+1); 

cannot be linear as you are multiplying RK with itself.