Kish, I am not trying to identify 'wrong' constraints but to know at runtime which variable values have narrowed to null and at what point so that users can refine values to get successful solutions. So apart from watching constraints, I am also trying to watch variable domains. I (perhaps mistakenly) tried using the 3 argument domain constraint form $::/3 where I check the third Boolean flag to see when it becomes 0. For example, $::(A,20..30,Bool) but this gives the domain of A not as 20..30 but as -inf..inf and thus labeling tries to find values in this expanded domain leading to an explosion of solutions. Simply put, How can I find out when the variable value becomes empty? I see that suspend provides me with some primitives such as Vars->inst, bound, etc. Is this the way to go? Thanks On 8/31/07, Kish Shen <kisshen_at_cisco.com> wrote: > > Vivek Balaraman wrote: > > I have about 30 constraints in my system and about 40-50 parameters. > > > > I'd like to identify which constraint failed for a certain set of > > parameters both for debugging purposes and to inform the user > > > > What are the better ways of doing this? > > > > Thanks in advance > > > > Vivek > > > > > Since nobody else have replied to you, I will give it a try... > > In most applications, posting the constraints will not normally be > sufficient to cause a failure, or to give you a solution to your > problem. You need to do some search (i.e. labelling the variables) to > get a solution (or failure). In this case, it is very hard to tell which > contraint `failed' if you get a failure, because this will be the result > of propagation, where generally a lot of propagators are woken and do > their propagation until eventually the domain of a variable is reduced > to empty. > > If you are trying to catch only the failures while you are posting the > constraints, then what you do is fine. > However, the failure here simply means that the constraint posted is > inconsistent with the constraints you already have, it does not mean it > is `wrong', even assuming you know that your problem should have a > solution -- it could be some of your already posted constraints that are > `wrong'. > > Cheers, > > Kish > >Received on Fri Aug 31 2007 - 05:03:41 CEST
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET