for (int i = 0; i < data.prefPerPeople(); i++) {
int pa = data.preferences()[(2 * i)];
int pb = data.preferences()[2 * i + 1];
IntVar k = VariableFactory.bounded(StringUtils.randomName(),-20000,20000,solver);
solver.post(IntConstraintFactory.sum(new IntVar[]{positions[pb], k}, positions[pa]));
dist[i] = VariableFactory.abs(k);
solver.post(
ifThenElse(viols[i],