-
Notifications
You must be signed in to change notification settings - Fork 619
Open
Description
Hello,
I think there are two problems with the current implementation of HEFT (findFinishTime):
while (j >= 0) {
Event current = sched.get(i);
Event previous = sched.get(j);
if (readyTime > previous.finish) {
if (readyTime + computationCost <= current.start) {
start = readyTime;
finish = readyTime + computationCost;
}
break;
}
if (previous.finish + computationCost <= current.start) {
start = previous.finish;
finish = previous.finish + computationCost;
pos = i;
}
i--;
j--;
}(1) This loop assumes that sched is sorted by the start time right? But in this function we simply call sched.add such that a sorted list is no more guaranteed.
(2) In the code above we set the start time to the readyTime in one case. Shouldn't it be the previous.finish time? Otherwise it could. i.e. be that two tasks get the same start time...
Thank you, David
Metadata
Metadata
Assignees
Labels
No labels