does CP Optimizer somehow offer the ability to define the following global cardinality constraint?
count( | P >= x | >= n )
... that is, is there a way to constraint the number of variables P that take values greater than or equal to a value x to greater than or equal to the number n ?
IloDistribute doesn't seem to be able to do it -- do I have to implement my own global constraint to do this?
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
1 reply Latest Post - 2012-11-13T14:56:01Z by ol
Pinned topic Global cardinality constraint with ranges
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-13T14:56:01Z at 2012-11-13T14:56:01Z by ol
ol 270002SRX757 PostsACCEPTED ANSWER
Re: Global cardinality constraint with ranges2012-11-13T14:56:01Z in response to SystemAdminHello,
you want the number of Pi greater or equal than value x to be greater or equal than n: count( | P >= x |) >= n.
You can introduce an array of 0-1 variables, Q, s.t. Qi = (Pi >= x)
Then you can express your constraint by: sum(Q) >= n. No need to use count() or distribute() here.