Source code for job_shop_lib.dispatching._history_observer
"""Home of the `HistoryObserver` class."""fromjob_shop_lib.dispatchingimportDispatcherObserver,Dispatcherfromjob_shop_libimportScheduledOperation
[docs]classHistoryObserver(DispatcherObserver):"""Observer that stores the history of the dispatcher."""def__init__(self,dispatcher:Dispatcher,*,subscribe:bool=True):super().__init__(dispatcher,subscribe=subscribe)self.history:list[ScheduledOperation]=[]