*/
public static boolean addBoolOrArrayEqVar(BoolVar[] BOOLVARS, BoolVar TARGET) {
Solver solver = TARGET.getSolver();
PropSat sat = solver.getMinisat().getPropSat();
int target_lit = sat.Literal(TARGET);
TIntList lits = new TIntArrayList(BOOLVARS.length + 1);
for (int i = 0; i < BOOLVARS.length; i++) {
lits.add(sat.Literal(BOOLVARS[i]));
}
lits.add(SatSolver.negated(target_lit));
sat.addClause(lits);
for (int i = 0; i < BOOLVARS.length; i++) {
sat.addClause(target_lit, SatSolver.negated(sat.Literal(BOOLVARS[i])));
}
return true;