Hello choco users,
I am trying solve a 'Task Scheduling Problem', which means I need to assign
an appropriate run-time for every task within a Scheduling Interval time
regarding some constraints.
For smalll domains choco is working perfectly, but when I increase the
scheduling interval I am not getting any solution at all.
I looked for the problem and realized this part, which you can see below,
slows down the performance.
*IntDomainVar[] starts = pb.makeBoundIntVarArray("Rstart", 4 0, 5000);
int[] periods_data = new int[]{5000, 5000, 5000, 5000, 5000, 5000};
IntDomainVar[] gap = pb.makeEnumIntVarArray("gap?", 5000, 0, 1);
for (int i = 0; i < 5000; i++) {
Constraint[] impl = new Constraint[4];
int t2 = 0;
for (int i1 = 0; i1 < n; i1++) {
for (int j1=0; j1 < (5000/periods_data[i1]); j1++) {
IntVar[] varj1 = new
IntVar[]{starts[t2],duration[i1]};
impl[t2] = pb.and(pb.leq(starts[t2], i),
pb.leq(i+1,
pb.sum(varj1)));
t2++;
}
}
pb.post(pb.implies(pb.or(impl),pb.eq(gap[i],0)));
pb.post(pb.implies(pb.not(pb.or(impl)),pb.eq(gap[i],1)));
}
pb.solve();
*
Do you have any idea, how can I improve the performance? Or what is the
problem actually? Why can I get any solution? Can choco not solve large
problems at all or ... ?
Thanks in advance :)
FAtma
|