Steady state for ramsey policy

Hi, Professor Pfeifer

 I build a two-country dsge model. It works well. But when I turn to the ramsey policy, It does not work. The error message is undefined function or variable 'ys', I checked the steady state file automatically generated by dynare and found variable ys(80) and ys(87) are there,undefined.But I only have 59 variables included two instruments in my model. I don't know what variables ys(80) and ys(87) are. Can you have a look for me? This is my mod file.

There is a bug in Dynare 4.4.3 related to instruments. Please try the Dynare unstable from December 17 (or earlier; please do not use the most recent one)

Hi, Professor Pfeifer

 I tried the unstable version of dynare, the previous problem is gone. But new problem appears. Before I comment out the first two equations(e.g. two instruments), it works well. After I comment out these equations, It reports that the steady state contains NaN or Inf. How is that possible ? This is my updated mod file.

paper.mod (9.93 KB)
find_ws.m (15.2 KB)