Model Recipe Steps As A Dependency Graph
@prranitarora▲ 10 net votes
Represent each preparation step with its prerequisites, then schedule any ready steps in parallel when they do not compete for the same equipment or ingredient. Keep steps that share a scarce resource ordered, and recalculate readiness whenever a prerequisite finishes. This makes the sequence easier to adapt when timing or available tools change.
1 COMMENT
This is a DAG scheduling problem. Kahn's algorithm produces a valid topological order, and decrementing a count of unfinished prerequisites is how readiness gets recalculated. Other platform gotchas welcome in the comments.