Yep, that'll do the trick and no need to post dom or rel. Cheers Christian
-----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Kish Shen Sent: Thursday, June 11, 2009 6:35 PM Cc: us...@gecode.org Subject: Re: [gecode-users] problem using IntVarArgs Christian Schulte wrote: > Hi Kish, > > Let me venture a guess: you did not initialize the arguments of IntVarArgs. > When you create an IntVarArgs object, its fields are uninitialized. So what > you might want do is > > IntVarArgs x(n); > for (int i=0; i<n; i++) > x[i].init(home, ..., ...); > > Where ... are smallest and largest possible value. > > Is that it? > > Cheers > Christian > Hi Christian, Thanks. You are correct, I did not initialise the variables, because in the normal case they will be set to other IntVar that is already part of the space. In this case, I assume I should just use x[i].init() to set x[i]'s min and max to the same integer value, x[i].init(home, v, v) and then I don't need to post the dom or rel constraint at all, right? Cheers, Kish -- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message. Cisco Systems Limited (Company Number: 02558939), is registered in England and Wales with its registered office at 1 Callaghan Square, Cardiff, South Glamorgan CF10 5BT. _______________________________________________ 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