gEconpy
gEconpy copied to clipboard
Add indexing syntax to GCN parser for construction of multiple similar blocks
The gEcon R package allows for (something like) the following:
<i=(1,3)>
block HOUSEHOLD_<i>
{
identities
{
C_<i>[] + I_<i>[] = r[] * K_<i>[-1] + w[] * L_<i>[] + Div_<i>[];
};
};
This will automatically generate 3 household blocks with indices 1,2,3, along with the associated variables. It also allows for automatic summation across indexed variables, like:
Div[] = Sum<i>(Div_<i>[]);
This would be a nice feature when thinking about e.g. multiple sectors.