Hi Benoit, Maybe you want to tell us how large your graphs are?
To give you an idea, we have been playing a little bit with some word problems (brought to us by Håkan Kjellerstrand). Here, in the small examples we tried, the arrays have around 70,000 elements and there are plenty of these element constraints and everything is solved in around 8 Megabytes of main memory. I think, Håkan even successfully tried examples with ten times as many elements. Or, to put it into perspective: solving these puzzles with the large element constraints takes a small fraction of the time it takes a C++ compiler to compile the source code containing the word lists for the element constraints as string constants... Best Christian PS: Of course, the arrays for element constraints are never copied, they are shared among copies! -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of benoit Sent: Monday, November 02, 2009 5:05 PM To: us...@gecode.org Subject: [gecode-users] Memory consumption - element constraint Hello, I came across a problem of high memory consumption with the element constraints. According to this message (http://www.gecode.org/gecode-users/2009-February/002828.html), it would come from the large size of the employed arrays. In my case, the array represents a directed multigraph. It stores the values hold by the arcs. These values are a priori computed, stored in a variable of type IntArgs and retrieved during execution. Here comes the problem of size. A possible solution would consist in computing the needed values during execution. However, this calculation can be a bit complex and will require different temporary variables. I am afraid of producing a code difficult to maintain. Is there a better way of doing this ? Are there more appropriate structures ? (I should add that the considered multigraph is sparse). Thanks in advance. Benoît _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users