Hello,
I'm trying to introduce the following constraint in my model: let x be a set of variables (an IntVarArray) and y a proper subset (a slice) of them, I want to know how many variables in y get values among a given set of values. Problem is: I want to implement this as a "soft" constraint, i.e. I want to minimize/maximize the number of times this condition is satisfied, but without actually posting the constraint. I have tried with reified membership constraints, but apart from reification (that did exactly what I wanted it to do), they actually post propagators and thus prune my search space. I have tried counting constraints as well, but none of them matches the semantics I need, so I suspect that this kind of constraint cannot simply be expressed, am I wrong?

Thanks,
Tommaso

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to