This the second of our complete simulation. Now contains changes for
task simulation with variable task lenghts