[gecode-users] domain constraint
tack at gecode.org
Thu Nov 11 18:36:29 CET 2010
frank lemoine wrote:
> i'm sorry Guido, i think you've not undrestand my problem. i want to reproduce this:
> "" IntVarArray x(*this,200,0,199);
> Support::RandomGenerator rnd;
> IntArgs a;
> for (int i=10; i--;)
> a << rnd(200);
> dom(*this, x, IntSet(a));
> std::cout << "t = " << t << std::endl; ""
> without using the the domain constraint dom because when i run this code in a big "for loop" peak memory reach 2 GO.
What kind of for loop? I'm trying to reproduce the problem, but the above code works fine. You have to be clearer about what exactly you are doing. Please come up with a simple piece of code that exhibits the problem, not some pseudo code that leaves out the details. Obviously, if you run the above 1000 times, you allocate 200000 variables and that takes a lot of memory, but that's not what you said in the original message.
Calling dom (as opposed to constraining the domains directly) is definitely not the problem here, it does not allocate any memory except for the domain itself.
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users