I am trying to model a SAT formula using Choco 4.0.1. I read the docs , I am trying to understand from the javadoc, but unfortunately I am failing so far. This is my first time working on these type of problems and also choco. So, I may be asking something very obvious.
I need to add a number of constraints to the model like (each var is a BoolVar):
x <-> (a and -b)
I am trying to use ifOnlyIf method in Model, but I don't know how to negate a variable, or use and. Could someone provide me (ideally) some sample code or any ideas on how to model these types of constraints?
According to the
Choco 4.0.1
online manual, it should be something like this:However, the manual seems to be outdated. Like suggested in the comment, I arrived at:
I have used
nor()
with single parameter asnot()
to negate an input.