# Intertemporal consumption with heterogeneous/multiple goods

I'm currently trying to build a CGE, and I'm stuck at the household's problem which is about intertemporal utility maximisation. The household consumes multiple heterogeneous goods $$C_i$$ (I'm limiting the case to 3 goods for simplicity). I choose an intertemporal utility of substitution equal to 1, which means:

$$U(C(t))= ln (C_{1,t}^a * C_{2,t}^b * C_{3,t}^c)$$ Here $$a$$,$$b$$,$$c$$ are cobb-douglas coefficients, the shares of goods in the utility function. The budget constraint is straightforward. I assume the consumer is not borrowing, he spends part of his budget on consumption $$\sum (p_{i} * C_{i})$$ and saves what remains $$S$$. His income consists of wage $$w$$ earned from many types of labour $$L$$ and exogenous government transfers $$TR$$ (redistribution of income to lower inequality), i.e $$\sum (w_{j} * L_{j}) + TR$$ (The index j indicates the many activities where the household works.

The household is supposed to optimise his consumption over time, say from an initial date $$t_0$$ to the final date $$T$$. He has to pick the optimal bundle of goods that maximises his inter-temporal utility.

Now, here comes part I don't understand:

1 - In order to select the optimal bundle of goods that will maximise the intertemporal utility, is the consumer supposed to optimise/derive with respect to C1, C2 and C3?

2 - What about the intertemporal budget constraint? I understand for the case of two periods it should be: $$\sum (p_{i,t1} * C_{i,t1}) + \frac {\sum (p_{i,t2} * C_{i,t2}) } {(1+r)} = (\sum (w_{j,t1} * L_{j,t1}) + TR) + \frac {\sum (w_{j,t2} * L_{j,t2}) + TR } {(1+r)}$$

, but what if this problems goes on from t0 to T periods? What should the budget constraint look like? (t1,t2 means period 1 and period 2)

Assuming a continuous time, I know that the objective function should be written like this ($$\rho$$ being the rate of time preference): $$\max_{C_{i,t}} U(C,t) = \int ln (C_{1,t}^a * C_{2,t}^b * C_{3,t}^c) * e^{-\rho*t}$$ (the integral ranges from t0 to T, the final date) Sorry for the long text, hopefully you can at least help me find a form to the intertemporal budget constraint.