问题
Writing my first non-trivial MiniZinc app, I keep running into the error "cannot determine bounds". How does one generally resolve this error?
回答1:
In general “cannot determine bounds” means that the solver cannot determine the bounds (the domain) of a decision variable.
Using "var int" as the domain of a decision variable should be avoided if possible, since it will probably slow down the solving process. There are times where the solver can figure out the domain, e.g. in cases likes
% ...
var int: z = sum(x);
when "x" have declared domains. But, as a rule, try to define the domains.
来源:https://stackoverflow.com/questions/28381721/minizinc-cannot-determine-bounds