Commit e2f6a4f4 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

cherry-pick from readWIPseperatelly. schedule now holds exit time from stations

parent 5bfbf793
......@@ -181,6 +181,13 @@ class CoreObject(object):
self.timeLastEntityLeft=self.env.now
self.outputTrace(entity.name, "released "+self.objName)
#append the time to schedule so that it can be read in the result
#remember that every entity has it's schedule which is supposed to be updated every time
# he entity enters a new object
if entity.schedule:
entity.schedule[-1].append(self.env.now)
# update wipStatList
if self.gatherWipStat:
self.wipStatList.append([self.env.now, len(activeObjectQueue)])
......
......@@ -174,9 +174,13 @@ class MouldAssembly(MachineManagedJob):
# assert that there is a parent order
assert self.mouldParent.type=='Order', 'the type of the assembled to be mould\' s parent is not correct'
# delete the contents of the internal queue
for element in activeObjectQueue:
temp_activeObjectQueue=list(activeObjectQueue)
for element in temp_activeObjectQueue:
# update their schedule
element.schedule[-1].append(self.env.now)
# remove the elements
activeObjectQueue.remove(element)
# del activeObjectQueue[:]
del temp_activeObjectQueue[:]
# after assembling reset the capacity
activeObject.updateCapacity(1)
#if there is a mould to be assembled
......
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