Hi,

I have a constraint based problem that implements constraints as explicitly defined threads. An if statement guards whether the constraint is imposed or not. For example one of the constraints could be something like:

thread
   if B==2 then
      <post some constraint>
   end
end

My program isn't as simple as this and there IS a good reason why I'm doing things this way :+), but it demonstrates the basic idea.

My question is this (although I can't think of a simplified example to test it with); would the above code block prove more efficient like this:

thread
   (B==2)=true
   <post some constraint>
end

Here I'm assuming this thread would signal failure whenever B was not 2 and subsequently fail the space it was in. In other words, are there any efficiency gains to be made by using failure as a guard for the constraint rather than a logic conditional statement? (Obviously I'm talking about a very large number of calls to this thread.)

Regards

Mark

--
Mark Richardson
Research Assistant
University of Teesside, UK
[email protected] [email protected]
[email protected]

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to