Give you a similar execution graph, where each node is a task, then give the cost of each task, then give you a target task, ask what the cost is, and give a specific execution route.
workflow = {
'A': [],
'B': [],
'C':['A'],
'D': ['A', 'B'],
'E':['B']
}
runtime = {
'A': 30,
'B': 86,
"C": 100,
"D": 763,
'E': 12,
}
For example, if you ask A, the answer is, the cost is 30, then the path is A,
If you ask C, the path is A-C, and the cost is 30 + 100
If it is D, the path should be BD, not ABD printing, then the cost is 86+763, the reason is that AB is all completed, but AB can start at the same time, so the time of B is the time of A+B, and only the path BD is printed.