Hello, some months ago I implemented N-ary propagator (it is that edge-finder). When I used it to solve larger problem instances, I noticed that it consumes memory in rate of about 1MB/s. I tested it in Gecode 2.2.0 (where it was even about 3MB/s) and in Gecode 3.1.0., using MS Visual C++ 2008.
This propagator is inherited from class NaryPropagator. In the propagate method, there is an array for sorting, which is created using the Region allocation. When I changed the edge-finder to inherit directly from the class Propagator, the growing memory consumption disappeared. My question is, are there some rules, what should be implemented in propagator inherited from NaryPropagator in order allocate/dealocate memory correctly? My second question (set of questions) is related to Val propagator for cumulatives constrait, which is my study material for implementation of scheduling constraints. 1) in Val::propagate() file cumulatives/val.hpp at line 276 there is a test if all the variables are assigned. Is there a reason why in case of subsumed = true; the function ES_SUBSUMED() is called as late as at line 386? 2) Why there is no ES_FIX return from the Val::propagate() method? In the documentation is that when the propagator computes fixpoint, it should return ES_FIX. Is the reason that checking whether fixpoint is reached is expensive, and the propagation scheduler arranges that the propagation is not executed too many times? Thank you. Regards, Jan _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users