clpz icon indicating copy to clipboard operation
clpz copied to clipboard

Constraint Logic Programming over Integers

Results 18 clpz issues
Sort by recently updated
recently updated
newest added

I am sure this is completely my fault, but it is not entirely clear to me what this error means. Am I mixing clpz expressions in some non-compatible way? I...

I am not assuming that CLP(B) from SWI-Prolog uses branch and bound for weighted_maximum/2. But theoreticall CLP(B) branch and bound should work for any constraints, given as freeze/2, when/2, CLP(FD)...

Should weighted_maximum/3 work together with multiple sat/1 constraints. I get the following result: ``` /* SWI-Prolog (threaded, 64 bits, version 8.3.20) */ ̀?- sat(~(Y*X)), sat(Z=:=Y), weighted_maximum([7,2,5],[X,Y,Z],W). false. ``` But was...

I see from your [knight's tour example ](https://www.metalevel.at/knight/knight.pl), you wrote a small utility to convert a list of values to a domain: ``` foldl(num_to_dom, Nexts, Next, Dom) ``` where: ```...

Is there any available list of test cases to check changes made to CLPZ?

Enhance propagation in the following cases, if possible: ?- X^Y #= 0. X^Y#=0. and: ?- X in 0..100, 2^I #= X. X in 0..100, 2^I#=X. Suggested by @JCumin. These cases...

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,...

If this cannot be done ATM because of missing libraries or open issues, then we can at least assemble a list of requirements SWI should meet in order to add...

(Tested on SWI's CLP(FD), though I assume the same problem exists in CLP(Z)) **Weak propagation** ``` ?- X #= abs(X) + 1. X in 2..sup, _G2048+1#=X, _G2048#=abs(X), _G2048 in 2..sup....

Witness due to @jburse: ?- 3*X+2*Y #> 100, X in 10..20. X in 10..20, 101#=<3*X+2*Y, Y in 20..sup. `Y` can be reduced to `21..sup`.