next up previous
Up: A comparison of Constraint Previous: Generalized Knapsack

Code generation

CLP(FD) code:
codeGen.pl (SICStus)

ASP code:
mkASPinstance.pl Generator of ASP encodings. E.g.: code-8-5.lp (sample code for $ n=8$ and $ d=5$)

Results:
Instances.

Symbol `?' means that none of the systems produced an answer. $ --$ denotes no answer within 30 minutes of CPU-time.

Moreover,

(a) = the word $ (0,0,\dots,0)$ is forced to belong to the code;
(b) = as (a) and half of the words must begin with 0;
(c) = as (a) and lexicographic ordering among tuples is imposed;
(d) = as both (b) and (c).

  $ ~\phantom{\underline{\overline{\mid}}}~~$Exists code?
Input   lparse SMODELS CMODELS SICStus GNU-Prolog
$ (n,d,k)$         mChaff Simo                
      (a) (b) (a) (b) (a) (b) (a) (b) (c) (d) (a) (b) (c) (d)
(6,3,8) Y $ <$0.01 0.02 0.02 0.08 0.10 0.05 0.08 $ <$0.01 0.01 $ <$0.01 $ <$0.01 $ <$0.01 $ <$0.01 $ <$0.01 $ <$0.01
(6,3,9) N $ <$0.01 0.02 0.02 0.13 0.20 0.13 0.18 573.46 0.08 2.26 0.01 54.04 0.01 0.24 $ <$0.01
(7,3,16) Y 0.01 0.09 0.09 1.19 2.05 2.83 9.40 0.04 0.01 0.01 0.02 $ <$0.01 $ <$0.01 $ <$0.01 $ <$0.01
(7,3,17) N 0.01 6.11 6.92 2.74 7.36 17.51 20.97 - 865.50 - 3.30 - 118.81 - 0.42
(8,3,20) Y 0.04 0.22 224.37 7.75 1188.34 223.91 - - - - - - - - -
(8,3,21) ? 0.04 - - - - - - - - - - - - - -
(8,5,4) Y 0.07 0.11 0.11 0.10 0.12 0.07 0.10 $ <$0.01 $ <$0.01 0.01 $ <$0.01 $ <$0.01 $ <$0.01 $ <$0.01 $ <$0.01
(8,5,5) N 0.07 0.40 0.41 0.36 0.51 0.42 0.78 3.90 0.02 0.42 0.01 0.41 $ <$0.01 0.04 $ <$0.01
(9,3,32) Y 0.10 0.38 626.18 16.90 10.24 - - 0.65 0.34 0.09 0.07 0.11 0.04 0.03 $ <$0.01
(9,3,33) Y 0.10 388.80 - 6.71 11.86 - - - - - - - - - 1931.52
(9,5,6) Y 0.31 24.33 24.64 0.49 0.46 2.25 4.04 0.02 $ <$0.01 0.01 0.01 $ <$0.01 $ <$0.01 $ <$0.01 $ <$0.01
(9,5,7) N 0.31 80.15 81.44 124.48 144.39 267.00 372.06 - 7.79 252.95 1.70 - 1.10 38.99 0.20
(10,5,12) Y 1.24 - - 82.85 205.45 - - 792.78 0.04 14.87 0.03 89.76 $ <$0.01 2.50 $ <$0.01
(10,5,13) N 1.24 - - - - - - - - - 374.39 - - - 43.28


next up previous
Up: A comparison of Constraint Previous: Generalized Knapsack
Last update: 21-12-2005 by andy