Tarek Garoui wrote: > I created an IntVar like this: > > IntVar id = new IntVar(this, "ID", new Integer(0), new Integer(max)); > > After that, I want to post a constraint consisting of a BExpr where > I need the value of the IntVar id. But I get the following exception: > org.gecode.NotAssigned. > > How can I assign values to an IntVar ?
You initialized the variable with a domain 0..max, so it's clearly not assigned. It will be assigned by search, of course, but you cannot use the final value in your model. Cheers, Guido _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users