On 30 May 2011, at 16:55, Daniel Araya wrote:

> Hi Guido,
> 
> You says: "For the m(j,i)  == (resource[j] == i) constraint, you can actually 
> use a channel constraint, which is more efficient, but I thought this is 
> closer to your original code."
> 
> But how you can use a channel constraint with different argument size? 
> A few weeks ago I had the same problem and finally I implemented the
> problem with reified constraints.

for (int j=0; j<n_tasks; j++) {
  channel(home, m.col(j), resource[j]);
}

See
http://www.gecode.org/doc-latest/reference/group__TaskModelIntChannel.html

Cheers,
        Guido

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






_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to