Closed LebedevRI closed 3 months ago
The expectation seems to be the same as in https://github.com/MiniZinc/libminizinc/issues/827. However, when the enumerated type B
is coerced into integers, the first member of B
will take the integer value 1. This is the expected behaviour, even when the enumerated type is an anonymous enumerated type created with a different range.
Generally it is a better approach to avoid the (automatic) coercion from enumerated types to integers in the model. You could change the model to use an enumerated type as the index set of q
.
I must say it feels quite surprising and really unfortunate that such lossy and bugprone coersions are allowed to happen implicitly.
Thanks.