Source code for job_shop_lib.graphs.graph_updaters._utils
"""Contains utility functions for updating the job shop graph."""fromcollections.abcimportIterablefromjob_shop_libimportOperationfromjob_shop_lib.graphsimportJobShopGraph
[docs]defremove_completed_operations(job_shop_graph:JobShopGraph,completed_operations:Iterable[Operation],)->None:"""Removes the operation node of the scheduled operation from the graph. Args: job_shop_graph: The job shop graph to update. dispatcher: The dispatcher instance. """foroperationincompleted_operations:node_id=operation.operation_idifjob_shop_graph.removed_nodes[node_id]:continuejob_shop_graph.remove_node(node_id)