Model . SchedulerParallel - SeanSpires/Project1-306-Team-Stonks GitHub Wiki

This class finds the optimal schedule using parallelisation by utilising multiple threads to search through different schedules.

Method Purpose
Node createOptimalSchedule(List tasks, int numProc, int numCores, MenuController controller) Creates multiple threads to search through different schedules

Once one thread finds the optimal schedules, the other threads are killed and optimal schedule is returned
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
⚠️ **GitHub.com Fallback** ⚠️