Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jessegrabowski opened this issue Feb 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jessegrabowski
Copy link
Owner

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.

@jessegrabowski jessegrabowski added the enhancement New feature or request label Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant