Closed PerMildner closed 1 year ago
Resolved by b2b528277bb4b14d1c48cd624fa295c805d76d57
Just a note that this problem occurred because x >= 0
is added to CSE and then included in the domain of x
. When the 0..infinity
domain is transformed back to a constraint, the compiler will assume that x >= 0
(created from mzn_internal_set_in
) does not need to be added because it is already in CSE.
A workaround is to just set the domain to be 0..infinity
yourself. Then the constraint should still be posted.
I have a model with many constraints. One of the constraints is:
constraint number_of_kung_fu_lessons >= 0;
Running this in the IDE or from command line outputs intermediate solutions:
That is, MiniZinc IDE 2.7.3 starts at MIN_INT and seems to ignore the constraint. The older versions do the expected thing and try increasing values starting from zero.
The model is an Coursera assignment so I will send the reproducer to @Dekker1 directly.