File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,6 @@ def __init__(
128128
129129 if add_operation_nodes :
130130 self .add_operation_nodes ()
131-
132- self .removed_nodes [NodeType .OPERATION .name .lower ()] = [
133- False
134- ] * instance .num_operations
135-
136131 self .edge_types = set [tuple [str , str , str ]]()
137132
138133 def get_networkx_graph (self ) -> nx .DiGraph :
@@ -242,6 +237,10 @@ def add_node(self, node_for_adding: Node) -> None:
242237 self .instance_id_map [NodeType .OPERATION .name .lower ()][
243238 operation .operation_id
244239 ] = node_for_adding
240+ if NodeType .OPERATION .name .lower () not in self .removed_nodes :
241+ self .removed_nodes [NodeType .OPERATION .name .lower ()] = [
242+ False
243+ ] * self .instance .num_operations
245244 elif node_for_adding .node_type == NodeType .MACHINE :
246245 self .instance_id_map [NodeType .MACHINE .name .lower ()][
247246 node_for_adding .machine_id
You can’t perform that action at this time.
0 commit comments