2

For example: I have some variable: A,B,C,D, and a condition: in [A,B,C,D] list there must be at least twice the number 2. I can only use global_cardinality/2 combinatorial constraint.

repeat
  • 18,496
  • 4
  • 54
  • 166
lyra42
  • 365
  • 1
  • 3
  • 11

1 Answers1

2

Ok, it was a fairly stupid question. The solution is for example: global_cardinality(VarList, [1-_,2-M]), M >= 2. So we haven't got any constraint on how many 1 number the VarList has, but we give the number of number 2, that is M, and let M be greater than 2.

lyra42
  • 365
  • 1
  • 3
  • 11