Try to use a variable of IntVarArgs while constructing the model to which additional variables can be added. Then, after you are done with constructing your model you can copy the elements of the IntVarArgs into an IntVar Array.
Not sure that this actually answers your question. Cheers Christian -- Christian Schulte, www.ict.kth.se/~cschulte -----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Ajit Dingankar Sent: Tuesday, August 13, 2013 10:16 PM To: users@gecode.org Subject: [gecode-users] Dynamically constructing a model using solution of an IntVar I'm a newbie to Gecode (although I've used constraint programming before) so please excuse me for a stupid question. ;-) I'm working on a problem of generating some test files according to some constraints on the structure and content. The file header has a field for the size of the data content (rest of the file). >From what I've read in MPG, Tip 4.5 seems to be the right approach for the problem, except that the length of the for dynamically sized IntVarArray (representing Data) is determined by a partial solution (for the IntVar representing Length). I'd appreciate any pointers to modeling or solving this problem. Thanks, Ajit ==== _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users