Esempio n. 1
0
 def getEntity(self):
     activeEntity=Machine.getEntity(self)
     for queue in G.InternalQueueList:
         station=queue.next[0]
         # do not send the signal if it is already triggered
         if not queue.canDispose.triggered:
             self.sendSignal(receiver=queue, signal=queue.canDispose, sender=station)
     return activeEntity
Esempio n. 2
0
 def getEntity(self):
     activeEntity = Machine.getEntity(self)
     for queue in G.InternalQueueList:
         station = queue.next[0]
         # do not send the signal if it is already triggered
         if not queue.canDispose.triggered:
             self.sendSignal(receiver=queue,
                             signal=queue.canDispose,
                             sender=station)
     return activeEntity
Esempio n. 3
0
 def getEntity(self):
     activeEntity=Machine.getEntity(self)        #call the parent method to get the entity
     part=self.getActiveObjectQueue()[0]         #retrieve the obtained part
     part.machineId=self.id                      #create an attribute to the obtained part and give it the value of the object's id
     return activeEntity                         #return the entity obtained