Commit 2614077d authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

correction in Machine.postProcessing

parent 6161b2fc
...@@ -683,7 +683,7 @@ class Machine(CoreObject): ...@@ -683,7 +683,7 @@ class Machine(CoreObject):
# we have to add this blockage to the percentage of blockage in Machine # we have to add this blockage to the percentage of blockage in Machine
# we should exclude the failure time in current entity though! # we should exclude the failure time in current entity though!
if (len(activeObjectQueue)>0) and (mightBeBlocked)\ if (len(activeObjectQueue)>0) and (mightBeBlocked)\
and ((activeObject.nameLastEntityEntered == activeObject.nameLastEntityEnded)): and ((activeObject.nameLastEntityEntered == activeObject.nameLastEntityEnded)) and self.onShift:
# be careful here, might have to reconsider # be careful here, might have to reconsider
activeObject.totalBlockageTime+=now()-(activeObject.timeLastEntityEnded+activeObject.downTimeInTryingToReleaseCurrentEntity) activeObject.totalBlockageTime+=now()-(activeObject.timeLastEntityEnded+activeObject.downTimeInTryingToReleaseCurrentEntity)
if activeObject.Up==False: if activeObject.Up==False:
...@@ -735,7 +735,6 @@ class Machine(CoreObject): ...@@ -735,7 +735,6 @@ class Machine(CoreObject):
if((mightBeBlocked) and (activeObject.nameLastEntityEnded==activeObject.nameLastEntityEntered) and (not alreadyAdded)): if((mightBeBlocked) and (activeObject.nameLastEntityEnded==activeObject.nameLastEntityEntered) and (not alreadyAdded)):
activeObject.totalBlockageTime+=(now()-activeObject.timeLastEntityEnded)-(now()-activeObject.timeLastShiftEnded)-offShiftTimeInCurrentEntity activeObject.totalBlockageTime+=(now()-activeObject.timeLastEntityEnded)-(now()-activeObject.timeLastShiftEnded)-offShiftTimeInCurrentEntity
#Machine was idle when it was not in any other state #Machine was idle when it was not in any other state
activeObject.totalWaitingTime=MaxSimtime-activeObject.totalWorkingTime-activeObject.totalBlockageTime-activeObject.totalFailureTime-activeObject.totalLoadTime-activeObject.totalSetupTime-self.totalOffShiftTime activeObject.totalWaitingTime=MaxSimtime-activeObject.totalWorkingTime-activeObject.totalBlockageTime-activeObject.totalFailureTime-activeObject.totalLoadTime-activeObject.totalSetupTime-self.totalOffShiftTime
......
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