Repository navigation
Algorithm
We decided to use the A* algorithm to produce optimal solutions for task graphs up to 20 nodes. It is a best first state space search algorithm, that reduces the state space search by our implemented cost function and clipping techniques.
Description and details of the algorithm used and its implementation.
The A* algorithm relies on priority queues to determine which partial solutions to visit next in the total state space of partial solutions. In determining the priority for each partial solution, heuristics are used. Heuristics are essentially underestimates of the current partial solution - that is, given the current partial solution, all partial or full solutions that can be generated from that current partial solution is guaranteed to have a total cost that is greater than that underestimate.
There are several cost functions the algorithm uses to determine a partial solution's underestimate: idle time, bottom level, and parent's underestimate. Each heuristic outperforms its peers based on the type of the input graph. Naturally, the best underestimate is the highest underestimate - if one cost function guarantees the cost function to be at least 5 seconds, and another cost function guarantees 8 seconds, then the first cost function is implied by the second. Thus, the algorithm's candidate heuristic is Max(all heuristics).
The bottom level heuristic of each node calculates the longest path from the selected node. This helps provide an underestimate for the length of the schedule. The calculation only takes into consideration all the weights of the nodes in the path, ignoring the edge weights.