temporary comments added to MachineManagedJob

parent 3de79738
...@@ -85,6 +85,17 @@ class MachineManagedJob(MachineJobShop): ...@@ -85,6 +85,17 @@ class MachineManagedJob(MachineJobShop):
#return according to the state of the Queue #return according to the state of the Queue
return len(activeObject.getActiveObjectQueue())<activeObject.capacity\ return len(activeObject.getActiveObjectQueue())<activeObject.capacity\
and activeObject.Up and activeObject.Up
# activeEntities=[]
# for entity in thecaller.getActiveObjectQueue():
# if entity.manager.checkIfResourceIsAvailable(self):
# activeEntities.append(entity)
#
# if len(activeEntities)>0:
# for entity in activeEntities:
# if activeObject.id in entity.remainingRoute[0].get('stationIdsList',[]):
# return len(activeObject.getActiveObjectQueue())<activeObject.capacity\
# and activeObject.Up
return False return False
# ======================================================================= # =======================================================================
...@@ -139,13 +150,19 @@ class MachineManagedJob(MachineJobShop): ...@@ -139,13 +150,19 @@ class MachineManagedJob(MachineJobShop):
self.entityToGet=activeObject.giver.getActiveObjectQueue()[0] self.entityToGet=activeObject.giver.getActiveObjectQueue()[0]
#make the operators List so that it holds only the manager of the current order #make the operators List so that it holds only the manager of the current order
activeObject.operatorPool.operators=[activeObject.giver.getActiveObjectQueue()[0].manager] activeObject.operatorPool.operators=[activeObject.giver.getActiveObjectQueue()[0].manager]
# # set the variable operatorAssignedTo to activeObject, the operator is then blocked
# activeObject.operatorPool.operators[0].operatorAssignedTo=activeObject
# # TESTING
# print now(), activeObject.operatorPool.operators[0].objName, 'got assigned to', activeObject.id
# read the load time of the machine # read the load time of the machine
self.readLoadTime() self.readLoadTime()
return True return True
# if activeObject.Up and len(activeObjectQueue)<activeObject.capacity:
# if not activeObject.giver.exitIsAssigned():
# for entity in activeObject.giver.getActiveObjectQueue():
# if activeObject.checkOperator(entity):
# if self not in entity.manager.activeCallersList:
# entity.manager.activeCallersList.append(self)
# if entity not in self.entitiesToGet:
# self.entitiesToGet.append(entity)
# # activeObject.giver.assignExit()
# return True
else: else:
return False return False
else: else:
...@@ -159,7 +176,7 @@ class MachineManagedJob(MachineJobShop): ...@@ -159,7 +176,7 @@ class MachineManagedJob(MachineJobShop):
# ======================================================================= # =======================================================================
# to be called by canAcceptAndIsRequested and check for the operator # to be called by canAcceptAndIsRequested and check for the operator
# ======================================================================= # =======================================================================
def checkOperator(self): def checkOperator(self): #, candidateEntity=None):
if self.giver.getActiveObjectQueue()[0].manager: if self.giver.getActiveObjectQueue()[0].manager:
manager=self.giver.getActiveObjectQueue()[0].manager manager=self.giver.getActiveObjectQueue()[0].manager
# print '' # print ''
...@@ -168,6 +185,13 @@ class MachineManagedJob(MachineJobShop): ...@@ -168,6 +185,13 @@ class MachineManagedJob(MachineJobShop):
return manager.checkIfResourceIsAvailable() return manager.checkIfResourceIsAvailable()
else: else:
return True return True
# if candidateEntity:
# if candidateEntity.manager:
# manager=candidateEntity.manager
# return manager.checkIfResourceIsAvailable()
# else:
# return True
# return False
# ======================================================================= # =======================================================================
# identifies the Entity to be obtained so that # identifies the Entity to be obtained so that
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment