triska / clpz

Constraint Logic Programming over Integers
https://www.metalevel.at/prolog/clpz
184 stars 15 forks source link

Stronger nvalue/2 constraint #8

Open triska opened 7 years ago

triska commented 7 years ago

An interesting use case for the global constraint nvalue/2 is described by @hugoferreira at:

http://stackoverflow.com/questions/41496348/equivalent-of-nvalue-2-from-sicstus-in-swiprolog

For example, if one is trying to distribute stuff into bags of different sizes, and want to minimize the number of bags.

A working implementation of nvalue/2 is now available in CLP(Z).

It should become a bit stronger, and also detect entailment.