Commit 660b64d6 authored by Georgios Dagkakis's avatar Georgios Dagkakis

wipStatList to collect number of units

parent dd9e4777
...@@ -307,7 +307,10 @@ class CoreObject(ManPyObject): ...@@ -307,7 +307,10 @@ class CoreObject(ManPyObject):
# update wipStatList # update wipStatList
if self.gatherWipStat: if self.gatherWipStat:
import numpy import numpy
self.wipStatList=numpy.concatenate((self.wipStatList,[[self.env.now, len(activeObjectQueue)]])) wip=0
for holdEntity in activeObjectQueue:
wip+=holdEntity.numberOfUnits
self.wipStatList=numpy.concatenate((self.wipStatList,[[self.env.now, wip]]))
if self.expectedSignals['entityRemoved']: if self.expectedSignals['entityRemoved']:
self.printTrace(self.id, signal='(removedEntity)') self.printTrace(self.id, signal='(removedEntity)')
self.sendSignal(receiver=self, signal=self.entityRemoved) self.sendSignal(receiver=self, signal=self.entityRemoved)
...@@ -463,9 +466,14 @@ class CoreObject(ManPyObject): ...@@ -463,9 +466,14 @@ class CoreObject(ManPyObject):
self.signalRouter(receiver) self.signalRouter(receiver)
activeObjectQueue.sort(key=lambda x: x==activeEntity, reverse=True) activeObjectQueue.sort(key=lambda x: x==activeEntity, reverse=True)
# update wipStatList # update wipStatList
# update wipStatList
if self.gatherWipStat: if self.gatherWipStat:
import numpy import numpy
self.wipStatList=numpy.concatenate((self.wipStatList,[[self.env.now, len(activeObjectQueue)]])) wip=0
for holdEntity in activeObjectQueue:
wip+=holdEntity.numberOfUnits
self.wipStatList=numpy.concatenate((self.wipStatList,[[self.env.now, wip]]))
#=========================================================================== #===========================================================================
# find possible receivers # find possible receivers
...@@ -609,9 +617,14 @@ class CoreObject(ManPyObject): ...@@ -609,9 +617,14 @@ class CoreObject(ManPyObject):
activeObject=self.getActiveObject() activeObject=self.getActiveObject()
activeObjectQueue=self.getActiveObjectQueue() activeObjectQueue=self.getActiveObjectQueue()
import numpy # update wipStatList
self.wipStatList=numpy.concatenate((self.wipStatList,[[self.env.now, len(activeObjectQueue)]])) if self.gatherWipStat:
import numpy
wip=0
for holdEntity in activeObjectQueue:
wip+=holdEntity.numberOfUnits
self.wipStatList=numpy.concatenate((self.wipStatList,[[self.env.now, wip]]))
#calculate the offShift time for current entity #calculate the offShift time for current entity
offShiftTimeInCurrentEntity=0 offShiftTimeInCurrentEntity=0
if self.interruptedBy: if self.interruptedBy:
......
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