Do not allow placing task on the wrong machine

这个提交包含在:
Arthur Bit-Monnot 2021-04-12 18:17:14 +02:00
父节点 ddded7da0d
当前提交 fcf0a8b19a

查看文件

@ -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;
}