[gecode-users] Scheduling

Guido Tack tack at gecode.org
Tue May 31 10:34:26 CEST 2011


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 at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20110531/9026b504/attachment.htm>


More information about the users mailing list