Exemplo n.º 1
0
 def sortEntities(self):
     activeObject = self.getActiveObject()
     # perform the default sorting
     QueueJobShop.sortEntities(activeObject)
     # and in the end sort according to the ConditionalBuffer sorting rule
     activeObjectQueue = activeObject.getActiveObjectQueue()
     # for every entity in the activeObjectQueue
     for entity in activeObjectQueue:
         # check if the requiredParts (if any) have concluded the steps with sequence smaller
         # than the sequence of the entity next step
         entity.mayProceed = entity.checkIfRequiredPartsReady()
     activeObjectQueue.sort(key=lambda x: x.mayProceed, reverse=True)
Exemplo n.º 2
0
 def sortEntities(self):
     activeObject = self.getActiveObject()
     # perform the default sorting
     QueueJobShop.sortEntities(activeObject)
     # and in the end sort according to the ConditionalBuffer sorting rule
     activeObjectQueue = activeObject.getActiveObjectQueue()
     # for every entity in the activeObjectQueue
     for entity in activeObjectQueue:
         # check if the requiredParts (if any) have concluded the steps with sequence smaller 
         # than the sequence of the entity next step
         entity.mayProceed=entity.checkIfRequiredPartsReady()
     activeObjectQueue.sort(key=lambda x: x.mayProceed, reverse=True)
Exemplo n.º 3
0
 def sortEntities(self):
     QueueJobShop.sortEntities(self)     #do the default sorting first
     activeObjectQueue=self.getActiveObjectQueue()
     # search for the entities in the activeObjectQueue that have available manager
     for entity in activeObjectQueue:
         entity.managerAvailable=False
         # if the entity has manager assigned
         if entity.manager:
             # check his availability    
             if entity.manager.checkIfResourceIsAvailable(self.objectSortingFor):
                 entity.managerAvailable=True
     # sort the active queue according to the availability of the managers
     activeObjectQueue.sort(key=lambda x: x.managerAvailable, reverse=True)
Exemplo n.º 4
0
 def sortEntities(self):
     QueueJobShop.sortEntities(self)  #do the default sorting first
     activeObjectQueue = self.getActiveObjectQueue()
     # search for the entities in the activeObjectQueue that have available manager
     for entity in activeObjectQueue:
         entity.managerAvailable = False
         # if the entity has manager assigned
         if entity.manager:
             # check his availability
             if entity.manager.checkIfResourceIsAvailable(
                     self.objectSortingFor):
                 entity.managerAvailable = True
     # sort the active queue according to the availability of the managers
     activeObjectQueue.sort(key=lambda x: x.managerAvailable, reverse=True)