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: <ig...@so...> - 2005-06-30 15:26:10
|
this is the stack of the launched exception Exception in thread "main" java.lang.UnsupportedOperationException at choco.AbstractConstraint.opposite(Unknown Source) at choco.bool.AbstractLargeBoolConstraintWithCounterOpposite.<init>(Unknown Source) at choco.bool.LargeDisjunction.<init>(Unknown Source) at choco.Problem.makeDisjunction(Unknown Source) at choco.Problem.or(Unknown Source) at ProvaVincoli.postConstraints(ProvaVincoli.java:40) at ProvaVincoli.<init>(ProvaVincoli.java:13) at ProvaVincoli.main(ProvaVincoli.java:45) This is the piece of code: //------------------------------------------------------- import java.io.*; import java.util.*; import choco.*; import choco.integer.*; public class ProvaVincoli { Problem p = null; public ProvaVincoli() { p = new Problem(); postConstraints(); } private void postConstraints() {int dim = 5; Constraint [] c = new Constraint[dim]; IntVar [] v = new IntVar[dim]; int prezzoMax = 100; c = new Constraint[dim]; IntVar varPrezzoMax = p.makeEnumIntVar("price",prezzoMax,prezzoMax); int prezzoVoloFinale = 98; for(int i=0; i< dim; i++) { v[i] = p.makeBoundIntVar("V"+i,0,dim-1); c[i] = p.ifOnlyIf( p.leq(prezzoVoloFinale , varPrezzoMax) , p.eq(v[i], i) ); prezzoVoloFinale++; } //--now comes the line that launches the exception p.post(p.or(c)); } public static void main(String []s) {new ProvaVincoli(); } } //------------------------------------------------------- someone has any clue? thanks |
From: C. <co...@li...> - 2005-06-29 10:57:51
|
Le jeudi 23 juin 2005 =E0 08:35 -0600, ig...@so... a =E9crit : > The scenario of our little application is this: >=20 > int k =3D 4; > int q =3D 2; > Problem p =3D new Problem(); > IntVar a =3D p.makeBoundIntVar("foo",1,3); > IntVar b =3D p.makeBoundIntVar("foo2",1,3); > Constraint one =3D p.leq(a, k);=20 >=20 > We want to create another constraint, saying that if the value of IntVa= r "b"=20 > is (let's say) 5 (and only in this case), then the constraint "one" mus= t be=20 > modified to something like this: p.leq(a, k*(q+1)) > The new constraint is weaker than the older one, so they can't cohexist= .=20 >=20 > We don't want to check explicitly the values, we want to demand all the= =20 > dirty work to choco :) > Is that possible?=20 Hello, Someone probably already answer you... Anyway bellow is a solution: Since what you call the "new constraint" will always be verified (it is weaker that constraint "one") you can post it from the begining... To capture the fact that "5" is a special value you then post the constraint pb.implies(pb.neq(b,5),pb.leq(a,k)) ! Hope it helps, -- Remi |
From: <ig...@so...> - 2005-06-23 14:35:55
|
The scenario of our little application is this: int k = 4; int q = 2; Problem p = new Problem(); IntVar a = p.makeBoundIntVar("foo",1,3); IntVar b = p.makeBoundIntVar("foo2",1,3); Constraint one = p.leq(a, k); We want to create another constraint, saying that if the value of IntVar "b" is (let's say) 5 (and only in this case), then the constraint "one" must be modified to something like this: p.leq(a, k*(q+1)) The new constraint is weaker than the older one, so they can't cohexist. We don't want to check explicitly the values, we want to demand all the dirty work to choco :) Is that possible? thanks! |
From: Hadrien C. <had...@em...> - 2005-06-17 13:02:30
|
Hi, You can see here an example of code where we ask for all solution one by one (values are directly accessible in variables, no need of s.getSearchSolver().solutions.get(0) anymore) for a problem only stating that 2*x + 3*y <= 10 as you requested : (It uses the method scalar that takes coefficients and variables in argument to express a scalar product and leq means "less than equal") public static void main(String[] args) { Problem pb = new Problem(); IntVar x = pb.makeEnumIntVar("x",0,10); IntVar y = pb.makeEnumIntVar("y",0,10); pb.post(pb.leq(pb.scalar(new int[]{2,3},new IntVar[]{x,y}),10)); pb.solve(); if (pb.isFeasible() == Boolean.TRUE) { do { System.out.println("x : " + x.getVal() + " y : " + y.getVal()); } while(pb.nextSolution() == Boolean.TRUE); } } Hope ot helps Hadrien ----- Original Message ----- From: "Matthieu Pichaud" <ma...@gm...> To: <cho...@li...> Sent: Wednesday, June 15, 2005 6:02 PM Subject: [Choco-users] Modeling and retrieving all solutions > Hi, > > I have two questions: > > - I would like to retrieve all the solutions of my problem. But, as I read > and experienced, the number of solutions one can retrieve is limited to > 5. You proposed to use a while loop on the condition pb.nextSolution() > to get all the results. I don't really see how to implement that. When doing > so, the functions s.getSearchSolver().solutions.get(0) becomes irrelevant > and I have no clue where to find the next result. > > - I try to retrieve all interger solutions from a Integer Programming > problem. > I don't know how to multiply an integer variable by an integer value in > order to add a constraint of this kind: 2*x + 3*y <= 10 > > Thanks a lot for your help! > > Matth > > -- > Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis > ++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++ > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > |
From: Matthieu P. <ma...@gm...> - 2005-06-15 16:02:12
|
Hi, I have two questions: - I would like to retrieve all the solutions of my problem. But, as I read and experienced, the number of solutions one can retrieve is limited to 5. You proposed to use a while loop on the condition pb.nextSolution() to get all the results. I don't really see how to implement that. When doing so, the functions s.getSearchSolver().solutions.get(0) becomes irrelevant and I have no clue where to find the next result. - I try to retrieve all interger solutions from a Integer Programming problem. I don't know how to multiply an integer variable by an integer value in order to add a constraint of this kind: 2*x + 3*y <= 10 Thanks a lot for your help! Matth -- Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis ++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++ |
From: C. <co...@li...> - 2005-05-05 07:57:06
|
Le mercredi 04 mai 2005 =E0 22:21 +0200, Carlos Carreira a =E9crit : Bonjour Carlos, Je suis pas d=E9veloppeur de Choco, mais je pense pouvoir te r=E9pondre sur ce point. Je fais confiance =E0 Hadrien ou Guillaume pour me reprendre si je dis une boulette :) > - la PROPAGATION fonctionne-t-elle avec AC2001? toujours? que l'on=20 > ait affaire =E0 des contraintes binaires ou n-aires (n>2)? Il n'y a pas a proprement parler de propagation "standard" dans Choco, chaque contrainte =E0 un propagateur associ=E9 (qui est r=E9veill=E9 par = des =E9v=E8nements du type AwakeOnRem, AwakeOnInf...): - AC3BinTable est une contrainte binaire en extension dont le propagateur impl=E9mente AC3. - AC3BinTable idem mais avec AC4 - pb.feasTuple(IntVar[] vars, java.util.ArrayList tuples) est une contrainte n-aire en extension dont le propagateur ne fait "que" FC=20 > - la RESOLUTION se fait-elle avec BACKTRACKING en collaboration ave= c=20 > AC2001, ou avec FORWARD CHECKING avec/sans AC2001? que l'on ait affaire= =20 > =E0 des contraintes binaires ou n-aires (n>2)? Si tu utilises un choco.Problem, l'exploration se fait dans l'ordre d'un backtrack, mais avec les propagateurs des contraintes qui permetent=20 d'=E9lager des branches. Si tu as un pb n'utilisant que des pb.feasTuple tu auras du FC, que des AC3BinTable -> du AC3. Il existe d'autre composantes "search" dans le projet, mais ton Pb ne sera plus un choco.Problem, mais un choco.palm.JumpProblem par ex... > - votre FORWARD CHECKING utilise-t-il une heuristique? est-ce MRV=20 > (Minimum/Maximum Remaining Values)? Tu peux changer l'heuristique de choix de variables avec=20 pb.getSolver().setVarSelector() et de choix de valeur avec pb.getSolver().setValIterator(). Le comportement par d=E9faut est "Min Dom / Max Degr=E9" pour les vars et ordre lexical croissant pour les valeurs. Voil=E0 PS: je crois que la langue "officielle" de la liste est l'anglais ;-) -- R=E9mi COLETTA |
From: Carlos C. <clo...@st...> - 2005-05-04 20:21:29
|
Je vous ai d=E9j=E0 envoy=E9 un mail fin f=E9vrier, mais je me repr=E9sen= te, Je me nomme Carlos CARREIRA, je suis =E9tudiant en 2=E8me Licence=20 Informatique (d=E9rni=E8re ann=E9e) =E0 l'UCL (Universit=E9 Catholique de= =20 Louvail-la-Neuve, Belgique). Pour mon m=E9moire je dois impl=E9menter un algorithme de recherche de=20 chemins contraints dans des graphes -Path- en Java-Choco. Mon algorithme est pratiquement fini et lorsque ce sera le cas et apr=E8s= =20 mon m=E9moire, ce sera un r=E9el plaisir de vous l'envoyer afin, qui sait= ,=20 de l'int=E9grer =E0 une future version de Java-Choco. OBJET DE MON MAIL: Je dois rendre bient=F4t la partie th=E9orique de mon m=E9moire et, malgr= =E9 mes=20 recherches sur internet, des questions importantes sur le fonctionnement=20 de Java-Choco subsistent: - la PROPAGATION fonctionne-t-elle avec AC2001? toujours? que l'on=20 ait affaire =E0 des contraintes binaires ou n-aires (n>2)? - la RESOLUTION se fait-elle avec BACKTRACKING en collaboration avec=20 AC2001, ou avec FORWARD CHECKING avec/sans AC2001? que l'on ait affaire=20 =E0 des contraintes binaires ou n-aires (n>2)? - votre FORWARD CHECKING utilise-t-il une heuristique? est-ce MRV=20 (Minimum/Maximum Remaining Values)? J'ai pos=E9 des questions assez explicites qui t=E9moignent de mes=20 recherches sur le sujet, mais n'h=E9sitez pas =E0 vous =E9tendre sur le s= ujet=20 dans votre r=E9ponse. Un grand merci Carlos CARREIRA |
From: Zangitu M. <MZa...@ik...> - 2005-04-04 18:01:57
|
Hello, I"m now using choco to do some simple check. Here is my program:=20 import choco.Problem; import choco.integer.IntVar; import choco.Constraint; public class test { public static void main(String[] args) { Problem myPb =3D new Problem(); IntVar a =3D myPb.makeEnumIntVar("A", 0, 1); IntVar b =3D myPb.makeEnumIntVar("B", 0, 1); Constraint c1 =3D myPb.eq(a, 0); Constraint c2 =3D myPb.eq(b, 1); Constraint c3 =3D myPb.ifThen( c1, c2 ); // if a =3D=3D 0 Then b =3D 1 myPb.post( c3 ); myPb.solve(); System.out.println("---------------------------------"); System.out.println(a + " =3D " + a.getValue()); System.out.println(b + " =3D " + b.getValue()); System.out.println("---------------------------------"); } } and it runs but when I change the Problem to PalmProblem (because I want use later the Explanation concept) : import choco.Problem; import choco.integer.IntVar; import choco.Constraint; import choco.palm.PalmProblem; import choco.palm.integer.PalmIntVar; import choco.palm.integer.PalmIntDomain; import choco.palm.explain.Explanation; import java.util.Set; import java.util.Iterator; public class test { public static void main(String[] args) { // Problem myPb =3D new Problem(); Problem myPb =3D new PalmProblem(); IntVar a =3D myPb.makeEnumIntVar("A", 0, 1); IntVar b =3D myPb.makeEnumIntVar("B", 0, 1); Constraint c1 =3D myPb.eq(a, 0); Constraint c2 =3D myPb.eq(b, 1); Constraint c3 =3D myPb.ifThen( c1, c2 ); // if a =3D=3D 0 Then b =3D 1 myPb.post( c3 ); myPb.solve(); System.out.println("---------------------------------"); System.out.println(a + " =3D " + a.getValue()); System.out.println(b + " =3D " + b.getValue()); System.out.println("---------------------------------"); Explanation expl =3D ((PalmProblem)myPb).makeExplanation(); ((PalmIntVar)b).self_explain(PalmIntDomain.VAL, 0, expl); System.out.println("Why " + b + " !=3D 0"); Set set =3D expl.toSet(); Iterator i =3D set.iterator(); while (i.hasNext())=20 System.out.println(i.next()); =20 System.out.println("---------------------------------"); } } it goes wrong : ** JPaLM : Constraint Programming with Explanations ** JPaLM v0.9b : (July, 2004), ............................ Exception in thread "main" java.lang.NullPointerException at choco.palm.PalmProblem.post(Unknown Source) at test.main(test.java:24) So, I call you all for help Thank you, Martin |
From: <gro...@em...> - 2005-03-24 10:59:42
|
Dear Patrick and Choco users, You pointed a Choco bug in large boolean constraints. I think I fixed it. I now have the following result when running your example (Umatrix.main()) : (CCR:1,((((LCO:1,OGE:1)6:1,OGU:1)5:1,(LWI:1,LPA:1)7:1)3:1,(FCA:1,(LTI:1,(((PAU:1,CCA:1)7:1,LSE:1)6:1,(PCO:1,AJU:1)6:1,PTE:1,(PMA:1,(LRU:1,LCA:1)8:1)6:1)5:1,((PTI:1,NNE:1)8:1,(PUN:1,PON:1,(PPA:1,PLE:1)9:1)8:1)7:1)4:1)3:1)2:1)1:1; (CCR:1,((((LCO:1,OGE:1)6:1,OGU:1)5:1,(LWI:1,LPA:1)7:1)3:1,(FCA:1,((LTI:1,((PAU:1,CCA:1)7:1,LSE:1)6:1,(PCO:1,AJU:1)6:1,PTE:1,(PMA:1,(LRU:1,LCA:1)8:1)6:1)5:1,((PTI:1,NNE:1)8:1,(PUN:1,PON:1,(PPA:1,PLE:1)9:1)8:1)7:1)4:1)3:1)2:1)1:1; (CCR:1,((((LCO:1,OGE:1)6:1,OGU:1)5:1,(LWI:1,LPA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(PCO:1,AJU:1)6:1,PTE:1,(PMA:1,(LRU:1,(LTI:1,LCA:1)9:1)8:1)6:1)5:1,((PTI:1,NNE:1)8:1,(PUN:1,PON:1,(PPA:1,PLE:1)9:1)8:1)7:1)4:1)3:1)2:1)1:1; feasible: true nbSol: 30 Is it the expected behaviour ? The bug fixes have been added to the CVS version. Feel free to check out it ! Regards, Guillaume Rochart Selon Patrick Prosser <pa...@dc...>: > > I can't track this error down better than this ... my code is here > http://www.dcs.gla.ac.uk/~pat/cp4/JChoco/hrp/ and a call to java Test > hrp_11_5.dat ends up with some sort of null pointer exception in the > jchoco code via choco.AbstractConstraint.addListner(Unknown Source) > > I also have a bizarre error in the following code, specifically file > UMatrix.java http://www.dcs.gla.ac.uk/~pat/cp4/JChoco/speciesTrees/ > Here I have an "ultrametrix" constraint as seen in lines 37 to 41 of > file UMatrix.java. In particular there is a redundant constraint that > when added causes JChoco to bomb out on a ClassCastException. The > redundat constraint is A=B and C>B and C>A. Remove the last of these and > the error goes away! > > I am now going to go home and cry and when I come back to work I am > going to volunteer to take on the duties of our Janitor > > Patrick > > -- > Patrick Prosser tel: +44 141 330 4934 > Computing Science fax: +44 141 330 4913 > Glasgow University mail: pa...@dc... > G12 8RZ > http://www.dcs.gla.ac.uk/~pat <http://www.dcs.gla.ac.uk/~pat> > > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Hadrien C. <had...@em...> - 2005-03-24 08:33:37
|
Hi, I have looked quickly at your code. I can see at least one mistake in = class HR2. HR2 is a binary constraint, and you must specify its field v0 and v1 in the constructor (In case of a LargeConstraint, = you must specify the field vars which is a table of variable) : public HR2(Environment e,RVar r,HVar h,int rPh,int hPr) { this.r =3D r; this.h =3D h; this.v0 =3D r.getV(); // <---------------------------- here this.v1 =3D h.getV(); // <---------------------------- here this.rPh =3D rPh; this.hPr =3D hPr; hCr =3D new StoredInt(r.getProblem().getEnvironment());=20 hCr.set(-1); } Otherwise, the constraint network can not be built and you get this null = pointer exception when choco tries to link variables and constraints. (addListeners method).=20 Notice (to implement the awake methods of your constraints) that r will = get the index 0 and h the index 1 in the previous code. Hope it helps. Hadrien=20 ps : you can get the environment from the problem and variables : = r.getProblem().getEnvironment() and don't need it as a parameter=20 ----- Original Message -----=20 From: Patrick Prosser=20 To: cho...@li...=20 Sent: Wednesday, March 23, 2005 7:01 PM Subject: [Choco-users] null pointer exception in = abstractconstraint.addListner(Unknown Source) I can't track this error down better than this ... my code is here = http://www.dcs.gla.ac.uk/~pat/cp4/JChoco/hrp/ and a call to java Test = hrp_11_5.dat ends up with some sort of null pointer exception in the = jchoco code via choco.AbstractConstraint.addListner(Unknown Source) I also have a bizarre error in the following code, specifically file = UMatrix.java http://www.dcs.gla.ac.uk/~pat/cp4/JChoco/speciesTrees/ = Here I have an "ultrametrix" constraint as seen in lines 37 to 41 of = file UMatrix.java. In particular there is a redundant constraint that = when added causes JChoco to bomb out on a ClassCastException. The = redundat constraint is A=3DB and C>B and C>A. Remove the last of these = and the error goes away! I am now going to go home and cry and when I come back to work I am = going to volunteer to take on the duties of our Janitor Patrick -- Patrick Prosser tel: +44 141 330 4934 Computing Science fax: +44 141 330 4913 Glasgow University mail: pa...@dc... G12 8RZ =20 http://www.dcs.gla.ac.uk/~pat=20 |
From: simonxue <sim...@ya...> - 2005-03-24 01:24:46
|
First one: Does choco support the whole integer domain? Does every integer constraint variable have to use lower bound and upper bound? Second one: Maybe naive. Would you please tell me the complexity of choco when solving constraints of some famous classes, such as linear constraints on integer, linear constraints on real. sincerely yours simonxue _________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/ |
From: Patrick P. <pa...@dc...> - 2005-03-23 18:02:35
|
=20 I can't track this error down better than this ... my code is here http://www.dcs.gla.ac.uk/~pat/cp4/JChoco/hrp/ and a call to java Test hrp_11_5.dat ends up with some sort of null pointer exception in the jchoco code via choco.AbstractConstraint.addListner(Unknown Source) =20 I also have a bizarre error in the following code, specifically file UMatrix.java http://www.dcs.gla.ac.uk/~pat/cp4/JChoco/speciesTrees/ Here I have an "ultrametrix" constraint as seen in lines 37 to 41 of file UMatrix.java. In particular there is a redundant constraint that when added causes JChoco to bomb out on a ClassCastException. The redundat constraint is A=3DB and C>B and C>A. Remove the last of these = and the error goes away! =20 I am now going to go home and cry and when I come back to work I am going to volunteer to take on the duties of our Janitor =20 Patrick -- Patrick Prosser tel: +44 141 330 4934 Computing Science fax: +44 141 330 4913 Glasgow University mail: pa...@dc... G12 8RZ =20 http://www.dcs.gla.ac.uk/~pat <http://www.dcs.gla.ac.uk/~pat> =20 =20 |
From: Patrick P. <pa...@dc...> - 2005-03-23 16:32:02
|
I am getting strange run time errors, originating from messages such as choco.Problem.solve(Unknown Source) =20 I have had this "Unknown Source" also when trying to create some of the variable ordering heuristics such as domdeg and mindomain.=20 =20 I have also had this in pb.post(c) where c is a constraint =20 Why is this happening? How can I fix it? =20 -- Patrick Prosser tel: +44 141 330 4934 Computing Science fax: +44 141 330 4913 Glasgow University mail: pa...@dc... G12 8RZ =20 http://www.dcs.gla.ac.uk/~pat=20 =20 |
From: <gro...@em...> - 2005-03-16 17:07:07
|
The default branching algorithm is a simple algorithm which assigns values to variables (AssignVar). So you can easily do what you want thanks to the Solver API : * pb.getSolver().setVarSelector(IVarSelector varSelector) selects a variable ordering heuristics. So you have to define your own class implementing this interface. For instance, you can use the following code : // imports... public class StaticOrderingHeuristic extends AbstractIntVarSelector { protected IntVar[] vars; public StaticOrderingHeuristic(IntVar[] vars) { this.vars = vars; } public IntVar selectIntVar() { for (int i = 0; i < vars.length; i++) { if (!vars[i].isInstantiated()) { return vars[i]; } } return null; } } if you only give involved variables, it will totally ignore the other variables during the branching algorithm Hope it helps, Guillaume Selon Patrick Prosser <pa...@dc...>: > Hi > I am wanting to implement my own varaible ordering heuristic. In > particular I would like to implement a static ordering heuristic that > selects only some of the variables in the problem. > > cheers > > Patrick > > > -- > Patrick Prosser tel: +44 141 330 4934 > Computing Science fax: +44 141 330 4913 > Glasgow University mail: pa...@dc... > G12 8RZ > http://www.dcs.gla.ac.uk/~pat > > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: <gro...@em...> - 2005-03-16 16:56:15
|
Dear Patrick, In order to limit the memory used for storing solutions, the number of stored solutions is limited to 5 (right now it is hard-coded, but accesors could be added to change this behaviour). If you want to have all solutions, the simplest way is to use incremental solving (nextSolution()). Indeed, you can for instance use the following code : if (pb.solve()) { do { // ... display the solution } while (pb.nextSolution()); } Hope it helps, Guillaume Selon Patrick Prosser <pa...@dc...>: > How do I get hold of all of the solutions? > > The code below only returns 5 of the 60 possible solutions. > > import choco.ContradictionException; > import choco.Problem; > import choco.integer.IntVar; > import choco.integer.search.*; > import choco.search.AssignVar; > import choco.Solver; > import choco.Solution; > > > public class Sample2 { > > public static void main(String[] args) { > int n = 3; > Problem pb = new Problem(); > IntVar x = pb.makeEnumIntVar("X",1,5); > IntVar y = pb.makeEnumIntVar("Y",1,5); > IntVar z = pb.makeEnumIntVar("Z",1,5); > Constraint c1 = pb.neq(x,y); > Constraint c2 = pb.neq(y,z); > Constraint c3 = pb.neq(z,x); > pb.post(c1);pb.post(c2);pb.post(c3); > > Solver s = pb.getSolver(); > s.setVarSelector(new DomOverDeg(pb)); > s.setValIterator(new DecreasingDomain()); > pb.solve(true); > > System.out.println("feasible: " + pb.isFeasible()); > System.out.println("nbSol: " + s.getNbSolutions()); > > for(int sol = 0; sol < s.getSearchSolver().solutions.size(); sol ++) > { > Solution solution = (Solution) > s.getSearchSolver().solutions.get(sol); > for(int i = 0; i < n; i++) System.out.print(solution.getValue(i) + > " "); > System.out.println("*****"); > } > } > } > > > > -- > Patrick Prosser tel: +44 141 330 4934 > Computing Science fax: +44 141 330 4913 > Glasgow University mail: pa...@dc... > G12 8RZ > http://www.dcs.gla.ac.uk/~pat > > > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Patrick P. <pa...@dc...> - 2005-03-16 16:47:13
|
Is there a way to restore a solution, and is there a way to store more than 5 solutions in sol.getSearchSolver().solutions =20 -- Patrick Prosser tel: +44 141 330 4934 Computing Science fax: +44 141 330 4913 Glasgow University mail: pa...@dc... G12 8RZ =20 http://www.dcs.gla.ac.uk/~pat=20 =20 |
From: Patrick P. <pa...@dc...> - 2005-03-16 16:26:02
|
=20 Hi I am now using JChoco for my research (stable matching problems and also building species trees), and would also like to use JChoco in place of Choco in my level 4 course here at Glasgow http://www.dcs.gla.ac.uk/~pat/cp4/index.html =20 Is there a user manual that is in English?=20 =20 I find the online API of limited use (most things are NOT documented) and I'm afraid I don't read French and I will not be lecturing to French students (much as I would like to). =20 So, any plans for English documentation? =20 cheers =20 patrick -- Patrick Prosser tel: +44 141 330 4934 Computing Science fax: +44 141 330 4913 Glasgow University mail: pa...@dc... G12 8RZ =20 http://www.dcs.gla.ac.uk/~pat=20 =20 |
From: Patrick P. <pa...@dc...> - 2005-03-16 16:14:05
|
Hi I am wanting to implement my own varaible ordering heuristic. In particular I would like to implement a static ordering heuristic that selects only some of the variables in the problem. =20 cheers =20 Patrick =20 -- Patrick Prosser tel: +44 141 330 4934 Computing Science fax: +44 141 330 4913 Glasgow University mail: pa...@dc... G12 8RZ =20 http://www.dcs.gla.ac.uk/~pat=20 =20 |
From: Patrick P. <pa...@dc...> - 2005-03-16 16:13:18
|
How do I get hold of all of the solutions? =20 The code below only returns 5 of the 60 possible solutions. =20 import choco.ContradictionException; import choco.Problem; import choco.integer.IntVar; import choco.integer.search.*; import choco.search.AssignVar; import choco.Solver; import choco.Solution; =20 public class Sample2 { =20 public static void main(String[] args) { int n =3D 3; Problem pb =3D new Problem(); IntVar x =3D pb.makeEnumIntVar("X",1,5); IntVar y =3D pb.makeEnumIntVar("Y",1,5); IntVar z =3D pb.makeEnumIntVar("Z",1,5); Constraint c1 =3D pb.neq(x,y); Constraint c2 =3D pb.neq(y,z); Constraint c3 =3D pb.neq(z,x); pb.post(c1);pb.post(c2);pb.post(c3); =20 Solver s =3D pb.getSolver(); s.setVarSelector(new DomOverDeg(pb)); s.setValIterator(new DecreasingDomain()); pb.solve(true); =20 System.out.println("feasible: " + pb.isFeasible()); System.out.println("nbSol: " + s.getNbSolutions()); =20 for(int sol =3D 0; sol < s.getSearchSolver().solutions.size(); sol = ++) { Solution solution =3D (Solution) s.getSearchSolver().solutions.get(sol); for(int i =3D 0; i < n; i++) System.out.print(solution.getValue(i) = + " "); System.out.println("*****"); } } } =20 -- Patrick Prosser tel: +44 141 330 4934 Computing Science fax: +44 141 330 4913 Glasgow University mail: pa...@dc... G12 8RZ =20 http://www.dcs.gla.ac.uk/~pat=20 =20 |
From: <fra...@ya...> - 2005-03-13 21:05:57
|
Dear Simon, indeed a bug. it's probably due to the fact that it is more expected to write post(c1); post(c2); post(c3); instead of post(and(c1,c2,c3)) Nethertheless, what you wrote is perfectly valid use of Choco, so we'll fix the bug. thansk for your help in improving choco. François --- simonxue <sim...@ya...> wrote: > Hi all, > > I'm now using choco to do some simple constraint > satisfiability check. Here is my program: > -------------------------------------------------------- > Problem pb5 = new Problem(); > IntVar X = > pb5.makeBoundIntVar("X",INT_MIN,INT_MAX); > IntVar Y = > pb5.makeBoundIntVar("Y",INT_MIN,INT_MAX); > IntVar Z = > pb5.makeBoundIntVar("Z",INT_MIN,INT_MAX); > pb5.post( > pb5.and( > pb5.leq(X,50), > pb5.geq(Y,32000), > pb5.leq(Z,17))); > pb5.solve(); > System.out.println( > "We have "+pb5.getSolver().getNbSolutions()+ > " solutions!"); > System.out.println(pb5.pretty()); > -------------------------------------------------------- > > I saw that Problem class has and method with 3 and > 4 > arguments, so I used it. But it goes wrong when I > execute this prgram. The error is like this: > -------------------------------------------------------- > Exception in thread "main" > java.lang.ClassCastException > at > choco.bool.AbstractLargeBoolConstraint.setSubConstraintStatus(Unknown > Source) > at choco.AbstractConstraint.setEntailed(Unknown > Source) > at > choco.integer.constraints.GreaterOrEqualXC.propagate(Unknown > Source) > at choco.AbstractConstraint.awake(Unknown Source) > at choco.bool.LargeConjunction.awake(Unknown > Source) > at > choco.prop.ConstraintEvent.propagateEvent(Unknown > Source) > at > choco.prop.ConstraintEventQueue.propagateSomeEvents(Unknown > Source) > at choco.Problem.propagate(Unknown Source) > at > choco.search.AbstractGlobalSearchSolver.incrementalRun(Unknown > Source) > at choco.Solver.launch(Unknown Source) > at choco.Problem.solve(Unknown Source) > at chocosamples.MyTest.test5(MyTest.java:107) > at chocosamples.MyTest.main(MyTest.java:28) > ------------------------------------------------------- > > If I change the and method used above to the or > method. Then there is no error. It really confused > me. > So, I call you all for help, :-). > > _________________________________________________________ > Do You Yahoo!? > ×¢²áÊÀ½çÒ»Á÷Æ·ÖʵÄÑÅ»¢Ãâ·ÑµçÓÊ > http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/ > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ |
From: simonxue <sim...@ya...> - 2005-03-07 05:37:55
|
Hi all, I'm now using choco to do some simple constraint satisfiability check. Here is my program: -------------------------------------------------------- Problem pb5 = new Problem(); IntVar X = pb5.makeBoundIntVar("X",INT_MIN,INT_MAX); IntVar Y = pb5.makeBoundIntVar("Y",INT_MIN,INT_MAX); IntVar Z = pb5.makeBoundIntVar("Z",INT_MIN,INT_MAX); pb5.post( pb5.and( pb5.leq(X,50), pb5.geq(Y,32000), pb5.leq(Z,17))); pb5.solve(); System.out.println( "We have "+pb5.getSolver().getNbSolutions()+ " solutions!"); System.out.println(pb5.pretty()); -------------------------------------------------------- I saw that Problem class has and method with 3 and 4 arguments, so I used it. But it goes wrong when I execute this prgram. The error is like this: -------------------------------------------------------- Exception in thread "main" java.lang.ClassCastException at choco.bool.AbstractLargeBoolConstraint.setSubConstraintStatus(Unknown Source) at choco.AbstractConstraint.setEntailed(Unknown Source) at choco.integer.constraints.GreaterOrEqualXC.propagate(Unknown Source) at choco.AbstractConstraint.awake(Unknown Source) at choco.bool.LargeConjunction.awake(Unknown Source) at choco.prop.ConstraintEvent.propagateEvent(Unknown Source) at choco.prop.ConstraintEventQueue.propagateSomeEvents(Unknown Source) at choco.Problem.propagate(Unknown Source) at choco.search.AbstractGlobalSearchSolver.incrementalRun(Unknown Source) at choco.Solver.launch(Unknown Source) at choco.Problem.solve(Unknown Source) at chocosamples.MyTest.test5(MyTest.java:107) at chocosamples.MyTest.main(MyTest.java:28) ------------------------------------------------------- If I change the and method used above to the or method. Then there is no error. It really confused me. So, I call you all for help, :-). _________________________________________________________ Do You Yahoo!? 注册世界一流品质的雅虎免费电邮 http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/ |
From: Carlos C. <clo...@st...> - 2005-02-23 12:24:05
|
J'ai re=E7u un mail me disant que mon mail =E9tait trop volumineux, je=20 renvoie donc mon message sans le .PDF Je me nomme Carlos CARREIRA, je suis =E9tudiant en 2=E8me Licence Informatique (d=E9rni=E8re ann=E9e) =E0 l'UCL (Universit=E9 Catholique de Louvail-la-Neuve, Belgique). Pour mon m=E9moire je dois impl=E9menter un algorithme -Path- en java-Cho= co. [Cet algorithme est d=E9crit dans le pdf, mais vous pouvez vous limiter =E0= lire 4. Variables domaine graphe 5. Contraintes sur les variables domaine graphe 5.1.1. Algorithme] Pour r=E9sumer je dois faire un propagateur en java-Choco qui me permette d'obtenir un graphe connexe (d'un s'eul morceau); donc si je suppose que j'ai un graphe en plusieurs "morceaux", le "propagate" devrait =E9liminer tous les morceaux qui ne contiennent pas un noeud sp=E9cifique donn=E9 (l= e noeud "start" ns). Je voudrais donc vous demander de la documentation (mieux vaut trop et trop d=E9taill=E9e que trop peux) pour r=E9aliser un (tel) propagateur. Un grand merci, quand mon m=E9moire sera boucl=E9 je serais plus qu'heure= ux d'ajouter mon petit propagateur =E0 java-Choco ^^. Carlos CARREIRA PS: J'ai d=E9j=E0 envoy=E9 ce mail =E0 Guillaume Rochart mais je n'ai pas= encore eut de r=E9ponse. Je ne sais pas trop o=F9 d=E9poser ailleur ma requ=EAte= . MERCI |
From: C. <co...@li...> - 2005-02-07 19:52:42
|
Le vendredi 04 f=E9vrier 2005 =E0 16:13 +0100, gro...@em... a =E9crit = : > Hi, >=20 > That is a very good idea :-) > Since I do not know what is possible to do on Sourceforge, I propose to= start by > a manual repository: when a user want to submit a constraint, he will s= end me a > mail with a brief description. >=20 > I will then add it to the Choco web site. See > http://choco.sourceforge.net/contrib/contribution.html to see what I pr= opose > more precisely. >=20 > Do you think this solution is correct ? Anyway, I do not think I will r= eceive > hundreds of constraints per day, at least right now (maybe next year :)= ) Hello Guillaume, Thanks for this page. I agree it's quite sufficent currently... I will send you a ChannelingConstraint this week ;-) -- Remi |
From: <gro...@em...> - 2005-02-07 10:19:11
|
----- Message transf=E9r=E9 de gro...@em... ----- Date : Mon, 7 Feb 2005 11:15:51 +0100 De : gro...@em... Adresse de retour :gro...@em... Sujet : Re: [Choco-users] TimeLimit reached ? =C0 : Eric Bensana <Eri...@ce...> Hello, You're right. These limits are lightly time consuming (more precisely, th= e time needed is linear w.r.t. the current depth of the search tree). According = to us, this looks to be acceptable ! However, we can refactor it if you need another behaviour. What are exact= ly your needs ? For instance, if we modify the behavior to stop the search as soo= n as a limit is reached, would it be okay for you (we do not think we will use exceptions, but rather modifying the search code) ? Thank you for your help to improve Choco ! Regards, Guillaume Selon Eric Bensana <Eri...@ce...>: > Hello > > By tracing the timelimit i wander if the behaviour is correct > the desired behaviour is that as soon as the time limit is > reached the search should stop, > > as implemented the search seems to go on and try to extend the search > of course no new node can be created because of the timelimit but this = is > time consuming > > this behaviour is not satisfactory since if you want to control your se= arch > very precisely, in fact the first time the timelimit is reached shoud t= hrow > a new kind of exception which should be catched at the root level in or= der > to stop the whole search process > > this could be interesting to modify this for the new version > > thanks > > > > Eric Bensana > > ***********************************************************************= ** > ONERA : Office National d'Etudes et de Recherches Aerospatiales > DCSD : Departement Commande des Systemes et Dynamique du vol > > CERT : Centre d'Etudes et de Recherche de Toulouse > 2 avenue Edouard Belin, BP 4025, 31055 Toulouse Cedex, France > Tel : +33 (0)5 62 25 29 01, Fax : +33 (0)5 62 25 25 64 > > M=E9l : Eri...@ce... ou Eri...@on... > Page Web : http://www.cert.fr/dcsd/cd/MEMBRES/bensana/index.html > ***********************************************************************= ** > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Choco-users mailing list > Cho...@li... > https://lists.sourceforge.net/lists/listinfo/choco-users > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ----- Fin du message transf=E9r=E9 ----- ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Eric B. <Eri...@ce...> - 2005-02-07 09:54:05
|
Hello By tracing the timelimit i wander if the behaviour is correct the desired behaviour is that as soon as the time limit is reached the search should stop,=20 as implemented the search seems to go on and try to extend the search of course no new node can be created because of the timelimit but this is= =20 time consuming this behaviour is not satisfactory since if you want to control your search very precisely, in fact the first time the timelimit is reached shoud throw a new kind of exception which should be catched at the root level in order to stop the whole search process this could be interesting to modify this for the new version thanks Eric Bensana ************************************************************************* ONERA : Office National d'Etudes et de Recherches Aerospatiales DCSD : Departement Commande des Systemes et Dynamique du vol CERT : Centre d'Etudes et de Recherche de Toulouse 2 avenue Edouard Belin, BP 4025, 31055 Toulouse Cedex, France Tel : +33 (0)5 62 25 29 01, Fax : +33 (0)5 62 25 25 64 M=E9l : Eri...@ce... ou Eri...@on... Page Web : http://www.cert.fr/dcsd/cd/MEMBRES/bensana/index.html ************************************************************************* |