Hi Christian, Thanks very much for your answer, that helps. I will read a little more the tutorial before writing some tests.
Best regards, Alexis 2012/2/1 Christian Schulte <[email protected]> > Hi Alexis,**** > > ** ** > > Yep, I know ILOG CP reasonably well. But I have to admit it is really > clear what you are trying to achieve.**** > > ** ** > > If you just want to solve goals that are a conjunction that corresponds to > posting the respective goals inside a space. **** > > ** ** > > As you say yourself, disjunctive goals corresponds to a choice generated > by a brancher. Posting a new brancher inside the commit function of some > other brancher is possible in fact. I am not really sure what you mean by > the return type, but let me try: posting a brancher does not fail. So what > you can do inside the commit function is to post a new brancher and return > ES_OK as ExecStatus (signalling that the commit indeed did not fail, a > commit could fail if it for example posted a new constraint).**** > > ** ** > > I hope that helps somewhat.**** > > ** ** > > Best**** > > Christian**** > > ** ** > > --**** > > Christian Schulte, > www.ict.kth.se/~cschulte/<http://www.ict.kth.se/%7Ecschulte/> > **** > > ** ** > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Alexis Cothenet > *Sent:* Tuesday, January 31, 2012 9:57 PM > *To:* [email protected] > *Subject:* [gecode-users] dynamic model**** > > ** ** > > Hi all, > > I'm currently studying the possibilty to migrate to Gecode a software > written with ILOG CP. > The actual model is computed dynamically using goals. I don't know if any > of you are a bit familiar with it, but if yes this is in essence what is > done: > solver.solve (goal1 & goal2). > goal1 could be asking for the variable toto to be 0: > goal1-> toto=0 > goal2 could be a combination of other goals: > goal2 -> goal3 || goal4 etc...(i mean goal4 could be another combination > of goals...). > > > I'm reading the very good tutorial "Modeling and Programming with Gecode", > actually i'm with the chapter 28 for implementing branchers. > It seems to me that for doing the equivalent of ILOG CP, i should have in > a space: > call branch1 (in order to replace goal1) > call branch2 (in order to replace goal2). > > and implement the branch2 in order its choice have 2 alternatives > and doing in branch2::commit something like { if a=0 return branch3 else > return branch4}. > The problem is that it doesn't seem to work like that since it claims an > ExecStatus type return. > > Is it possible to create new branchers inside branchers so that the result > of the commit branch would call the commit of other branchers and so on ? > > Thank you very much by advance for your support. > > Best regards, > Alexis > > > > > **** >
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
