The rank condition isn't verified?

hello everybody, i’m try to run my code but i have some problems; the error message is these:
There are 8 eigenvalue(s) larger than 1 in modulus for 7 forward-looking variable(s). The rank condition ISN’T verified!
The message from model_diagnostics is:

I think that there is a problem whit lag variables, but i don’t know how to fix it.
Can anyone help me? Would any of you be kind enough to take a look at the code?
Thank you so much :slight_smile:

here the code and the paper I am referring to
energycost.mod (4.1 KB)
Ghazouani2020.pdf (503.2 KB)

There is one unique timing. Randomly setting variables predetermined is not a proper solution.

Dear professor, thank you for answering me.
I tried to insert the variables suggested by the resid model_diagnostic command, but it wasn’t enough. Do you have any other advice to give me?
thank you so much

Best regards