Do not allow placing task on the wrong machine
这个提交包含在:
父节点
ddded7da0d
当前提交
fcf0a8b19a
共有 1 个文件被更改,包括 3 次插入 和 0 次删除
|
|
@ -55,6 +55,9 @@ public final class ResourceOrder extends Encoding {
|
|||
|
||||
/** Adds the given task to the queue of the given machine. */
|
||||
public void addTaskToMachine(int machine, Task task) {
|
||||
if(instance.machine(task) != machine) {
|
||||
throw new RuntimeException("Task " + task + " cannot be scheduled on machine "+machine);
|
||||
}
|
||||
tasksByMachine[machine][nextFreeSlot[machine]] = task;
|
||||
nextFreeSlot[machine] += 1;
|
||||
}
|
||||
|
|
|
|||
正在加载…
在新工单中引用