Can we check an equality between 2 partial number with choco solver ?
I have a 2 dimensional array, and for each element of it, their domain are different number who have the same form : a number composed by 6 digits (some example of values a element can have : 781010, 680101, 391111). My problem is, how to compare only a digit and not the whole number ?
I have to do something who look-like that :
Model model = new Model();
IntVar[][] array = new IntVar[height][width];
....
// getting the domains for each element of array
....
for(int i = 0; i < height; i++) {
for(int j = 0; j < width; j++) {
model.arithm(array[i][j]3rdDigit, "=", array[i+1][j]4thDigit);
}
}
can you help me please ?