Thanks.
Yes, I'm worried about performance (memory consumption). The arrays are
very large, and there are many constraint invocation.

For the "global hash table" approach, I thought something like this:

% flatzinc
predicate my_declare_param(int: param_id, array[int] of int:
params1, array[int] of int: params2);

predicate my_con(var int: x, var int: y, var int: param_id);

...

my_declare_param(3, [1,2,3,4,..], [1,2,3,4..])
my_con(a, b, 3)

% end flatzinc

I add a predicate my_declare_param for registering params, wich "register"
(in a global map) the parameters giving them and ID wich is PARAM_ID as
argument.
Then in the constraint (instead of arrays) I give the ID (PARAM_ID above)
to specify which parameters declared before I want to use.

Is that did you mean  ??

Thanks in advance.
Cheers.
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to