Hi,
I have a problem like the following that I am having a hard time to find
a solution. Can anyone provide me with some pointers?
Say there are 4 tasks with IDs 1, 2, 3, 4. I need to schedule them in
groups of two with same start time. So if I choose 1 & 3 for the first
group, I have to choose 2 & 4 for the second group (i.e., no duplicate).
In this case the first group (1 & 3) will have one start time and the
second one (3 & 4) will have a different start time.
I was trying something like this that works for a simple problem, but
does not work for real complex problem. Perhaps it is not a problem with
my constraint definition rather how I the start time allocation happens!
It fails a space where it should find a solution by reallocating start
time.
{Int.'div' {Length Tasks} 2} =:
{FoldLTail Tasks
fun{$ A T1|TR } Sum in
Sum = {FoldL TR
fun {$ B T2} T2 in
{FD.plus
{FD.equi (T1.start =: T2.start) 1} B
}
end
0}
Sum =<: 1
{FD.plus Sum A}
end
0}
end
Any help is much appreciated.
Thanks,
Ashis
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users