Hi all, Consider the following two examples: ?- minimize((member(X,[3,2,1]), Y=X), X). Found a solution with cost 3 Found a solution with cost 2 Found a solution with cost 1 Found no solution with cost -1.0Inf .. 0 X = 1 Y = 1 Yes (0.00s cpu) %%%%%% ?- hash_create(H), minimize((member(X,[3,2,1]), hash_add(H,solution,X)), X). Found a solution with cost 3 Found a solution with cost 2 Found a solution with cost 1 Found no solution with cost -1.0Inf .. 0 H = hash(4, 0, []) X = 1 %%%%%% Why is Y in the first goal instantiated to 1 while the hash map in the second goal does not contain the solution? Is there a way to make the second goal work? Regards, StephanReceived on Wed Aug 04 2010 - 10:01:29 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST