Perhaps you something like:
declare
fun {MakeScript N1 N10 M1 M10 L1 L10}
proc {Script Root}
X Y Z
in
Root = sol(x:X y:Y z:Z)
X :: N1#N10
Y :: M1#M10
Z :: L1#L10
Z =: X - Y
{FD.distribute generic(order:min) Root}
end
in
Script
end
in
{ExploreAll {MakeScript 20 30 10 20 10 20}}
On 24 mei 2011, at 00:51, Ali Matarawy wrote:
> Dear All,
>
> suppose that the following constraint
>
> Z1 =: X1 - y1
>
> the range of X1 is 20#30 , Y1 is 10#20 and Z1 from 10#20
>
> when distributing X1, Y1I want to take the corresponding values in their
> ranges i.e when X1 takes the value of 20 Y1 should take the value of 10 and
> when X1 takes the value of 21 Y1 should take the value of 11,....etc.
>
> I don't know how to do that so I hope that someone will help
>
> Ali El-Matarawy
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users