solver.post(IntConstraintFactory.global_cardinality(carSequence, options[optNum], atMost, false));
IntVar[] atLeast = VariableFactory.boundedArray("atleast_" + optNum + "_" + seqStart, idleConfs[optNum].length, 0, max, solver);
solver.post(IntConstraintFactory.global_cardinality(carSequence, idleConfs[optNum], atLeast, false));
// all others configurations may be chosen
IntVar sum = VariableFactory.bounded("sum", optfreq[optNum][1] - optfreq[optNum][0], 99999999, solver);
solver.post(IntConstraintFactory.sum(atLeast, sum));
}
}
int[] values = new int[expArray.length];