diff --git a/kadmos/graph/graph_data.py b/kadmos/graph/graph_data.py index 70d8ce311fc268abb6115bd46d0050ce1bd27120..49ca52487927e9e03fb62cedc90b516d8c384af7 100644 --- a/kadmos/graph/graph_data.py +++ b/kadmos/graph/graph_data.py @@ -851,15 +851,15 @@ class DataGraph(KadmosGraph): waiting_list = dict(updated_waiting_list) # Add timestep to the time line if get_time_line: - time_line.append([total_runtime, list(waiting_list), running.keys(), list(finished)]) + time_line.append([total_runtime, waiting_list.keys(), running.keys(), list(finished)]) # When the running list is updated, the next time step can be determined time_step = min(running.values()) # Let all modules run for the time of the time step updated_running_list = dict(running) for node in running: - running[node] -= time_step + updated_running_list[node] -= time_step # If node is finished, move it to the finished list - if running[node] == 0: + if updated_running_list[node] == 0: finished.add(node) del updated_running_list[node] running = dict(updated_running_list) @@ -868,7 +868,7 @@ class DataGraph(KadmosGraph): if get_time_line: # Add final step to time line - time_line.append([total_runtime, list(waiting_list), running.keys(), list(finished)]) + time_line.append([total_runtime, waiting_list.keys(), running.keys(), list(finished)]) return time_line else: return total_runtime