[gecode-users] Help with count method in script
George Rudolph
george.rudolph at citadel.edu
Thu Sep 20 19:20:02 CEST 2007
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:zayenz at gmail.com]
> Sent: Thursday, September 20, 2007 11:51 AM
> To: George Rudolph
> Cc: users at gecode.org
> Subject: Re: [gecode-users] Help with count method in script
>
> On 9/20/07, George Rudolph <george.rudolph at citadel.edu> 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/
More information about the gecode-users
mailing list