From: Carlos T. <car...@un...> - 2007-09-14 07:19:23
|
Hi again. Hadrien, I have a problem with the distanceEQ method. It doesn't exist in my version of the choco library. Neither in the javadoc nor in the code (I've searched for the method in the source, with no results). I'm using the 1.2.04 version. Is that the last one?. Curiously, searching the web, I've found this web address with a javadoc of the library in which the distanceEQ method appears, but I don't know to which version of the library it corresponds. This is the link: http://ensta.fr/~diam/corlab/online/choco/ Any help? Thanks. Hadrien Cambazard escribió: > Hi Carlos, > > for |x1-x2|=1, you can use pb.distanceEQ(x1,x2,1). > Otherwise (but it will be less efficient) you can do : > pb.eq(pb.minus(x1,x2), y); // y = x1 - x2 > pb.abs(y2,y); // y2 = |y| > pb.eq(y2,1); // y2 = 1 > > Hope it helps > > Hadrien > > > Le 13 Sep 2007 à 16:39, Carlos Testera a écrit : > >> Hi. >> I'm new to choco. I'm doing some tests and examples with the library, >> and I've found a problem. I've searched in the list and in the forum, >> but with no results. >> I would like to add to my problem a constraint of the type |x1-x2|=1 >> I've seen the abs method (it is not in the javadoc), but I don't >> understand how it works, because it receives two arguments, and I don't >> know their funcionality. Moreover, I've tryed to make a call like >> problem.abs(y1,problem.minus(x1,x2)) expecting that it will create a >> variable (y1) representing the absolute value of the difference of x1 >> and x2, but that method does not allow an IntExp object as argument. >> Any help? >> >> Thanks >> >> --Carlos Testera >> University of Leon >> Leon >> Spain >> E-mail: >> car...@un... >> Phone: >> +34 987291000 >> ext 5432 >> >> >> ------------------------------------------------------------------------- >> >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Choco-users mailing list >> Cho...@li... >> https://lists.sourceforge.net/lists/listinfo/choco-users > > -- Carlos Testera University of Leon Leon Spain E-mail: car...@un... Phone: +34 987291000 ext 5432 |