(...->...;...) must be true or false at modelling time!
% DO NOT USE THIS IN A MODEL no_overlap(S1,D1,S2,D2) :- S1 #>= S2 + D2. no_overlap(S1,D1,S2,D2) :- S2 #>= S1 + D1. |
B{0,1} which represents
the choice.
The actual choice can be then be taken in search code by choosing a
value for the variable. The model code must then be changed to observe
the decision variable, either using the delay facility of ECLiPSe:
delay no_overlap(S1,D1,S2,D2,B) if var(B). no_overlap(S1,D1,S2,D2,0) :- S1 #>= S2 + D2. no_overlap(S1,D1,S2,D2,1) :- S2 #>= S1 + D1. |
|
|
|
|
|