Solution of Array of var enum is List instead of List[List]
adamgoldfeld opened this issue · 1 comments
adamgoldfeld commented
Simple example:
`
from minizinc import Instance, Model, Solver
gecode = Solver.lookup("gecode")
model = Model()
model.add_string(
"""
enum DAY = {A,B,C,D};
array[1..2,1..2] of var DAY: res;
array[1..2,1..2] of var int: res2;
"""
)
instance = Instance(gecode, model)
result = instance.solve()`
res is a list of size 4
res2 is a list of two lists of size 2 (2x2)
I couldn't find where the conversion to python variables is done.
Dekker1 commented
Hi @adamgoldfeld,
It turns out that the output of MiniZinc itself is wrong in this case. I've delegated the issue to the Compiler repository: MiniZinc/libminizinc#430