A problem about labor and the initial value order of labor coefficient

A problem about labor and the initial value order of labor coefficient
Hello dear professors!
【Model introduction】
I am working on a DSGE model that includes five departments: households, final product manufacturers, intermediate product manufacturers, commercial banks, and central banks. The intermediate manufacturers face sticky prices. The sticky price is set in the form of Rotemberg (1982), that is, facing price adjustment costs and Capital adjustment costs. The utility maximization problem of the family in the model is as follows:

【Problem Description】
In the initial value stage of the model, I assign the labor n to 1/3 according to the classic assignment method, and the labor coefficient x is expressed by the expression solved by the steady state formula, but an error message indicating that the steady state cannot be found appears; however, I will pass When the x value derived from the formula is assigned to x as the initial value, and then n is expressed as an expression solved by the steady state formula, dynare runs smoothly. CBDC_paper1_1.mod shows the code that runs smoothly, and CBDC_paper1_2.mod shows the code that reports the error; in the two mod files, except when re-assigning the initial value, the variables n, k, I, l, y, c, lambda (The code is written as lamda), zeta, and the assignment order of x is changed, the others are the same.
【Content of help】
In the case of changing the utility function, the first assignment to x is not generally applicable; while the assignment to n is more common, so I hope the professors can help find out the reason for the error of CBDC_paper1_2.mod, thank you very much!
CBDC_paper1_1.mod (4.7 KB)
CBDC_paper1_2.mod (5.5 KB)

If you add


in the initval-block, you will see that there is a residual only in the first equation. You need to find out why that happens.

That’s right, thank you professor, x1 as an endogenous variable should be assigned an initial value in the module, but I don’t know why the residual of formula 1 is not 0, is it because there is an error in the assignment of parameter h? Please advise, thanks

Thank you very much,professor Jpfeifer!
my problem is solved, the residual of formula 1 is not 0 because r_ss should be r_d_ss in the assignment formula of lamda_ss.
Thank you again