Using Reified Constraints

Luis Quesada luque at info.ucl.ac.be
Sun Jan 22 20:37:23 CET 2006


rmk216 wrote:
> Thanks Luis, that worked just fine!
> One thing I am confused about, why does the scope control whether or not
> the search blocks? If I had to guess I'd say it's probably one of those
> well-documented bits of behavior that I kind of just skimmed over. Am I
> right?
> 

If the FD variables are global to the script, the set of solutions 
depends on the values given to these variables in the parent space.

For instance, feed the the following lines:

declare
Y
proc {Script X}
    X::1#5
    Y::1#5
    X<:Y
    {FD.distribute ff [X Y]}
end
{Browse {SearchAll Script}}


The execution will blocks since the set of solutions depends on the 
value given to Y in the parent space. Now feed the line:

Y=3

You will observe that set of solution is browsed considering the fact 
that Y=3. Notice that the set of solution can be only computed when the 
Y is globally determined since the solution will depend on the value 
associated with Y.

Cheers,
Luis






More information about the mozart-users mailing list