Model . Scheduler - SeanSpires/Project1-306-Team-Stonks GitHub Wiki
This class creates a schedule given a list of tasks and the current processor it is running on.
| Method | Purpose |
|---|---|
| List getRootTasks(List tasks) | Takes in an input List of Task objects. It iterates through the list of tasks and if a task does not have a parent task, it adds this into a list and returns that list once the iteration is over |
| Node createOptimalScheduleVisualised(List tasks, int numProc, MenuController controller) | Begins scheduling of tasks over numProc processes <br/Update the Gantt chart when a new best schedule is found |
| Node createOptimalSchedule(List tasks, int numProc) | Begins scheduling of tasks over numProc processes |
| boolean containsParents(Node node, Task t) | Checks whether parent tasks of task t are scheduled |
| int calcMakeSpan(Node node) | Finds the end time of the schedule |
| long calcLowerBound(Node node, int numProc) | Calculates the end time if the rest of the tasks were to be scheduled directly one after the other |
| long calcUpperBound(Node node, int numProc) | Calculates a greedy estimate of a completed schedule from the current node |
| Task PickGreedyTask(Node node) | Picks task with smallest weight provided all its dependencies are fulfilled |
| int getStartTime(int proc, Task task, Node node) | Finds start time for a task on a given a process and schedule |