Syntax Proposals / Ranges as valid values
Is your feature request related to a problem? Please describe.
for loops currently allow a specific syntax to define ranges [begin:end:step]
or [begin:end]
.
This syntax cannot be used elsewhere, even if its useful.
Describe the solution you'd like Allow ranges to be standard GBOML objects:
#PARAMETERS
a = [0:2];
#CONSTRAINTS
var[i] == 0 for i in a;
This allows to merge the current way of doing for loops with the proposal in #13 (foreach loops), so that there would be only one consistent behavior.
Semantically, a range would be equivalent to its expansion as an array ([a:b:c]
=== {a, a+c, a+2c, ..., b or the nearest a+ic}
)