You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(4) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(2) |
Feb
(8) |
Mar
(13) |
Apr
(1) |
May
(2) |
Jun
(5) |
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
(9) |
Nov
(1) |
Dec
(15) |
2006 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
(10) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(14) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(13) |
Nov
(4) |
Dec
(7) |
2008 |
Jan
(1) |
Feb
(4) |
Mar
(2) |
Apr
(7) |
May
(4) |
Jun
(17) |
Jul
(20) |
Aug
(7) |
Sep
(23) |
Oct
(18) |
Nov
(47) |
Dec
(51) |
2009 |
Jan
(35) |
Feb
(20) |
Mar
(32) |
Apr
(38) |
May
(119) |
Jun
(99) |
Jul
(65) |
Aug
(22) |
Sep
(24) |
Oct
(39) |
Nov
(9) |
Dec
(10) |
2010 |
Jan
(8) |
Feb
(8) |
Mar
(76) |
Apr
(72) |
May
(80) |
Jun
(83) |
Jul
(28) |
Aug
(57) |
Sep
(25) |
Oct
(3) |
Nov
|
Dec
(1) |
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ben A. <ben...@st...> - 2007-06-25 09:05:21
|
Hello there I would greatly appreciate a small amount of your time to assist with my doctoral research at The University of Newcastle. The research concerns open source licensing and we're seeking developers working on Java projects. The research is supervised, ethics-approved, anonymous and results will be freely available. Participation will also provide a custom licensing report for your project. To learn more, please visit: http://licensing-research.newcastle.edu.au Thanks for reading this email, and I hope you'll consider participating. Best regards Ben Alex (My apologies for being off-topic; this list will not be emailed again) |
From: Maurice D. <Mau...@en...> - 2007-06-12 09:36:10
|
Le 6 juin 07 =E0 14:10, Sciss a =E9crit : > last, i'm interested to know if anyone is using choco in a scripting > environment on top of java, like groovy or jython. > how senseful do you judge an effort to port the choco library to > other languages like supercollider3? > thanks, -sciss- Don't know about supercollider3 I tested choco with groovy, a nice language. But Groovy only works with java. Ruby is another nice language (true object, ...) from witch groovy is derived. But ruby (as a C interpreter) come with much more libraries and is strongly supported by sun in its JRuby version (JRuby-1.0.0 has just come out (10 june !) You can get it at : http://dist.codehaus.org/jruby/ Here is a verbose sample of a MagiScare un JRuby (It works on - Mac-osx and linux - with jruby-1.0 - with choco-cvs-20070125.jar The following example show how Ruby can add a method to an existing choco class. Operator overloading could also be usefull for specifing constraint, but choco design seems not be very adapded for this purpose (if IntExp interface provide IntExp eq(IntExp), ... Then ruby would just had to add "=3D=3D" method to the IntExp class, or somethong like that...) |
From: David G. <dg...@no...> - 2007-06-11 05:50:01
|
Oooops, I just realized I forgot to post the constraint. myPb.post(myPb.feasTupleFC(dim, result));=20 I was indeed missing something ! David -----Message d'origine----- De : cho...@li... [mailto:cho...@li...] De la part de David GRAVOT Envoy=E9 : dimanche 10 juin 2007 14:22 =C0 : cho...@li... Objet : [Choco-users] Newbie : feasTuple Hello, I'm trying to use feasTupleFC to limit an array of three integer = variables to be bound to the permutations of three given different numbers = v1<v2<v3 Using :=20 ArrayList<int[]> result =3D new ArrayList<int[]>(); result.add(new int[]{v1,v2,v3}); result.add(new int[]{v1,v3,v2}); result.add(new int[]{v2,v1,v3}); result.add(new int[]{v2,v3,v1}); result.add(new int[]{v3,v1,v2}); result.add(new int[]{v3,v2,v1}); And then myPb.feasTupleFC(dim, result); How do I have to declare dim ? I first tried :=20 IntDomainVar[] dim =3D myPb.makeEnumIntVarArray("dims", 3, v1, v3); But then, the possible solutions include v1,v1,v1 and in fact all the 27 combinations I then tried infeasTupleFC on the 21 wrong combinations, = but the result is still the same. Note : Neither (in)feasTupleAC nor BoundVarArrat do help more I guess I'm missing something ! Thanks for feedback David -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - = the FREE version of DB2 express and take control of your XML. No limits. = Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Choco-users mailing list Cho...@li... https://lists.sourceforge.net/lists/listinfo/choco-users |
From: David G. <dg...@no...> - 2007-06-10 12:22:03
|
Hello, I'm trying to use feasTupleFC to limit an array of three integer variables to be bound to the permutations of three given different numbers v1<v2<v3 Using : ArrayList<int[]> result = new ArrayList<int[]>(); result.add(new int[]{v1,v2,v3}); result.add(new int[]{v1,v3,v2}); result.add(new int[]{v2,v1,v3}); result.add(new int[]{v2,v3,v1}); result.add(new int[]{v3,v1,v2}); result.add(new int[]{v3,v2,v1}); And then myPb.feasTupleFC(dim, result); How do I have to declare dim ? I first tried : IntDomainVar[] dim = myPb.makeEnumIntVarArray("dims", 3, v1, v3); But then, the possible solutions include v1,v1,v1 and in fact all the 27 combinations I then tried infeasTupleFC on the 21 wrong combinations, but the result is still the same. Note : Neither (in)feasTupleAC nor BoundVarArrat do help more I guess I'm missing something ! Thanks for feedback David |
From: Guillaume R. <Gui...@em...> - 2007-06-07 12:22:31
|
Hi, You can find more information about Palm here => http://www.e-constraints.net/palm/palm.html Guillaume Sciss a écrit : > well, found the paper > > http://www.emn.fr/jussien/publications/jussien-WCP00.pdf > > and got choco working in groovy (groovy.codehaus.org): > > pb = new choco.palm.PalmProblem(); > a = pb.makeEnumIntVar( "a", 1, 15 ); > b = pb.makeEnumIntVar( "b", 1, 15 ); > c = pb.makeEnumIntVar( "c", 1, 15 ); > d = pb.makeEnumIntVar( "d", 1, 15 ); > e = pb.makeEnumIntVar( "e", 1, 15 ); > f = pb.makeEnumIntVar( "f", 1, 15 ); > pb.post( pb.geq( d, pb.plus( a, 1 ))); > pb.post( pb.geq( d, pb.plus( b, 2 ))); > pb.post( pb.geq( e ,pb.plus( c, 1 ))); > pb.post( pb.geq( f, pb.plus( d, 4 ))); > pb.post( pb.geq( f, pb.plus( e, 3 ))); > pb.propagate(); > println "result f = " + f.getDomain(); > > > ;-) now trying out things. > > ciao, -sciss- > > > Am 06.06.2007 um 16:09 schrieb Sciss: > > >> thank you! where can i find information / doc / tutorial about palm? >> >> ciao, -sciss- >> >> >> Am 06.06.2007 um 15:51 schrieb Guillaume Richaud: >> >> >>> Hi, >>> >>> To answer to your first question: yes you can add constraints and >>> remove them dynamically. But to be able to remove them without >>> restarting you have to use Choco/Palm. >>> >>> Guillaume >>> >>> Sciss a écrit : >>> >>>> hi, >>>> >>>> i'm starting to learn about contraint programming. i want to >>>> evaluate the possibilities of using choco with longterm question >>>> about constraints that can change in a "realtime environment", so >>>> i'm interested in the timing scheme of choco and if it's possible >>>> to calculate some variables and at some later point in time >>>> modify constraints (re-post them?) and re-calculate certain >>>> variables. >>>> >>>> then i'm interested in what i guess is called soft constraints, >>>> i.e. variables that are only specified in terms of a probability >>>> distribution so that a solution is calculated by generating a >>>> random number that satisfies that distribution. >>>> >>>> last, i'm interested to know if anyone is using choco in a >>>> scripting environment on top of java, like groovy or jython. >>>> >>>> how senseful do you judge an effort to port the choco library to >>>> other languages like supercollider3? >>>> >>>> thanks, -sciss- >>>> >>>> >> ---------------------------------------------------------------------- >> --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Choco-users mailing list >> Cho...@li... >> https://lists.sourceforge.net/lists/listinfo/choco-users >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > > |
From: Sciss <co...@sc...> - 2007-06-07 11:54:08
|
well, found the paper http://www.emn.fr/jussien/publications/jussien-WCP00.pdf and got choco working in groovy (groovy.codehaus.org): pb =3D new choco.palm.PalmProblem(); a =3D pb.makeEnumIntVar( "a", 1, 15 ); b =3D pb.makeEnumIntVar( "b", 1, 15 ); c =3D pb.makeEnumIntVar( "c", 1, 15 ); d =3D pb.makeEnumIntVar( "d", 1, 15 ); e =3D pb.makeEnumIntVar( "e", 1, 15 ); f =3D pb.makeEnumIntVar( "f", 1, 15 ); pb.post( pb.geq( d, pb.plus( a, 1 ))); pb.post( pb.geq( d, pb.plus( b, 2 ))); pb.post( pb.geq( e ,pb.plus( c, 1 ))); pb.post( pb.geq( f, pb.plus( d, 4 ))); pb.post( pb.geq( f, pb.plus( e, 3 ))); pb.propagate(); println "result f =3D " + f.getDomain(); ;-) now trying out things. ciao, -sciss- Am 06.06.2007 um 16:09 schrieb Sciss: > thank you! where can i find information / doc / tutorial about palm? > > ciao, -sciss- > > > Am 06.06.2007 um 15:51 schrieb Guillaume Richaud: > >> Hi, >> >> To answer to your first question: yes you can add constraints and >> remove them dynamically. But to be able to remove them without >> restarting you have to use Choco/Palm. >> >> Guillaume >> >> Sciss a =E9crit : >>> hi, >>> >>> i'm starting to learn about contraint programming. i want to >>> evaluate the possibilities of using choco with longterm question >>> about constraints that can change in a "realtime environment", so >>> i'm interested in the timing scheme of choco and if it's possible >>> to calculate some variables and at some later point in time >>> modify constraints (re-post them?) and re-calculate certain >>> variables. >>> >>> then i'm interested in what i guess is called soft constraints, >>> i.e. variables that are only specified in terms of a probability >>> distribution so that a solution is calculated by generating a >>> random number that satisfies that distribution. >>> >>> last, i'm interested to know if anyone is using choco in a >>> scripting environment on top of java, like groovy or jython. >>> >>> how senseful do you judge an effort to port the choco library to >>> other languages like supercollider3? >>> >>> thanks, -sciss- >>> > > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users |
From: Sciss <co...@sc...> - 2007-06-06 14:09:41
|
thank you! where can i find information / doc / tutorial about palm? ciao, -sciss- Am 06.06.2007 um 15:51 schrieb Guillaume Richaud: > Hi, > > To answer to your first question: yes you can add constraints and =20 > remove them dynamically. But to be able to remove them without =20 > restarting you have to use Choco/Palm. > > Guillaume > > Sciss a =E9crit : >> hi, >> >> i'm starting to learn about contraint programming. i want to =20 >> evaluate the possibilities of using choco with longterm question =20 >> about constraints that can change in a "realtime environment", so =20= >> i'm interested in the timing scheme of choco and if it's possible =20= >> to calculate some variables and at some later point in time =20 >> modify constraints (re-post them?) and re-calculate certain =20 >> variables. >> >> then i'm interested in what i guess is called soft constraints, =20 >> i.e. variables that are only specified in terms of a probability =20= >> distribution so that a solution is calculated by generating a =20 >> random number that satisfies that distribution. >> >> last, i'm interested to know if anyone is using choco in a =20 >> scripting environment on top of java, like groovy or jython. >> >> how senseful do you judge an effort to port the choco library to =20 >> other languages like supercollider3? >> >> thanks, -sciss- >> |
From: Guillaume R. <Gui...@em...> - 2007-06-06 13:51:54
|
Hi, To answer to your first question: yes you can add constraints and remove them dynamically. But to be able to remove them without restarting you have to use Choco/Palm. Guillaume Sciss a écrit : > hi, > > i'm starting to learn about contraint programming. i want to evaluate > the possibilities of using choco with longterm question about > constraints that can change in a "realtime environment", so i'm > interested in the timing scheme of choco and if it's possible to > calculate some variables and at some later point in time modify > constraints (re-post them?) and re-calculate certain variables. > > then i'm interested in what i guess is called soft constraints, i.e. > variables that are only specified in terms of a probability > distribution so that a solution is calculated by generating a random > number that satisfies that distribution. > > last, i'm interested to know if anyone is using choco in a scripting > environment on top of java, like groovy or jython. > > how senseful do you judge an effort to port the choco library to > other languages like supercollider3? > > thanks, -sciss- > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > > |
From: Guillaume R. <Gui...@em...> - 2007-06-06 13:44:50
|
Hi, Malcolm Ryan a écrit : > Thanks, that gives me what I need. My other question is about > backtracking. There is a section in the User Guide labeled > "backtrackable structures" but it is lacking any content. Could you > explain what how it works? > > There are "backtrackable variables" called StoredVar (StoredInt, StoredBitSet, StoredBool...). A StoredVar works as a variable (affectation, modification...) but all its previous values are stored and automatically restored upon bactracking. > One of the things I have implemented in Eclipse is a variable length > list of values. It only creates variables for entries in the list as > they are called for (ie, as the lower bound of the length variable > increases). The good thing about Prolog is that it automatically > handles backtracking over this action. How hard would it be to do > something similar in Choco? > > I don't really understand your question. There aren't any methods available to add/remove variables dynamically. Hope it helps... Guillaume |
From: Sciss <co...@sc...> - 2007-06-06 12:10:15
|
hi, i'm starting to learn about contraint programming. i want to evaluate the possibilities of using choco with longterm question about constraints that can change in a "realtime environment", so i'm interested in the timing scheme of choco and if it's possible to calculate some variables and at some later point in time modify constraints (re-post them?) and re-calculate certain variables. then i'm interested in what i guess is called soft constraints, i.e. variables that are only specified in terms of a probability distribution so that a solution is calculated by generating a random number that satisfies that distribution. last, i'm interested to know if anyone is using choco in a scripting environment on top of java, like groovy or jython. how senseful do you judge an effort to port the choco library to other languages like supercollider3? thanks, -sciss- |
From: Malcolm R. <mal...@cs...> - 2007-06-06 01:10:10
|
Thanks, that gives me what I need. My other question is about =20 backtracking. There is a section in the User Guide labeled =20 "backtrackable structures" but it is lacking any content. Could you =20 explain what how it works? One of the things I have implemented in Eclipse is a variable length =20 list of values. It only creates variables for entries in the list as =20 they are called for (ie, as the lower bound of the length variable =20 increases). The good thing about Prolog is that it automatically =20 handles backtracking over this action. How hard would it be to do =20 something similar in Choco? Malcolm On 05/06/2007, at 6:32 PM, Guillaume Richaud wrote: > Hi, > > Yes, choco has fine-grained events (instantiation, removal, bound =20 > modification,...). > For a small exemple on how you can use it, you can look at: http://=20= > choco-solver.net/index.php?title=3DDiffVec.java > > > Hope it helps. > Guillaume > > Malcolm Ryan a =E9crit : >> Hi, >> >> I've been doing some constraint programming in ECLiPSe prolog, =20 >> but the language is beginning to really annoy me and I've been =20 >> thinking about migrating to a different platform. Choco looks =20 >> like a possibility, but I need to make sure it can do the things =20 >> I need. Eclipse has an event model whereby you can set an action =20 >> to occur when a particular event occurs on a variable. Defined =20 >> events include an event whenever the domain is constrained and an =20= >> event when the variable is instantiated. Is there an equivalent =20 >> functionality in Choco? >> >> Malcolm >> >> -- >> Many clever men like you have trusted to civilisation. >> Many clever Babylonians, many clever Egyptians, >> Many clever men at the end of Rome. >> - G.K.Chesterton, The Napoleon of =20 >> Notting Hill >> >> >> >> >> ---------------------------------------------------------------------=20= >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Choco-users mailing list >> Cho...@li... >> https://lists.sourceforge.net/lists/listinfo/choco-users >> >> -- "The act of defending any of the cardinal virtues has today all the exhilaration of a vice." - G.K.Chesterton A Defense of =20 Humility |
From: Guillaume R. <Gui...@em...> - 2007-06-05 08:33:57
|
Hi, Yes, choco has fine-grained events (instantiation, removal, bound modification,...). For a small exemple on how you can use it, you can look at: http://choco-solver.net/index.php?title=DiffVec.java Hope it helps. Guillaume Malcolm Ryan a écrit : > Hi, > > I've been doing some constraint programming in ECLiPSe prolog, but > the language is beginning to really annoy me and I've been thinking > about migrating to a different platform. Choco looks like a > possibility, but I need to make sure it can do the things I need. > Eclipse has an event model whereby you can set an action to occur > when a particular event occurs on a variable. Defined events include > an event whenever the domain is constrained and an event when the > variable is instantiated. Is there an equivalent functionality in Choco? > > Malcolm > > -- > Many clever men like you have trusted to civilisation. > Many clever Babylonians, many clever Egyptians, > Many clever men at the end of Rome. > - G.K.Chesterton, The Napoleon of > Notting Hill > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > > |
From: Guillaume R. <ro...@gm...> - 2007-06-05 08:10:46
|
Hi, Well, this is not really an available feature right now. But you can simulate it easily. For instance, you can do a fake constraint which only watch events on all variables. For instance you can use the following code. Hope it helps, Guillaume =============== package mestests; import choco.integer.IntDomainVar; import choco.integer.constraints.AbstractLargeIntConstraint; import choco.ContradictionException; import choco.Problem; /** * Created by IntelliJ IDEA. * User: grochart * Date: 5 juin 2007 * Time: 09:58:16 * To change this template use File | Settings | File Templates. */ public class TestVarListener { static class VarListener extends AbstractLargeIntConstraint { public VarListener(IntDomainVar[] vars) { super(vars); } public void propagate() throws ContradictionException { // Nothing is done ! } public void awakeOnInf(int idx) throws ContradictionException { System.out.println("Lower bound of " + getIntVar(idx) + " was increased !"); } public void awakeOnSup(int idx) throws ContradictionException { System.out.println("Upper bound of " + getIntVar(idx) + " was decreased !"); } public void awakeOnInst(int idx) throws ContradictionException { System.out.println(getIntVar(idx) + " was instantiated !"); } public void awakeOnRem(int idx, int x) throws ContradictionException { System.out.println("Value " + x + " of " + getIntVar(idx) + " was removed !"); } public boolean isSatisfied() { return true; } } public static final int NB_REINES = 8; public static void main(String[] args) { long time = System.currentTimeMillis(); System.out.println("NReine model 2"); // ******* 0. Problem creation ********** Problem pb = new Problem(); // ******* 1. Variables creations ********* IntDomainVar[] vars = createVariables(pb); // ******* 2. Constraints posting ********* postConstraints(pb, vars); // ******* 3. Heuristic ********* setHeuristic(pb); // ******* 4. Solving ********* pb.solve(); // ******* 5. Displaying solution ********* displayResult(pb, vars); System.out.println("Time ellapsed: " + (System.currentTimeMillis() - time) + "ms."); } private static IntDomainVar[] createVariables(Problem pb) { IntDomainVar[] vars = new IntDomainVar[NB_REINES]; for (int i = 0; i < NB_REINES; i++) { vars[i] = pb.makeEnumIntVar("x" + i, 0, NB_REINES - 1); } return vars; } private static void postConstraints(Problem pb, IntDomainVar[] vars) { postConstraints1(pb, vars); postConstraints2(pb, vars); pb.post(new VarListener(vars)); } private static void postConstraints1(Problem pb, IntDomainVar[] vars) { for(int i = 0; i < NB_REINES; i++) { for(int j = i+1; j < NB_REINES; j++) { pb.post(pb.neq(vars[i], vars[j])); } } } private static void postConstraints2(Problem pb, IntDomainVar[] vars) { for (int i = 0; i < NB_REINES; i++) { for (int j = i + 1; j < NB_REINES; j++) { int k = j - i; pb.post(pb.neq(vars[i], pb.plus(vars[j], k))); pb.post(pb.neq(vars[i], pb.minus(vars[j], k))); } } } private static void setHeuristic(Problem pb) { //pb.getSolver().setValIterator(new DecreasingDomain()); } private static void displayResult(Problem pb, IntDomainVar[] vars) { if (pb.getSolver().getNbSolutions() > 0) { System.out.println("Found solution : "); for (int i = 0; i < NB_REINES; i++) { int val = vars[i].getVal(); for (int j = 0; j < NB_REINES; j++) { System.out.print(val == j ? "R " : ". "); } System.out.println(""); } } else { System.out.println("No solution found !!"); } } } =============== On 6/5/07, Malcolm Ryan <mal...@cs...> wrote: > Hi, > > I've been doing some constraint programming in ECLiPSe prolog, but > the language is beginning to really annoy me and I've been thinking > about migrating to a different platform. Choco looks like a > possibility, but I need to make sure it can do the things I need. > Eclipse has an event model whereby you can set an action to occur > when a particular event occurs on a variable. Defined events include > an event whenever the domain is constrained and an event when the > variable is instantiated. Is there an equivalent functionality in Choco? > > Malcolm > > -- > Many clever men like you have trusted to civilisation. > Many clever Babylonians, many clever Egyptians, > Many clever men at the end of Rome. > - G.K.Chesterton, The Napoleon of > Notting Hill > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > |
From: Malcolm R. <mal...@cs...> - 2007-06-05 07:48:32
|
Hi, I've been doing some constraint programming in ECLiPSe prolog, but the language is beginning to really annoy me and I've been thinking about migrating to a different platform. Choco looks like a possibility, but I need to make sure it can do the things I need. Eclipse has an event model whereby you can set an action to occur when a particular event occurs on a variable. Defined events include an event whenever the domain is constrained and an event when the variable is instantiated. Is there an equivalent functionality in Choco? Malcolm -- Many clever men like you have trusted to civilisation. Many clever Babylonians, many clever Egyptians, Many clever men at the end of Rome. - G.K.Chesterton, The Napoleon of Notting Hill |
From: Thierry P. <thi...@em...> - 2007-05-30 15:46:10
|
Hello, With the choco_1_2_04.jar archive, choco.integer.constraints.TimesXYZ has a strange behavior with large domains. This code: public class TestTimesXYZ { public static void testTimesXYZ(int n) { Problem pb = new Problem(); IntDomainVar[] c = new IntDomainVar[2]; c[0] = pb.makeBoundIntVar("a", 1, n); c[1] = pb.makeBoundIntVar("b", 1, n); IntDomainVar ab = pb.makeBoundIntVar("ab", 1, n); pb.post(new TimesXYZ(c[0],c[1],ab)); pb.solve(); if(pb.getSolver().getNbSolutions()>0) { System.out.println(c[0] + ", " + c[1]); } else { System.out.println("no solution"); } } public static void main(String[] args) { testTimesXYZ(103621); testTimesXYZ(103622); } } displays: a:1, b:1 no solution Thanks, Thierry. |
From: Maurice D. <Mau...@en...> - 2007-01-15 15:38:50
|
Bonjour =E0 tous (et meilleurs voeux pour 2007) I just update my cvs snapshot for choco, and see that it was tagged with 1_1_03 version while the public distrib at sourceforges is tagged 1_2_02. Also the cvs version seems to break some of by (not so) old codes. So my questions are - Is the CVS distrib I used deprecated? or simply is there a bug in the cvs version naming shceme? - what is the last version? - is there any change in the API ? Thank for your help. -- Maurice Diamantini |
From: Guillaume R. <Gui...@em...> - 2006-11-18 02:53:44
|
Hi, Yes, it seems there are errors if you use sparse domains and constraints=20 defined in extension. We will correct this problem... Thank you for your help :) -Guillaume Varun Jain a =E9crit : > > Hi again, > > I thought I should give you my test code so that you can run it=20 > yourself. I have included the code at the bottom. Note that the CSP=20 > problem I was experimenting with has changed a bit (however, the=20 > strange behaviour still remains) Heres the new CSP problem: > > Variables: > Variable0, Domain: {4, 2} > Variable1, Domain: {5, 1, 4} > Variable2, Domain: {3, 4, 6} > Variable3, Domain: {1, 2} > Variable4, Domain: {7, 8, 6, 1} > Constraints: > Constraint0, on variables 3 , Allowed tuples: > 1 > Constraint1, on variables 2, 4 , Allowed tuples: > 6, 7 > Constraint2, on variables 2 , Allowed tuples: > 3 > 4 > Constraint3, on variables 4, 1 , Allowed tuples: > 7, 1 > 8, 1 > 6, 5 > 1, 5 > > Heres the output of running the program given below: > > Choco Solutions > 2, 1, 3, 1, 8, > 4, 1, 3, 1, 8, > > As you can see, none of the solutions satisfy constraint1. Still choco=20 > returns these solutions. > Heres my code (BTW, Thanks for taking time out to help me.. I really=20 > appreciate it :-)): > > import choco.Problem; > import choco.Constraint; > import choco.integer.IntDomainVar; > import choco.integer.IntVar; > import java.util.ArrayList; > > /** > * @author Varun Jain (vj) > * @version $Revision$, $Date$ > * @created Nov 17, 2006 > */ > public class ChocoTest { > public static void main(String args[]) { > Problem chocoCSP =3D new Problem(); > IntDomainVar[] vars =3D new IntDomainVar[5]; > Constraint[] cons =3D new Constraint[4]; > //-----Construct all variables > int id =3D 0; > vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++, new int[]{4, 2}); > vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++, new int[]{5, 1, 4}= ); > vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++, new int[]{3, 4, 6}= ); > vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++, new int[]{1, 2}); > vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++, new int[]{7, 8, 6,= 1}); > id =3D 0; > ArrayList<int[]> tuples; > > //-----Now construct all constraints > //-----Constraint0 > tuples =3D new ArrayList<int[]>(); > tuples.add(new int[]{1}); > cons[id] =3D chocoCSP.makeTupleFC(new IntVar[]{vars[3]}, tuples, tr= ue); > chocoCSP.post(cons[id++]); > > //-----Constraint1 > tuples =3D new ArrayList<int[]>(); > tuples.add(new int[]{6, 7}); > cons[id] =3D chocoCSP.makeTupleFC(new IntVar[]{vars[2], vars[4]},=20 > tuples, true); > chocoCSP.post(cons[id++]); > > //-----Constraint2 > tuples =3D new ArrayList<int[]>(); > tuples.add(new int[]{3}); > tuples.add(new int[]{4}); > cons[id] =3D chocoCSP.makeTupleFC(new IntVar[]{vars[2]}, tuples, tr= ue); > chocoCSP.post(cons[id++]); > > //-----Constraint3 > tuples =3D new ArrayList<int[]>(); > tuples.add(new int[]{7, 1}); > tuples.add(new int[]{8, 1}); > tuples.add(new int[]{6, 5}); > tuples.add(new int[]{1, 5}); > cons[id] =3D chocoCSP.makeTupleFC(new IntVar[]{vars[4], vars[1]},=20 > tuples, true); > chocoCSP.post(cons[id++]); > > //-----Now get solutions > System.out.println("Choco Solutions"); > if(chocoCSP.solve() =3D=3D Boolean.TRUE) { > do { > for(int i =3D 0; i < chocoCSP.getNbIntVars(); i ++) { > =20 > System.out.print(((IntDomainVar)chocoCSP.getIntVar(i)).getVal() + ", ")= ; > } > System.out.println(); > } while(chocoCSP.nextSolution() =3D=3D Boolean.TRUE); > } > } > } > > > > > > > > Date: Sat, 18 Nov 2006 00:28:23 +0100 > > From: Gui...@em... > > To: cho...@li... > > Subject: Re: [Choco-users] solveAll() bug? > > > > Hi, > > > > This strange behavior is due to the fact that you use SolveAll() befo= re > > Solve(). SolveAll() and Solve()+nextSolution()'s loop are equivalents > > (in other words you search for all the solutions twice), so usually w= e > > don't do that :) What do you want to do ? > > > > -Guillaume > > > > Varun Jain a =E9crit : > > > Hi, > > > > > > Thank you very much for your quick reply. I guess the real question= I > > > wanted to ask was that if choco could return results even when the > > > problem is infeasible. I did my experiment with the following probl= em: > > > > > > ------------------------------------------------ > > > Variables: > > > Variable0, Domain: {3, 1, 4} > > > Variable1, Domain: {2, 4, 6} > > > Variable2, Domain: {2, 1} > > > Variable3, Domain: {3, 1} > > > Variable4, Domain: {6, 2, 5} > > > > > > Constraints: > > > Constraint0, on variables 2 , Allowed values: > > > 2 > > > Constraint1, on variables 2, 4 , Allowed values: > > > 1, 6 > > > 2, 2 > > > Constraint2, on variables 4, 2 , Allowed values: > > > 5, 2 > > > Constraint3, on variables 1, 3 , Allowed values: > > > 2, 3 > > > ------------------------------------------------------ > > > > > > All the constraints were created using Problem.makeTupleFC(IntVar[] > > > varList, ArrayList tuples, boolean feasible). For example, the firs= t > > > constraint can be created as follows: > > > > > > ------------------------------------------ > > > Problem chocoCSP; > > > /** > > > * Set up the variables using chocoCSP.makeEnumIntVar() > > > */ > > > IntVar[] varList =3D new IntVar[1]; > > > varList[0] =3D variables[2]; > > > ArrayList<int[]> tuples =3D new ArrayList<int[]>(); > > > tuples.add(new int[]{2}); > > > chocoCSP.makeTupleFC(varList, tuples, true); > > > ------------------------------------------------- > > > > > > To obtain solutions, I did the following: > > > > > > ----------------------------------------------- > > > System.out.println("SolveAll says: " + chocoCSP.solveAll()); > > > System.out.println("isFeasible says: " + chocoCSP.isFeasible()); > > > System.out.println("Choco Solutions"); > > > if(chocoCSP.solve() =3D=3D Boolean.TRUE) { > > > do { > > > for(int i =3D 0; i < chocoCSP.getNbIntVars(); i ++) { > > > System.out.print(((IntDomainVar) > > > chocoCSP.getIntVar(i)).getVal() + ", "); > > > } > > > System.out.println(); > > > } while(chocoCSP.nextSolution() =3D=3D Boolean.TRUE); > > > } > > > ----------------------------------------------- > > > > > > Here is the output: > > > > > > SolveAll says: true > > > isFeasible says: false > > > Choco Solutions > > > 1,2,2,3,5, > > > 3,2,2,3,5, > > > 4,2,2,3,5, > > > > > > > > > Clearly, the solutions do not satisfy all the constraints. For > > > instance, none of the solutions satisfy Constraint1. Is this expect= ed > > > behaviour?? > > > > > > Thanks again, > > > -Varun. > > > > > > > > > > > > > > >=20 > -----------------------------------------------------------------------= - > > > > Date: Fri, 17 Nov 2006 11:31:40 +0100 > > > > From: Gui...@em... > > > > To: jai...@ho... > > > > Subject: Re: [Choco-users] solveAll() bug? > > > > > > > > Hi, > > > > > > > > I am not sure to understand what you try to do but i have some > > > answers :) > > > > -SolveAll still return true (it is hardcoded) but you can modify = the > > > > function solveAll() in choco.Problem > > > > > > > > In choco.Problem: > > > > public Boolean solveAll() { > > > > solver.firstSolution =3D false; > > > > solver.generateSearchSolver(this); > > > > solver.launch(); > > > > return Boolean.TRUE; > > > > } > > > > > > > > -What kind of error do you have ? How do you implement the > > > > nextSolution() loop ? > > > > BTW, if you use nextSolution() to display solutions, you can use > > > instead: > > > > > > > > "Solver.setVerbosity(Solver.SOLUTION);" before to begin to solve > > > > and "Solver.flushLogs();" to print solutions > > > > > > > > else: > > > > > > > > if (pb.solve() =3D=3D Boolean.TRUE) { > > > > > > > > do { > > > > //Code > > > > } > > > > } while(pb.nextSolution() =3D=3D Boolean.TRUE); > > > > } > > > > > > > > > > > > I hope it helps you... :) > > > > -Guillaume > > > > > > > > Varun Jain a =E9crit : > > > > > Hi.. > > > > > Is there any reason why the solveAll() method will return true > > > even if > > > > > there is no solution that satisfies all constraints. I was gett= ing > > > > > this behaviour so I did a little experiment: I set up a simple > > > problem > > > > > and executed the following: > > > > > > > > > > Problem chocoCSP; > > > > > //............... > > > > > //-----Set up the problem > > > > > //............... > > > > > System.out.println("SolveAll says: " + chocoCSP.solveAll()); > > > > > System.out.println("isFeasible says: " + chocoCSP.isFeasible())= ; > > > > > > > > > > The following was the output > > > > > > > > > > SolveAll says: true > > > > > isFeasible says: false > > > > > > > > > > I thought solveAll() returns false if no solution exists.=20 > Also, for > > > > > this problem, the solutions I get from the nextSolution()=20 > method do > > > > > not satisfy all constraints. Any explainations would be really > > > helpful? > > > > > > > > > > Thanks, > > > > > -Varun. > > > > > > >=20 > -----------------------------------------------------------------------= - > > > Be one of the first to try Windows Live Mail. > > >=20 > <http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-= 9b0e-4911fb2b2e6d>=20 > > > > > > >=20 > -----------------------------------------------------------------------= - > > > > > >=20 > -----------------------------------------------------------------------= -- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to=20 > share your > > > opinions on IT & business topics through brief surveys - and earn c= ash > > >=20 > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > > >=20 > -----------------------------------------------------------------------= - > > > > > > _______________________________________________ > > > Choco-users mailing list > > > Cho...@li... > > > https://lists.sourceforge.net/lists/listinfo/choco-users > > > > > > > > >=20 > -----------------------------------------------------------------------= -- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to=20 > share your > > opinions on IT & business topics through brief surveys - and earn cas= h > >=20 > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > > _______________________________________________ > > Choco-users mailing list > > Cho...@li... > > https://lists.sourceforge.net/lists/listinfo/choco-users > > -----------------------------------------------------------------------= - > Be one of the first to try Windows Live Mail.=20 > <http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-= 9b0e-4911fb2b2e6d>=20 > > -----------------------------------------------------------------------= - > > -----------------------------------------------------------------------= -- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share= your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > -----------------------------------------------------------------------= - > > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > =20 |
From: Varun J. <jai...@ho...> - 2006-11-18 00:34:44
|
Hi again,I thought I should give you my test code so that you can run it yo= urself. I have included the code at the bottom. Note that the CSP problem I= was experimenting with has changed a bit (however, the strange behaviour s= till remains) Heres the new CSP problem:Variables:Variable0, Domain: {4, 2}= Variable1, Domain: {5, 1, 4}Variable2, Domain: {3, 4, 6}Variable3, Domain: = {1, 2}Variable4, Domain: {7, 8, 6, 1}Constraints:Constraint0, on variables = 3 , Allowed tuples:1Constraint1, on variables 2, 4 , Allowed tuples:6, 7Con= straint2, on variables 2 , Allowed tuples:34Constraint3, on variables 4, 1 = , Allowed tuples:7, 18, 16, 51, 5Heres the output of running the program gi= ven below:Choco Solutions2, 1, 3, 1, 8, 4, 1, 3, 1, 8, As you can see, none= of the solutions satisfy constraint1. Still choco returns these solutions.= Heres my code (BTW, Thanks for taking time out to help me.. I really apprec= iate it :-)):import choco.Problem;import choco.Constraint;import choco.inte= ger.IntDomainVar;import choco.integer.IntVar;import java.util.ArrayList;/**= * @author Varun Jain (vj) * @version $Revision$, $Date$ * @created Nov 17,= 2006 */public class ChocoTest { public static void main(String args[]) { = Problem chocoCSP =3D new Problem(); IntDomainVar[] vars =3D new IntDo= mainVar[5]; Constraint[] cons =3D new Constraint[4]; //-----Construct= all variables int id =3D 0; vars[id] =3D chocoCSP.makeEnumIntVar("v"= + id++, new int[]{4, 2}); vars[id] =3D chocoCSP.makeEnumIntVar("v" + id= ++, new int[]{5, 1, 4}); vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++= , new int[]{3, 4, 6}); vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++, = new int[]{1, 2}); vars[id] =3D chocoCSP.makeEnumIntVar("v" + id++, new i= nt[]{7, 8, 6, 1}); id =3D 0; ArrayList<int[]> tuples; //-----Now c= onstruct all constraints //-----Constraint0 tuples =3D new ArrayList<= int[]>(); tuples.add(new int[]{1}); cons[id] =3D chocoCSP.makeTupleFC= (new IntVar[]{vars[3]}, tuples, true); chocoCSP.post(cons[id++]); //-= ----Constraint1=0A= tuples =3D new ArrayList<int[]>(); tuples.add(new int[]{6, 7}); c= ons[id] =3D chocoCSP.makeTupleFC(new IntVar[]{vars[2], vars[4]}, tuples, tr= ue); chocoCSP.post(cons[id++]); //-----Constraint2=0A= tuples =3D new ArrayList<int[]>(); tuples.add(new int[]{3}); tupl= es.add(new int[]{4}); cons[id] =3D chocoCSP.makeTupleFC(new IntVar[]{var= s[2]}, tuples, true); chocoCSP.post(cons[id++]); //-----Constraint3= =0A= tuples =3D new ArrayList<int[]>(); tuples.add(new int[]{7, 1}); t= uples.add(new int[]{8, 1}); tuples.add(new int[]{6, 5}); tuples.add(n= ew int[]{1, 5}); cons[id] =3D chocoCSP.makeTupleFC(new IntVar[]{vars[4],= vars[1]}, tuples, true); chocoCSP.post(cons[id++]); //-----Now get s= olutions System.out.println("Choco Solutions"); if(chocoCSP.solve() = =3D=3D Boolean.TRUE) { do { for(int i =3D 0; i < chocoCSP.getNb= IntVars(); i ++) { System.out.print(((IntDomainVar)chocoCSP.getInt= Var(i)).getVal() + ", "); } System.out.println(); } whil= e(chocoCSP.nextSolution() =3D=3D Boolean.TRUE); } }}> Date: Sat, 18 Nov= 2006 00:28:23 +0100> From: Gui...@em...> To: choco-users@lists= .sourceforge.net> Subject: Re: [Choco-users] solveAll() bug?> > Hi,> > This= strange behavior is due to the fact that you use SolveAll() before > Solve= (). SolveAll() and Solve()+nextSolution()'s loop are equivalents > (in o= ther words you search for all the solutions twice), so usually we > don't = do that :) What do you want to do ?> > -Guillaume> > Varun Jain a =E9crit := > > Hi,> >> > Thank you very much for your quick reply. I guess the real qu= estion I > > wanted to ask was that if choco could return results even when= the > > problem is infeasible. I did my experiment with the following prob= lem:> >> > ------------------------------------------------> > Variables:> = > Variable0, Domain: {3, 1, 4}> > Variable1, Domain: {2, 4, 6}> > Variable2= , Domain: {2, 1}> > Variable3, Domain: {3, 1}> > Variable4, Domain: {6, 2, = 5}> >> > Constraints:> > Constraint0, on variables 2 , Allowed values:> > 2= > > Constraint1, on variables 2, 4 , Allowed values:> > 1, 6> > 2, 2> > Con= straint2, on variables 4, 2 , Allowed values:> > 5, 2> > Constraint3, on va= riables 1, 3 , Allowed values:> > 2, 3> > ---------------------------------= ---------------------> >> > All the constraints were created using Problem.= makeTupleFC(IntVar[] > > varList, ArrayList tuples, boolean feasible). For = example, the first > > constraint can be created as follows:> >> > --------= ----------------------------------> > Problem chocoCSP;> > /**> > * Set up= the variables using chocoCSP.makeEnumIntVar()> > */> > IntVar[] varList = =3D new IntVar[1];> > varList[0] =3D variables[2];> > ArrayList<int[]> tupl= es =3D new ArrayList<int[]>();> > tuples.add(new int[]{2});> > chocoCSP.mak= eTupleFC(varList, tuples, true);> > ---------------------------------------= ----------> >> > To obtain solutions, I did the following:> >> > ----------= -------------------------------------> > System.out.println("SolveAll s= ays: " + chocoCSP.solveAll());> > System.out.println("isFeasible says: = " + chocoCSP.isFeasible());> > System.out.println("Choco Solutions");> = > if(chocoCSP.solve() =3D=3D Boolean.TRUE) {> > do {> > f= or(int i =3D 0; i < chocoCSP.getNbIntVars(); i ++) {> > System.ou= t.print(((IntDomainVar) > > chocoCSP.getIntVar(i)).getVal() + ", ");> > = }> > System.out.println();> > } while(chocoCSP.nextSolut= ion() =3D=3D Boolean.TRUE);> > }> > -----------------------------------= ------------> >> > Here is the output:> >> > SolveAll says: true> > isFeasi= ble says: false> > Choco Solutions> > 1,2,2,3,5,> > 3,2,2,3,5,> > 4,2,2,3,5= ,> >> >> > Clearly, the solutions do not satisfy all the constraints. For >= > instance, none of the solutions satisfy Constraint1. Is this expected > = > behaviour??> >> > Thanks again,> > -Varun.> >> >> >> >> > ---------------= ---------------------------------------------------------> > > Date: Fri, 1= 7 Nov 2006 11:31:40 +0100> > > From: Gui...@em...> > > To: jain= _v...@ho...> > > Subject: Re: [Choco-users] solveAll() bug?> > >> > = > Hi,> > >> > > I am not sure to understand what you try to do but i have s= ome > > answers :)> > > -SolveAll still return true (it is hardcoded) but y= ou can modify the> > > function solveAll() in choco.Problem> > >> > > In ch= oco.Problem:> > > public Boolean solveAll() {> > > solver.firstSolution =3D= false;> > > solver.generateSearchSolver(this);> > > solver.launch();> > > = return Boolean.TRUE;> > > }> > >> > > -What kind of error do you have ? How= do you implement the> > > nextSolution() loop ?> > > BTW, if you use nextS= olution() to display solutions, you can use > > instead:> > >> > > "Solver.= setVerbosity(Solver.SOLUTION);" before to begin to solve> > > and "Solver.f= lushLogs();" to print solutions> > >> > > else:> > >> > > if (pb.solve() = =3D=3D Boolean.TRUE) {> > >> > > do {> > > //Code> > > }> > > } while(pb.ne= xtSolution() =3D=3D Boolean.TRUE);> > > }> > >> > >> > > I hope it helps yo= u... :)> > > -Guillaume> > >> > > Varun Jain a =E9crit :> > > > Hi..> > > >= Is there any reason why the solveAll() method will return true > > even if= > > > > there is no solution that satisfies all constraints. I was getting>= > > > this behaviour so I did a little experiment: I set up a simple > > p= roblem> > > > and executed the following:> > > >> > > > Problem chocoCSP;> = > > > //...............> > > > //-----Set up the problem> > > > //.........= ......> > > > System.out.println("SolveAll says: " + chocoCSP.solveAll());>= > > > System.out.println("isFeasible says: " + chocoCSP.isFeasible());> > = > >> > > > The following was the output> > > >> > > > SolveAll says: true> = > > > isFeasible says: false> > > >> > > > I thought solveAll() returns fal= se if no solution exists. Also, for> > > > this problem, the solutions I ge= t from the nextSolution() method do> > > > not satisfy all constraints. Any= explainations would be really > > helpful?> > > >> > > > Thanks,> > > > -V= arun.> > >> > -------------------------------------------------------------= -----------> > Be one of the first to try Windows Live Mail. > > <http://id= eas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-4911fb2b2= e6d> > >> > ---------------------------------------------------------------= ---------> >> > -----------------------------------------------------------= --------------> > Take Surveys. Earn Cash. Influence the Future of IT> > Jo= in SourceForge.net's Techsay panel and you'll get the chance to share your>= > opinions on IT & business topics through brief surveys - and earn cash> = > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV> > -----------------------------------------------------------------= -------> >> > _______________________________________________> > Choco-user= s mailing list> > Cho...@li...> > https://lists.source= forge.net/lists/listinfo/choco-users> > > > > ---------------------------= ----------------------------------------------> Take Surveys. Earn Cash. In= fluence the Future of IT> Join SourceForge.net's Techsay panel and you'll g= et the chance to share your> opinions on IT & business topics through brief= surveys - and earn cash> http://www.techsay.com/default.php?page=3Djoin.ph= p&p=3Dsourceforge&CID=3DDEVDEV> ___________________________________________= ____> Choco-users mailing list> Cho...@li...> https://= lists.sourceforge.net/lists/listinfo/choco-users _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |
From: Varun J. <jai...@ho...> - 2006-11-17 23:47:35
|
Hi,Thanks again for your reply. Actually I included SolveAll() later in an = attempt to try and understand whats wrong. Basically, I wanted to extract a= ll solutions if any exists. So I did the following: System.out.println("= Choco Solutions"); if(chocoCSP.solve() =3D=3D Boolean.TRUE) { do { = for(int i =3D 0; i < chocoCSP.getNbIntVars(); i ++) { Syste= m.out.print(((IntDomainVar)chocoCSP.getIntVar(i)).getVal() + ", "); = } System.out.println(); } while(chocoCSP.nextSolution() =3D=3D = Boolean.TRUE); }And the output was still the following:Choco Solutions1,= 2,2,3,5,3,2,2,3,5,4,2,2,3,5,I included the SolveAll() and isFeasible() meth= ods later since the above was not working. So even in the absence of SolveA= ll() I get the strange behaviour.-Varun.> Date: Sat, 18 Nov 2006 00:28:23 += 0100> From: Gui...@em...> To: cho...@li...= > Subject: Re: [Choco-users] solveAll() bug?> > Hi,> > This strange behavio= r is due to the fact that you use SolveAll() before > Solve(). SolveAll() = and Solve()+nextSolution()'s loop are equivalents > (in other words you s= earch for all the solutions twice), so usually we > don't do that :) What = do you want to do ?> > -Guillaume> > Varun Jain a =E9crit :> > Hi,> >> > Th= ank you very much for your quick reply. I guess the real question I > > wan= ted to ask was that if choco could return results even when the > > problem= is infeasible. I did my experiment with the following problem:> >> > -----= -------------------------------------------> > Variables:> > Variable0, Dom= ain: {3, 1, 4}> > Variable1, Domain: {2, 4, 6}> > Variable2, Domain: {2, 1}= > > Variable3, Domain: {3, 1}> > Variable4, Domain: {6, 2, 5}> >> > Constra= ints:> > Constraint0, on variables 2 , Allowed values:> > 2> > Constraint1,= on variables 2, 4 , Allowed values:> > 1, 6> > 2, 2> > Constraint2, on var= iables 4, 2 , Allowed values:> > 5, 2> > Constraint3, on variables 1, 3 , A= llowed values:> > 2, 3> > -------------------------------------------------= -----> >> > All the constraints were created using Problem.makeTupleFC(IntV= ar[] > > varList, ArrayList tuples, boolean feasible). For example, the fir= st > > constraint can be created as follows:> >> > ------------------------= ------------------> > Problem chocoCSP;> > /**> > * Set up the variables u= sing chocoCSP.makeEnumIntVar()> > */> > IntVar[] varList =3D new IntVar[1]= ;> > varList[0] =3D variables[2];> > ArrayList<int[]> tuples =3D new ArrayL= ist<int[]>();> > tuples.add(new int[]{2});> > chocoCSP.makeTupleFC(varList,= tuples, true);> > -------------------------------------------------> >> > = To obtain solutions, I did the following:> >> > ---------------------------= --------------------> > System.out.println("SolveAll says: " + chocoCSP= .solveAll());> > System.out.println("isFeasible says: " + chocoCSP.isFe= asible());> > System.out.println("Choco Solutions");> > if(chocoCSP= .solve() =3D=3D Boolean.TRUE) {> > do {> > for(int i =3D 0; i= < chocoCSP.getNbIntVars(); i ++) {> > System.out.print(((IntDoma= inVar) > > chocoCSP.getIntVar(i)).getVal() + ", ");> > }> > = System.out.println();> > } while(chocoCSP.nextSolution() =3D=3D Bool= ean.TRUE);> > }> > -----------------------------------------------> >> = > Here is the output:> >> > SolveAll says: true> > isFeasible says: false> = > Choco Solutions> > 1,2,2,3,5,> > 3,2,2,3,5,> > 4,2,2,3,5,> >> >> > Clearl= y, the solutions do not satisfy all the constraints. For > > instance, none= of the solutions satisfy Constraint1. Is this expected > > behaviour??> >>= > Thanks again,> > -Varun.> >> >> >> >> > --------------------------------= ----------------------------------------> > > Date: Fri, 17 Nov 2006 11:31:= 40 +0100> > > From: Gui...@em...> > > To: jai...@ho...= m> > > Subject: Re: [Choco-users] solveAll() bug?> > >> > > Hi,> > >> > > I= am not sure to understand what you try to do but i have some > > answers := )> > > -SolveAll still return true (it is hardcoded) but you can modify the= > > > function solveAll() in choco.Problem> > >> > > In choco.Problem:> > >= public Boolean solveAll() {> > > solver.firstSolution =3D false;> > > solv= er.generateSearchSolver(this);> > > solver.launch();> > > return Boolean.TR= UE;> > > }> > >> > > -What kind of error do you have ? How do you implement= the> > > nextSolution() loop ?> > > BTW, if you use nextSolution() to disp= lay solutions, you can use > > instead:> > >> > > "Solver.setVerbosity(Solv= er.SOLUTION);" before to begin to solve> > > and "Solver.flushLogs();" to p= rint solutions> > >> > > else:> > >> > > if (pb.solve() =3D=3D Boolean.TRUE= ) {> > >> > > do {> > > //Code> > > }> > > } while(pb.nextSolution() =3D=3D= Boolean.TRUE);> > > }> > >> > >> > > I hope it helps you... :)> > > -Guill= aume> > >> > > Varun Jain a =E9crit :> > > > Hi..> > > > Is there any reaso= n why the solveAll() method will return true > > even if> > > > there is no= solution that satisfies all constraints. I was getting> > > > this behavio= ur so I did a little experiment: I set up a simple > > problem> > > > and e= xecuted the following:> > > >> > > > Problem chocoCSP;> > > > //...........= ....> > > > //-----Set up the problem> > > > //...............> > > > Syste= m.out.println("SolveAll says: " + chocoCSP.solveAll());> > > > System.out.p= rintln("isFeasible says: " + chocoCSP.isFeasible());> > > >> > > > The foll= owing was the output> > > >> > > > SolveAll says: true> > > > isFeasible sa= ys: false> > > >> > > > I thought solveAll() returns false if no solution e= xists. Also, for> > > > this problem, the solutions I get from the nextSolu= tion() method do> > > > not satisfy all constraints. Any explainations woul= d be really > > helpful?> > > >> > > > Thanks,> > > > -Varun.> > >> > -----= -------------------------------------------------------------------> > Be o= ne of the first to try Windows Live Mail. > > <http://ideas.live.com/progra= mpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-4911fb2b2e6d> > >> > -------= -----------------------------------------------------------------> >> > ---= ----------------------------------------------------------------------> > T= ake Surveys. Earn Cash. Influence the Future of IT> > Join SourceForge.net'= s Techsay panel and you'll get the chance to share your> > opinions on IT &= business topics through brief surveys - and earn cash> > http://www.techsa= y.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV> > ---------= ---------------------------------------------------------------> >> > _____= __________________________________________> > Choco-users mailing list> > C= hoc...@li...> > https://lists.sourceforge.net/lists/lis= tinfo/choco-users> > > > > ----------------------------------------------= ---------------------------> Take Surveys. Earn Cash. Influence the Future = of IT> Join SourceForge.net's Techsay panel and you'll get the chance to sh= are your> opinions on IT & business topics through brief surveys - and earn= cash> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&C= ID=3DDEVDEV> _______________________________________________> Choco-users m= ailing list> Cho...@li...> https://lists.sourceforge.n= et/lists/listinfo/choco-users _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |
From: Guillaume R. <Gui...@em...> - 2006-11-17 23:29:33
|
Hi, This strange behavior is due to the fact that you use SolveAll() before=20 Solve(). SolveAll() and Solve()+nextSolution()'s loop are equivalents=20 (in other words you search for all the solutions twice), so usually we=20 don't do that :) What do you want to do ? -Guillaume Varun Jain a =E9crit : > Hi, > > Thank you very much for your quick reply. I guess the real question I=20 > wanted to ask was that if choco could return results even when the=20 > problem is infeasible. I did my experiment with the following problem: > > ------------------------------------------------ > Variables: > Variable0, Domain: {3, 1, 4} > Variable1, Domain: {2, 4, 6} > Variable2, Domain: {2, 1} > Variable3, Domain: {3, 1} > Variable4, Domain: {6, 2, 5} > > Constraints: > Constraint0, on variables 2 , Allowed values: > 2 > Constraint1, on variables 2, 4 , Allowed values: > 1, 6 > 2, 2 > Constraint2, on variables 4, 2 , Allowed values: > 5, 2 > Constraint3, on variables 1, 3 , Allowed values: > 2, 3 > ------------------------------------------------------ > > All the constraints were created using Problem.makeTupleFC(IntVar[]=20 > varList, ArrayList tuples, boolean feasible). For example, the first=20 > constraint can be created as follows: > > ------------------------------------------ > Problem chocoCSP; > /** > * Set up the variables using chocoCSP.makeEnumIntVar() > */ > IntVar[] varList =3D new IntVar[1]; > varList[0] =3D variables[2]; > ArrayList<int[]> tuples =3D new ArrayList<int[]>(); > tuples.add(new int[]{2}); > chocoCSP.makeTupleFC(varList, tuples, true); > ------------------------------------------------- > > To obtain solutions, I did the following: > > ----------------------------------------------- > System.out.println("SolveAll says: " + chocoCSP.solveAll()); > System.out.println("isFeasible says: " + chocoCSP.isFeasible()); > System.out.println("Choco Solutions"); > if(chocoCSP.solve() =3D=3D Boolean.TRUE) { > do { > for(int i =3D 0; i < chocoCSP.getNbIntVars(); i ++) { > System.out.print(((IntDomainVar)=20 > chocoCSP.getIntVar(i)).getVal() + ", "); > } > System.out.println(); > } while(chocoCSP.nextSolution() =3D=3D Boolean.TRUE); > } > ----------------------------------------------- > > Here is the output: > > SolveAll says: true > isFeasible says: false > Choco Solutions > 1,2,2,3,5, > 3,2,2,3,5, > 4,2,2,3,5, > > > Clearly, the solutions do not satisfy all the constraints. For=20 > instance, none of the solutions satisfy Constraint1. Is this expected=20 > behaviour?? > > Thanks again, > -Varun. > > > > > -----------------------------------------------------------------------= - > > Date: Fri, 17 Nov 2006 11:31:40 +0100 > > From: Gui...@em... > > To: jai...@ho... > > Subject: Re: [Choco-users] solveAll() bug? > > > > Hi, > > > > I am not sure to understand what you try to do but i have some=20 > answers :) > > -SolveAll still return true (it is hardcoded) but you can modify the > > function solveAll() in choco.Problem > > > > In choco.Problem: > > public Boolean solveAll() { > > solver.firstSolution =3D false; > > solver.generateSearchSolver(this); > > solver.launch(); > > return Boolean.TRUE; > > } > > > > -What kind of error do you have ? How do you implement the > > nextSolution() loop ? > > BTW, if you use nextSolution() to display solutions, you can use=20 > instead: > > > > "Solver.setVerbosity(Solver.SOLUTION);" before to begin to solve > > and "Solver.flushLogs();" to print solutions > > > > else: > > > > if (pb.solve() =3D=3D Boolean.TRUE) { > > > > do { > > //Code > > } > > } while(pb.nextSolution() =3D=3D Boolean.TRUE); > > } > > > > > > I hope it helps you... :) > > -Guillaume > > > > Varun Jain a =E9crit : > > > Hi.. > > > Is there any reason why the solveAll() method will return true=20 > even if > > > there is no solution that satisfies all constraints. I was getting > > > this behaviour so I did a little experiment: I set up a simple=20 > problem > > > and executed the following: > > > > > > Problem chocoCSP; > > > //............... > > > //-----Set up the problem > > > //............... > > > System.out.println("SolveAll says: " + chocoCSP.solveAll()); > > > System.out.println("isFeasible says: " + chocoCSP.isFeasible()); > > > > > > The following was the output > > > > > > SolveAll says: true > > > isFeasible says: false > > > > > > I thought solveAll() returns false if no solution exists. Also, for > > > this problem, the solutions I get from the nextSolution() method do > > > not satisfy all constraints. Any explainations would be really=20 > helpful? > > > > > > Thanks, > > > -Varun. > > > -----------------------------------------------------------------------= - > Be one of the first to try Windows Live Mail.=20 > <http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-= 9b0e-4911fb2b2e6d>=20 > > -----------------------------------------------------------------------= - > > -----------------------------------------------------------------------= -- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share= your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > -----------------------------------------------------------------------= - > > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > =20 |
From: Varun J. <jai...@ho...> - 2006-11-17 19:20:35
|
=0A= =0A= =0A= =0A= =0A= Hi,Thank you very much for your quick reply. I=0A= guess the real question I wanted to ask was that if choco could return=0A= results even when the problem is infeasible. I did my experiment with=0A= the following problem:------------------------------------------------Varia= bles:Variable0, Domain: {3, 1, 4}Variable1, Domain: {2, 4, 6}Variable2, Dom= ain: {2, 1}Variable3, Domain: {3, 1}Variable4, Domain: {6, 2, 5}Constraints= :Constraint0, on variables 2 , Allowed values:2Constraint1, on variables 2,= 4 , Allowed values:1, 62, 2Constraint2, on variables 4, 2 , Allowed values= :5, 2Constraint3, on variables 1, 3 , Allowed values:2, 3------------------= ------------------------------------All=0A= the constraints were created using Problem.makeTupleFC(IntVar[]=0A= varList, ArrayList tuples, boolean feasible). For example, the first=0A= constraint can be created as follows:--------------------------------------= ----Problem chocoCSP;/** * Set up the variables using chocoCSP.makeEnumIntV= ar() */IntVar[] varList =3D new IntVar[1];varList[0] =3D variables[2];Array= List<int[]> tuples =3D new ArrayList<int[]>();tuples.add(new int[]{2});choc= oCSP.makeTupleFC(varList, tuples, true);-----------------------------------= --------------To obtain solutions, I did the following:--------------------= --------------------------- System.out.println("SolveAll says: " + choco= CSP.solveAll()); System.out.println("isFeasible says: " + chocoCSP.isFea= sible()); System.out.println("Choco Solutions"); if(chocoCSP.solve() = =3D=3D Boolean.TRUE) { do { for(int i =3D 0; i < chocoCSP.getNb= IntVars(); i ++) { System.out.print(((IntDomainVar) chocoCSP.getIn= tVar(i)).getVal() + ", "); } System.out.println(); } whi= le(chocoCSP.nextSolution() =3D=3D Boolean.TRUE); }----------------------= -------------------------Here is the output:SolveAll says: trueisFeasible s= ays: falseChoco Solutions1,2,2,3,5,3,2,2,3,5,4,2,2,3,5,Clearly,=0A= the solutions do not satisfy all the constraints. For instance, none of=0A= the solutions satisfy Constraint1. Is this expected behaviour??Thanks again= ,-Varun.> Date: Fri, 17 Nov 2006 11:31:40 +0100> From: Guillaume.Richaud@em= n.fr> To: jai...@ho...> Subject: Re: [Choco-users] solveAll() bug= ?> > Hi,> > I am not sure to understand what you try to do but i have some = answers :)> -SolveAll still return true (it is hardcoded) but you can modif= y the > function solveAll() in choco.Problem> > In choco.Problem:> public= Boolean solveAll() {> solver.firstSolution =3D false;> solver.gene= rateSearchSolver(this);> solver.launch();> return Boolean.TRUE;> = }> > -What kind of error do you have ? How do you implement the > nextSolut= ion() loop ?> BTW, if you use nextSolution() to display solutions, you can = use instead:> > "Solver.setVerbosity(Solver.SOLUTION);" before to begin to = solve> and "Solver.flushLogs();" to print solutions> > else:> > if (pb.solv= e() =3D=3D Boolean.TRUE) {> > do {> //Code> }> } while(pb.nextSolu= tion() =3D=3D Boolean.TRUE);> }> > > I hope it helps you... :)> -Guillaume>= > Varun Jain a =E9crit :> > Hi..> > Is there any reason why the solveAll()= method will return true even if > > there is no solution that satisfies al= l constraints. I was getting > > this behaviour so I did a little experimen= t: I set up a simple problem > > and executed the following: > > > > Probl= em chocoCSP; > > //............... > > //-----Set up the problem > > //....= ........... > > System.out.println("SolveAll says: " + chocoCSP.solveAll())= ; > > System.out.println("isFeasible says: " + chocoCSP.isFeasible()); > > = > > The following was the output > > > > SolveAll says: true > > isFeasib= le says: false > > > > I thought solveAll() returns false if no solution e= xists. Also, for > > this problem, the solutions I get from the nextSolutio= n() method do > > not satisfy all constraints. Any explainations would be r= eally helpful? > > > > Thanks, > > -Varun. >=20 _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |
From: Varun J. <jai...@ho...> - 2006-11-17 01:33:00
|
Hi..Is there any reason why the solveAll() method will return true even if= =0A= there is no solution that satisfies all constraints. I was getting=0A= this behaviour so I did a little experiment: I set up a simple problem=0A= and executed the following: =0A= =0A= Problem chocoCSP; =0A= //............... =0A= //-----Set up the problem =0A= //............... =0A= System.out.println("SolveAll says: " + chocoCSP.solveAll()); =0A= System.out.println("isFeasible says: " + chocoCSP.isFeasible()); =0A= =0A= The following was the output =0A= =0A= SolveAll says: true =0A= isFeasible says: false =0A= =0A= I thought solveAll() returns false if no solution exists. Also, for=0A= this problem, the solutions I get from the nextSolution() method do not=0A= satisfy all constraints. Any explainations would be really helpful? =0A= =0A= Thanks, =0A= -Varun.=0A= =09 _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |
From: Hadrien <had...@em...> - 2006-07-28 20:48:20
|
Bonjour =E0 tous, Effectivement, ce probl=E8me sur les limites est corrig=E9 sur la = version CVS.=20 Les limites n'=E9taient v=E9rifi=E9es qu'=E0 l'ouverture d'un nouveau = noeud. En atteignant une limite, le solveur =E9tait oblig=E9 de backtracker jusqu'en haut de l'arbre en "fermant" = chaque noeud un =E0 un ce qui peut =EAtre tr=E8s long avec une propagation co=FBteuse et un arbre tr=E8s = profond. Hadrien ----- Original Message -----=20 From: Emilien Gorisse=20 To: cho...@li...=20 Sent: Tuesday, July 25, 2006 1:19 PM Subject: [Choco-users] une latence chez choco ? bonjour,=20 =E9tudiant en deuxi=E8me ann=E9e d'=E9cole d'ing=E9nieur en = informatique =E0 l'ENSIIE (ex IIE), j'utilise actuellement choco pour des probl=E8mes d'aide =E0 la d=E9cision multicrit=E8re. je manipule donc un grand nombre de variables (souvent plusieur milliers, voire plusieurs dizaines de milliers), avec autant de contraintes, et j'ai remarqu=E9 une certaine "latence" de choco. je m'explique. le solver trouve un certain nombre de solutions, jusqu'au "timeLimit" (jusque l=E0, aucun souci !). Mais l=E0, quand il y a = beaucoup de variables, il donne l'impression de s'arr=EAter, et d'"attendre", sans chercher, et apparemment, sans rien faire. Cette latence peut parfois, quand le jeu de donn=E9es est tr=E8s grand (et avec beaucoup de contrainte, m'a-t-il sembl=E9), durer jusqu'=E0 une heure, voire plus ! Avez-vous d=E9j=E0 identifi=E9 ce ph=E9nom=E8ne, et, si oui, = savez-vous =E0 quoi il est d=FB et comment le contourner (si cela est possible) ? Je vous remercie pour l'int=E9r=EAt que vous portez =E0 ma requ=EAte. cordialement, Emilien Gorisse < choco fan > -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to = share your opinions on IT & business topics through brief surveys -- and earn = cash = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Choco-users mailing list Cho...@li... https://lists.sourceforge.net/lists/listinfo/choco-users |
From: Emilien G. <emi...@ev...> - 2006-07-25 11:19:55
|
bonjour,=20 =E9tudiant en deuxi=E8me ann=E9e d'=E9cole d'ing=E9nieur en informatique =E0 l'ENSIIE (ex IIE), j'utilise actuellement choco pour des probl=E8mes d'aide =E0 la d=E9cision multicrit=E8re. je manipule donc un grand nombre de variables (souvent plusieur milliers, voire plusieurs dizaines de milliers), avec autant de contraintes, et j'ai remarqu=E9 une certaine "latence" de choco. je m'explique. le solver trouve un certain nombre de solutions, jusqu'au "timeLimit" (jusque l=E0, aucun souci !). Mais l=E0, quand il y a = beaucoup de variables, il donne l'impression de s'arr=EAter, et d'"attendre", sans chercher, et apparemment, sans rien faire. Cette latence peut parfois, quand le jeu de donn=E9es est tr=E8s grand (et avec beaucoup de contrainte, m'a-t-il sembl=E9), durer jusqu'=E0 une heure, voire plus ! Avez-vous d=E9j=E0 identifi=E9 ce ph=E9nom=E8ne, et, si oui, savez-vous =E0 quoi il est d=FB et comment le contourner (si cela est possible) ? Je vous remercie pour l'int=E9r=EAt que vous portez =E0 ma requ=EAte. cordialement, Emilien Gorisse < choco fan > |
From: Eric A. <am...@ev...> - 2006-06-06 21:17:57
|
Hi all, First of all, thanks for the 1.1.03.jar and the updates to CVS. I've tried the new Solver.setVerbosity(), but nothing comes out, even in PROPAGATION setting. Looking into the code, there seems to be other loggers not activated, and also verbosity code set at level "finer" or "finest", under the INFO = level. ** choco.prop.const ** choco.mem Any suggestions ? --Eric |