Using node IDs instead of AssignmentPlan.Node instances will simplify the code and is more intuitive.
AssignmentPlan.Node