On the summation of aggregates in the TANK-DSGE modelg

Dear Professor,
I have recently been studying the summation problem for heterogeneous agents in Ricardian and non-Licardian families. The code for the study is here.
TANK2.mod (6.1 KB)

The relationship between aggregate and component of consumption and labor in Ricardian and non-Licardian households is obtained by making css=crss=coss,hss=hrss=hoss, but the relationship between aggregate and component of wages in both households is obtained by making wrss=wss/eta,woss=wss/(1 - eta). I would like to know what is the difference between these two and why there are two summation forms.
And, counting the components through the total amount of wages in this form will make a two-fold relationship when calculating the total amount through the components again. For example: wrss=wss/eta,woss=wss/(1-eta) and wss=eta*wrss+(1-eta)woss.
Then substituting wrss=wss/eta,woss=wss/(1-eta) into wss=eta
wrss+(1-eta)*woss gives wss#=2wss. Doesn’t such an algebraic relationship show that there is an error in calculating the components from the total using the form wrss=wss/eta,woss=wss/(1-eta) Is it?
I’ll summarize my questions again. 1. why there are two kinds of calculating total and component relationships in this code, and whether both of them are universal and can be generalized to other total and component sums; 2. whether the second kind, that is, the way of calculating total and component for wages, is wrong.

Without a reference to a paper or a full description of the setup. it is impossible to tell.

This is the code I found on this page in the forum.

It says here that the code is based on the lecture notes of Valerio Nispi Landi/Gali et al (2007)

That code is neither verified nor documented. I doubt you will get a satisfactory answer.