clean-up

parent 245b8ef7
......@@ -179,8 +179,6 @@ class BatchDecomposition(CoreObject):
activeObjectQueue.append(subBatch) #append the sub-batch to the active object Queue
activeEntity.subBatchList.append(subBatch)
subBatch.currentStation=self
# if the activeEntity is hot then the subBatches should be also hot
subBatch.hot=activeEntity.hot
# if the activeEntity is in the pendingEntities list then place the subBatches there
if activeEntity in G.pendingEntities:
G.pendingEntities.append(subBatch)
......
......@@ -57,9 +57,6 @@ class Entity(object):
self.isCritical=isCritical # flag to inform weather the entity is critical -> preemption
self.manager=None # default value
self.numberOfUnits=1 # default value
# flag that signalizes that an entity is ready to enter a machine
# gets cold by the time it has finished its processing
self.hot=False
# variable used to differentiate entities with and entities without routes
self.family='Entity'
......@@ -104,25 +101,6 @@ class Entity(object):
router.conflictingEntities.append(self)
return availableReceiver
#===========================================================================
# assign the entity to a station
#===========================================================================
def assignTo(self, object=None):
self.receiver=object
self.timeOfAssignement=now()
#===========================================================================
# unassign the entity from the object it is currently assigned to
#===========================================================================
def unassign(self):
self.receiver=None
self.timeOfAssignement=0
#===========================================================================
# returns the object the entity is currently assigned to
#===========================================================================
def isAssignedTo(self):
return self.receiver
# =======================================================================
# outputs results to JSON File
# =======================================================================
......
......@@ -91,7 +91,6 @@ class Exit(CoreObject):
# get the active object and its internal queue
activeObject=self.getActiveObject()
activeObjectQueue=self.getActiveObjectQueue()
# giverObject=activeObject.getGiverObject()
giverObject=callerObject
assert giverObject, 'there must be a caller for canAcceptAndIsRequested'
return giverObject.haveToDispose(self)
......@@ -105,13 +104,15 @@ class Exit(CoreObject):
from Globals import G
if activeEntity in G.pendingEntities:
G.pendingEntities.remove(activeEntity)
if activeEntity in G.EntityList:
G.EntityList.remove(activeEntity)
self.totalLifespan+=now()-activeEntity.startTime #Add the entity's lifespan to the total one.
self.numOfExits+=1 # increase the exits by one
self.totalNumberOfUnitsExited+=activeEntity.numberOfUnits # add the number of units that xited
self.totalTaktTime+=now()-self.timeLastEntityLeft # add the takt time
self.timeLastEntityLeft=now() # update the time that the last entity left from the Exit
activeObjectQueue=self.getActiveObjectQueue()
del activeObjectQueue[:]
del self.Res.activeQ[:]
return activeEntity
#===========================================================================
......
......@@ -161,24 +161,6 @@ class Source(CoreObject):
activeEntity=entity
# at the newly created entity to the pendingEntities
G.pendingEntities.append(activeEntity)
# TODO: if the successor of the object is a machine that is operated with operationType 'Load'
# then the flag hot of the activeEntity must be set to True
# to signalize that the entity has reached its final destination before the next Machine
# if the entity is not of type Job
if activeEntity.family=='Entity':
successorsAreMachines=True
# for all the objects in the next list
for object in self.next:
# if the object is not in the MachineList
# TODO: We must consider also the case that entities can be blocked before they can reach
# the heating point. In such a case they must be removed from the G.pendingEntities list
# and added again after they are unblocked
if not object in G.MachineList:
successorsAreMachines=False
break
# the hot flag should not be raised
if successorsAreMachines:
activeEntity.hot = True
#============================================================================
# sets the routing out element for the Source
......
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