[gecode-users] dynamic model

Alexis Cothenet alexis.cothenet at gmail.com
Tue Jan 31 21:56:40 CET 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20120131/e170a724/attachment.html>


More information about the users mailing list