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

GET DIRECT CONSTANTS fails when both LHS subscripts are in the same family #143

Closed
ToddFincannon opened this issue Oct 15, 2021 · 1 comment · Fixed by #144 or #190
Closed

GET DIRECT CONSTANTS fails when both LHS subscripts are in the same family #143

ToddFincannon opened this issue Oct 15, 2021 · 1 comment · Fixed by #144 or #190
Assignees
Labels
Milestone

Comments

@ToddFincannon
Copy link
Collaborator

The GET DIRECT CONSTANTS implementation fails when two LHS subscripts are both in the same family. For instance, an equation that reads a table mapping values in a dimension to the same dimension:

DimC: C1, C2 ~~|
From DimC: DimC ~~|
To DimC: DimC ~~|

g[From DimC, To DimC] = GET DIRECT CONSTANTS 'data/g.csv', ',', 'B2') ~~|

repeats the the first column of values for every column.

@ToddFincannon ToddFincannon added this to the 0.6.0 milestone Oct 15, 2021
@ToddFincannon ToddFincannon self-assigned this Oct 15, 2021
@ToddFincannon
Copy link
Collaborator Author

The algorithm that matches a model-order table subscript with a normal-order LHS subscript matches on the subscript family. This was always matching the first subscript when both of them are in the same family, as in this case. The solution is to move on to the next subscript after the first one in a family is matched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment