next up previous
Next: Code generation Up: A comparison of Constraint Previous: Planning (block world) (ad-hoc

Generalized Knapsack

CLP(FD) code:
knapsack.pl (SICStus)
gknapsack.pl (GNU-prolog)
bknapsack.pl (BProlog)

ASP code:
knapsack.lp

Results:
Knapsack instances.

Symbol `-' denotes no answer within 30 minutes of CPU-time. Mark (*) denotes abnormal termination of the solver.
max_size min_profit Answer SICStus BProlog GNU-Prolog SModels CModels
255 374 Y 0.02 0.02 $ <$0.01 0.04 (*)
255 375 N 0.03 0.02 $ <$0.01 3.08 (*)
511 757 Y 0.36 0.17 0.08 0.12 (*)
511 758 N 0.36 0.17 0.08 130.82 (*)
1023 1524 Y 8.81 4.20 1.92 0.49 (*)
1023 1525 N 8.75 4.15 1.87 - (*)
2047 3059 Y 368.50 181.77 80.68 1.84 (*)
2047 3060 N 366.79 182.78 80.40 - (*)


next up previous
Next: Code generation Up: A comparison of Constraint Previous: Planning (block world) (ad-hoc
Last update: 21-12-2005 by andy