I’ve finally gotten around to solving this (code is here) and, like @sasajuric, my part two solution replaced me original part one code.
My solution revolves around having two maps; one for the steps, their dependencies and their durations and the other for workers, which step they are processing and when they will be done processing (in seconds).
I’m using recursion to step through time and at each second I check to see if any steps have been completed (and log their identifier if they have) and then assign any pending steps to any available workers.
When a step is assigned to a worker it is removed from the map of sets and any references to it are removed from the dependencies list in other steps. The actual progress of a step (really just monitoring when it is complete) is done via the workers.
I’m not entirely happy with my code and will be going back to do some tidying (and documenting) but that’s tending to be my overall trend with these challenges. They’re proving to be a fantastic way to find my way around the Elixir standard libraries but they’re also taking me far longer to complete then they probably should.
Ah well… I’ll improve with practice!






















