Here is precisely my case:
Let's assume a variable x[t] which is a NonNegativeInteger smaller or equal than 3.
So x[t] can be {0,1,2,3}. It's indexed by a time serie.
I would like to prevent x[t] from alternating.
Means I would like to disallow
x[0] = 0
x[1] = 1
x[2] = 0
but also
x[0] = 1
x[1] = 2
x[2] = 1
and
x[0] = 2
x[1] = 3
x[2] = 2
I am looking for a constraint to disallow this. Three time steps must be involved in that constraint.
I've tried a couple of constraints. I am not sure if this is even possible with a simple constraint.
Maybe I have to add a variable to make this work. Do you have any experience with that kind of problem?
Thank you in advance!