In MiniZinc, I need to extract a column from a matrix, in order to have a set composed by the values of the column. For example if I have a table like that:
1 0 0
6 4 6
3 5 8
I would like to extract the set of int 1 6 3
, in order to have an index that can flow in this set. Is there a command to do this?
You can use the col() function in combination with array2set(). Here's a simple model using a fixed matrix "a":
The output is then the set "{1,3,6}".