When posting a ifThen constraint via Model.ifThen with a boolean variable (first argument) instantiated to 0, a warning is emitted saying the then constraint is free.
To Reproduce
final Model model = new Model();
final IntVar intVar = model.intVar(1, 10);
final BoolVar boolVar = model.boolVar();
boolVar.instantiateTo(0, Cause.Null);
model.ifThen(boolVar, model.arithm(intVar, "=", 5));
model.getSolver().findAllSolutions();
This will output something like
At least one constraint is free, i.e., neither posted or reified. ).
ARITHM ([IV_1 = 5]) is free
Expected behavior
I do not expect such warning since, yes, the constraint was not posted nor reified but it was done due to how Choco work, not because I forgot to post it or reify it.
Environment (please complete the following information):
Describe the bug
When posting a
ifThen
constraint viaModel.ifThen
with a boolean variable (first argument) instantiated to 0, a warning is emitted saying the then constraint is free.To Reproduce
This will output something like
Expected behavior
I do not expect such warning since, yes, the constraint was not posted nor reified but it was done due to how Choco work, not because I forgot to post it or reify it.
Environment (please complete the following information):