Closed LebedevRI closed 1 month ago
This is a separate bug, but will be fixed by 854d2e2e598d6a71eb46a25afadb988eb8800f93 in the next release (which will give a type error instead of crashing/giving a confusing error message).
Currently using an optional index to access an array of tuples/records is not supported (but hopefully we will be able to support this in a future version).
For now, a workaround would be to do this:
constraint assert(forall (j,i in CONTACTS where i > j)(
GRAPH_EDGE_INDEX[j,i] == GRAPH_EDGE_INDEX[i,j]
/\ GRAPH_LEAVING_NODE[GRAPH_EDGE_INDEX[j,i]] == GN(j)
/\ GRAPH_ENTERING_NODE[GRAPH_EDGE_INDEX[j,i]] == GN(i)
), "");
@cyderize thank you for taking a look!
I believe this should now be fixed in 2.8.6
This might be a duplicate of https://github.com/MiniZinc/libminizinc/issues/826, i'm not sure.