redundant code commented and comments refinement

parent 5a64e582
......@@ -360,7 +360,7 @@ class Machine(CoreObject):
self.releaseOperator()
yield waituntil,self,self.broker.brokerIsSet
# if there is a failure in the machine it is passivated
# if there is a failure in the machine or interruption due to preemption, it is passivated
yield passivate,self
# use the timers to count the time that Machine is down and related
self.downTimeProcessingCurrentEntity+=now()-breakTime # count the time that Machine is down while processing this Entity
......
......@@ -178,19 +178,19 @@ class MachineManagedJob(MachineJobShop):
# maybe we should work this way in all CoreObjects???
return self.entityToGet
# =======================================================================
# checks if the object is ready to receive an Entity
# =======================================================================
def isReadyToGet(self):
# check if the entity that is about to be obtained has a manager (this should be true for this object)
if self.entityToGet.manager:
manager=self.entityToGet.manager
if len(manager.activeCallersList)>0:
manager.sortEntities() # sort the callers of the manager to be used for scheduling rules
# return true if the manager is available
return manager.checkIfResourceIsAvailable()
else:
return True
# # =======================================================================
# # checks if the object is ready to receive an Entity
# # =======================================================================
# def isReadyToGet(self):
# # check if the entity that is about to be obtained has a manager (this should be true for this object)
# if self.entityToGet.manager:
# manager=self.entityToGet.manager
# if len(manager.activeCallersList)>0:
# manager.sortEntities() # sort the callers of the manager to be used for scheduling rules
# # return true if the manager is available
# return manager.checkIfResourceIsAvailable()
# else:
# return True
# =======================================================================
......
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