Thanks Mikael! I thought I had the parameters in the correct order, but obviously I did not. I made the change, and it works as expected. BTW, in the commented code, the reference to "q" should be "schemeCount" as well. :)
-------------------- George Rudolph Assistant Professor Thompson Hall 225 Math & Computer Science Dept. The Citadel 171 Moultrie St. Charleston, SC 29409 > -----Original Message----- > From: Mikael Zayenz Lagerkvist [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 20, 2007 11:51 AM > To: George Rudolph > Cc: [EMAIL PROTECTED] > Subject: Re: [gecode-users] Help with count method in script > > On 9/20/07, George Rudolph <[EMAIL PROTECTED]> wrote: > > I would like help with the following Gecode/J script. > > As indicated below, when I uncomment the calls to count > > and run the script, it fails--but I am expecting two results. > > What am I doing incorrectly? > > (Note: For those it may interest, I am using Gecode/J with Eclipse.) > > > > --------- begin code ----------- > > /** need help with these -- when I uncomment these constraints > > * and run, I get a failed space, but I am expecting two results: > > * [1,2,2,1] and [2,1,1,2] > > * What have I done incorrectly? > > */ > > //n1 slots have the value lambda1, n2 slots have the value lambda2 > > // what I want to say is "exactly n1 elements have the value lambda1 > > in q" > > // for example. > > //count(this, q, n1, IRT_EQ, lambda1, opt.icl ); > > //count(this, q, n2, IRT_EQ, lambda2, opt.icl ); > > --------- end code ----------- > > > The first constraint says that lambda1 of the variables in q should > equal n1, and similarly for the second. See more in the documentation > for count: > http://www.gecode.org/gecodej/doc/group__TaskIntIntCard.html > > > Cheers, > Mikael > > -- > Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/ _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users
