Error encounter with ('#') expression

Dear Professor,

I am new to dynare & attempt to solve and simulate the open economy model for my thesis.

The model did not work out and the following error message came out:

ERROR: Mymodel1.mod: line 64, cols 1-32: rkBar has wrong type or was already used on the right-hand side. You cannot use it on the left-hand side of a pound (’#’) expression

When I deleted line 64, & run again the error keep coming out:

ERROR: Mymodel1.mod: line 65, cols 1-21: rgBar has wrong type or was already used on the right-hand side. You cannot use it on the left-hand side of a pound (’#’) expression

And this error keep on going whenever it encountered (’#’) expression

I believe that I cannot use (’#’) expression in the setup.

I herewith attached the *.mod script for your attention.

Could you please advise?

Thank you very much in advance,

yenyen

Mymodel1.mod (4.5 KB)

If something is defined as a model-local variable with the pound operator (#) you cannot use it as a defined parameter.

Dear Prof,
can you help out how to solve it?
is there any example i can refer for this kind of problem and solution?

thanks very much

by the way also as Prof. mentioned it cannot used it as a defined parameter, can i declared it as endogenous variable?

thanks

If you define it as a model-local variable, there is no reason to also define it as a parameter. And no, you cannot define it as an endogenous variable, because it is not a variable (or a very strange one).