- Mail actions: [ respond to this message ] [ mail a new topic ]
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: Oliver Shycle <oliver.shycle_at_...1...>

Date: Wed, 7 Apr 2010 11:54:47 +0200

Date: Wed, 7 Apr 2010 11:54:47 +0200

Dear all, thanks to all your help and advices I successfully set up my user defined reified constraints which no behave as I expect. The Constraint Library Manual however left some unanswered questions. On page 22 the manual says: - Enforcing constraints: It seems to be better to unify the truth reified values to variables to get active constraints. Is this correct? What are advantages and disadvantages of passive and active constraints? - "In the event that the reified variable becomes bound to 0 then the constraint should actively propagate its negation." How is this active propagation ensured by my constraints? What do I have to regard? - same for "actively propagate its normal semantics" Best regards, Oliver. On 1 April 2010 14:29, Alexandre Saidi <Alexandre.Saidi_at_...37...> wrote: > Dear Oliver, > (back to my office) .. > Your sentence may have 2 meanings : > 1- any var (One or more) greater than 8 then at least one less than 8 > 2- one per one (if one var greater than 8 then one smaller than 8) > > > In the case-1, take just what I sent but change the ‘OR’ to an ‘AND’ as > follows : > :- lib(fd). > example :- > OutputModel = [A, B, C, D], > A #:: 1..10, > B #:: 1..10, > C #:: 1..10, > D #:: 1..10, > > % NOT ALL can have value greater or equal to 8 (i.e. A <8 or B<8 or C<8 or > D<8) > #\+ (A #>= 8 #/\ B#>= 8 #/\ C #>= 2 #/\ D#>= 2), % NOT ALL can have > value>8 > labeling(OutputModel), > writeln(OutputModel). > > N.B. : this means that you must always have one of the vars [A,B,C,D] less > that 8. So we can also have the following solution (just change the > constraint line) : > … > A #< 8 #\/ B#< 8 #\/ C #< 8 #\/ D#< 8, > ... > > OR : > > lib(fd). lib(ic_global). > % the constraint part (the rest dose not change) : > V #:: 1..10, N#:: 0..4, occurrences(V,[A,B,C,D],N), V #< 8, N #>=1, > …. > > > For the case-2 : "if one has a value greater, then one must have a value > less than 8, if 2 have values > 8 then 2 must have value less than 8 (no > more case) : you can change the last solution to that case. > > > Alex. > > Le 31 mars 2010 à 14:27, Oliver Shycle a écrit : > > if any variable has a value greater than eight, there must be at least one > variable with a value smaller than eight." > > > ------------------------------- > Alexandre Saidi > Maitre de Conférences > Ecole Centrale de Lyon-Dép. MI > LIRIS-CNRS UMR 5205 > Tél : 0472186530, Fax : 0472186443 > > > > > > >Received on Wed Apr 07 2010 - 09:54:54 CEST

*
This archive was generated by hypermail 2.3.0
: Sat Aug 24 2019 - 06:15:04 CEST
*