[gecode-users] Help to express a constraint

Philippe aqwzsxaqwzsx at orange.fr
Sun Jun 1 00:41:22 CEST 2014


Hello all,


I want to increase the starting time of the successor of task t in machine m
(eg. time(succ(t,m),m)) by 10 only if status(t,m) != 3 and 
status(succ(t,m)) != 3

with status = Matrix<IntArgs>
          t = int
          m = int
     succ   = Maxtrix<IntVarArray>
     time   = Matrix<IntVarArray>

I have dirty/wrong/long code to do this (I am shameful to show you it), 
I'm certainly going in a wrong direction (comparing to elegant/natural code
seen in the examples). 
Could you help me please ?
Thanks for your help
Philippe

note:
I've read the tips 7.3 page 106 of gecode manual and i'm not using
scheduling constraint since i don't feel comfortable yet with it).







More information about the users mailing list