C++ template metaprogramming implementation of Bratley's scheduling algorithm. The algorithm is computed at compile-time such that the schedule is known by run-time.
An example of the schedule tree generated using Bratley's scheduling algorithm can be seen in the figure below, where J_i are the tasks to be scheduled, a_i are the arrival times, C_i are the computation times, and d_i are the deadlines:
In the above tree the feasible schedule shown is S = { J_4, J_2, J_3, J_1 } because:
J_4arrives att=0, starts att=0, finishes att=2, and its finish time is less-than-or-equal-to its deadline att=4J_2arrives att=1, starts att=2, finishes att=3, and its finish time is less-than-or-equal-to its deadline att=5J_3arrives att=1, starts att=3, finishes att=5, and its finish time is less-than-or-equal-to its deadline att=6J_1arrives att=4, starts att=5, finishes att=7, and its finish time is less-than-or-equal-to its deadline att=7
Build instructions:
cd bratley
mkdir build
cd build
cmake ..
make
Live demo on the Godbolt Compiler Explorer:
