I'm not familiar with Choco in particular but you are probably trying
to post an "element" constraint.
Make sure that the index variable has a domain inside the range of the
array on which you apply the element (-1 should not be in the domain).

On Jul 29, 1:24 am, hafsainfo <haafsa...@gmail.com> wrote:
> Good evening,
>
> I dont think where  is the error in the command written in Java with
> choco solver
> if anyone can help me to  find the solution:
> mp.addConstraint (nth (s [i], a [i], Constant (1)));
> and here the error that appears
> :
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
> -1
> at Tsp.main
>
> Thank you in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to