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

Using array slice in tuple causes evaluation error #859

Open
CervEdin opened this issue Oct 31, 2024 · 1 comment
Open

Using array slice in tuple causes evaluation error #859

CervEdin opened this issue Oct 31, 2024 · 1 comment
Labels
bug resolved Issue is resolved and the feature or fix will be part of next release

Comments

@CervEdin
Copy link

Using array slice in tuple seems problematic

tuple( array[int] of int ): works = ( [ [1, 2, 3][i] | i in 2..3 ], );
tuple( array[int] of int ): fails = ( [1, 2, 3][2..], );

output outputJSONParameters(); % empty?
Error: evaluation error: arrays of arrays not supported

seen in 2.8.7 and 2.8.8, build 1519497721

unrelated but also the outputJSONParameters seems empty when I print it 🤔

@cyderize cyderize added the bug label Nov 3, 2024
@cyderize
Copy link
Member

cyderize commented Nov 3, 2024

Yes, that seems like a bug.

outputJSONParameters only outputs parameters without right-hand sides in the model, so you'd have to do something like

tuple( array[int] of int ): works; % No RHS
works = ( [ [1, 2, 3][i] | i in 2..3 ], ); % Separate assignment (or from dzn)
output outputJSONParameters();

@cyderize cyderize added the resolved Issue is resolved and the feature or fix will be part of next release label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug resolved Issue is resolved and the feature or fix will be part of next release
Projects
None yet
Development

No branches or pull requests

2 participants