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.
Cheers,
Guido
--
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users