"Impossible to find the steady state", Heterogeneous agents in one period economy

Hi! I am a beginner of Dynare. I would like to solve the following problem: I have an economy with N heterogeneous agents that lasts one period. I would like to find the level of aggregate capital, public expenditure and, for each agent, the level of leisure and consumption that maximize the sum of all agents utilities. Basically, I proceeded trying to make dynare finding the level of capital, public expenditure etc that solve the FOCs of the problem. The model seems to me reasonably specified, but I get “Impossible to find the steady state. Either the model doesn’t have a steady state…”. Does someone have any suggestion? Thanks in advance,
Tiziano Code.mod (2.0 KB)

You did not post the mod-file, but the m-file generated by Dynare.

I am really sorry. I have just put the .mod file.
Thanks

Before going to multiple agents, make sure the model works with
@#define agents = [1]

Thanks Dr. Pfeifer,
reasoning only with one agent and equation by equation made me think better about what “initval” to use and now the model works. therefore, It seems the error was due to my wrong guess about the initval of some variables.