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

2D array initialization is incorrect when dimensions have matching subscript names #84

Closed
chrispcampbell opened this issue Jul 13, 2021 · 1 comment · Fixed by #101 or #190
Closed
Assignees
Labels
Milestone

Comments

@chrispcampbell
Copy link
Contributor

The C-ROADS model uses a few 2D arrays (constant lists) where the dimensions have matching subscript names, but SDEverywhere does not initialize the array values correctly. Here is a modification to the existing arrays_cname test that demonstrates the issue and causes a test failure:

DimC: C1, C2, C3 ~~|
DimC': DimC ~~|

sc[DimC,DimC']=
	11,12,13;
	21,22,23;
	31,32,33;
	~
	~	2D constant array where dimensions have matching subscript names
	|

The problem is that in SDE, the code that visits 2D dimensions does lookups based on subscript names, but that breaks down when the "left" and "right" subscripts have the same names.

@chrispcampbell chrispcampbell added this to the 0.6.0 milestone Jul 13, 2021
@chrispcampbell chrispcampbell self-assigned this Jul 13, 2021
@ToddFincannon
Copy link
Collaborator

I tried the subscript alias syntax DimC' <-> DimC (see #78) and it had the same problem.

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