That was a bit tricky, but I found the problem ;-) The reified dom constraint does not behave as you expect. When you call dom(home, x, s, b) it means b <-> x in s. So if !b, then x not in s (all values from s will be removed from x!).
I guess what you want is just the implication b -> x in s, which can be implemented like this: BoolVar b(*this, 0,1); dom(*this, start_times[j], v, b); rel(*this, m(j,i), BOT_IMPL, b, 1); or more compactly using minimodel: rel(*this, m(j,i) >> (singleton(start_times[j]) <= v)); Cheers, Guido On 31 May 2011, at 08:52, alin gherman wrote: > Hallo, > > I now understand the reasoning for using the boolean matrix > so that each unary constraint corresponds to a certain resource > and to the starting times of the resource. > > but thaw it all make sense now I still don't get the result > I expect. There are no different resources assigned to the task > though different resources can do the task faster since they > can work in parallel, > and another problem is that when I specify constraints > for what resources can do a certain task I get no solution > again. > > I attached a small sample that behaves like my program > maybe someone with more experience can help me. > > thanks. > <AllocTime.h>_______________________________________________ > Gecode users mailing list > users@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users -- Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users