From: Malcolm R. <mal...@cs...> - 2007-10-08 06:43:20
|
Poking around in the source, it looks like this might be possible. The documentation for Problem.post() seems to indicate that it is possible to post a new constraint which will be retracted on backtracking. Is that correct? A lot of the internals of Choco are very sparsely documented. Do you plan on fixing that soon? Malcolm On 08/10/2007, at 1:07 PM, Malcolm Ryan wrote: > I then have a bunch of different constraints which apply to all > elements in the list (and only those). So essentially, for each such > constraint C(V), I form a list of 100 constraints which state whether > the constraint applies to each element, depending on the length > variable: > > L > 0 => C(V_0) > L > 1 => C(V_1) > ... > L > 99 => C(V_99) > > It seems to me that introducing 100 constraints like this is > inefficient. I'd much rather have a single constraint which watched > as the lower bound of L increased and added individual element > constraints on the fly. So when L is foung to be greater than 2, C > (V_0), C(V_1) and C(V_2) are added to the problem. > > The apparent difficulty with this is the backtracking behaviour. If > on backtracking we determine that L is less than 2, then we need to > retract C(V_2) from the constraint store. Is there any easy way to do > this in Choco? > > Malcolm > > -- > Many clever men like you have trusted to civilisation. > Many clever Babylonians, many clever Egyptians, > Many clever men at the end of Rome. > - G.K.Chesterton, The Napoleon of > Notting Hill > > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users -- "An inconvenience is only an adventure wrongly considered; an adventure is an inconvenience rightly considered." - G.K.Chesterton, On Running After Ones Hat |