[gecode-users] Dynamically constructing a model using solution of an IntVar

Christian Schulte cschulte at kth.se
Tue Aug 13 22:57:54 CEST 2013


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-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Ajit Dingankar
Sent: Tuesday, August 13, 2013 10:16 PM
To: users at 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 at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list