Skip to content

Add indexing syntax to GCN parser for construction of multiple similar blocks #11

@jessegrabowski

Description

@jessegrabowski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions