|
@@ -55,6 +55,9 @@ public final class ResourceOrder extends Encoding {
|
55
|
55
|
|
56
|
56
|
/** Adds the given task to the queue of the given machine. */
|
57
|
57
|
public void addTaskToMachine(int machine, Task task) {
|
|
58
|
+ if(instance.machine(task) != machine) {
|
|
59
|
+ throw new RuntimeException("Task " + task + " cannot be scheduled on machine "+machine);
|
|
60
|
+ }
|
58
|
61
|
tasksByMachine[machine][nextFreeSlot[machine]] = task;
|
59
|
62
|
nextFreeSlot[machine] += 1;
|
60
|
63
|
}
|