Interval-consistency

The following propagator, which extends the forward-checking propagator, maintains interval-consistency for the constraint.
    'aX=bY+c'(A,X,B,Y,C) =>
          'aX=bY+c_forward'(A,X,B,Y,C),
          'aX=bY+c_interval'(A,X,B,Y,C).

The call 'aX=bY+c_interval'(A,X,B,Y,C) maintains interval-consistency for the constraint.

    'aX=bY+c_interval'(A,X,B,Y,C) =>
          'aX in bY+c_interval'(A,X,B,Y,C),  % reduce X when Y changes
          MC is -C,
          'aX in bY+c_interval'(B,Y,A,X,MC). % reduce Y when X changes
       
    'aX in bY+c_interval'(A,X,B,Y,C),var(X),var(Y),{generated,bound(Y)} =>
          'aX in bY+c_reduce_domain'(A,X,B,Y,C).
    'aX in bY+c_interval'(A,X,B,Y,C) => true.
Note that the action 'aX in bY+c_reduce_domain'(A,X,B,Y,C) is only executed when both variables are free. If either variable turns out to be instantiated, then the forward-checking rule will take care of that situation.

    'aX in bY+c_reduce_domain'(A,X,B,Y,C) =>
          L is (B*min(Y)+C) /> A, 
          U is (B*max(Y)+C) /< A,
          X in L..U.
The operation op1 /> op2 returns the lowest integer that is greater than or equal to the quotient of op1 / op2, and the operation op1 /< op2 returns the greatest integer that is less than or equal to the quotient. The arithmetic operations must be sound, in order to ensure that no solution is lost. For example, the minimum times any positive integer remains the minimum.



Neng-Fa Zhou 2013-01-25