Has anyone implemented a finite domain constraint which has an 'at least' effect (opposite of atmost/3)? ie: [A,B,C,D,E]::[red,green, brown], atleast(2,[A,B,C,D,E], red). %where at least 2 of these are red, possibly more Also is there an implementation of an 'exactly' constraint, as in [A,B,C,D,E]::[blue, yellow, white], atmost(2,[A,B,C,D,E], blue). % at least 2 and at most 2. Doug Edmunds 20 March 2000 edmunds@pacifier.com [ Moderator's note: The library fd_global (see Library Manual) contains the constraint occurrences(++Value, +List, ?N) which covers all this. You can find an example at http://www.icparc.ic.ac.uk/eclipse/examples/puzzle6a.pl.txt ]Received on Mon Mar 20 18:34:02 2000
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:05 PM GMT GMT