Commit 7f1f952b authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

RoutingQueue clean-up

parent 66e11605
......@@ -33,15 +33,6 @@ from Queue import Queue
# the Queue object
# ===========================================================================
class RoutingQueue(Queue):
# #===========================================================================
# # the __init__ method of the Queue
# #===========================================================================
# def __init__(self, id, name, capacity=1, isDummy=False, schedulingRule="FIFO", gatherWipStat=False,level=None):
# Queue.__init__(self, id, name,capacity,isDummy,schedulingRule,gatherWipStat)
# if level:
# assert level<=self.capacity, "the level cannot be bigger than the capacity of the queue"
# self.level=level
# =======================================================================
# checks if the Queue can dispose an entity to the following object
# it checks also who called it and returns TRUE
......@@ -83,23 +74,6 @@ class RoutingQueue(Queue):
entity.receiver=receiver
activeObjectQueue.sort(key=lambda x: x.receiver==receiver, reverse=True)
# # =======================================================================
# # removes an entity from the Object
# # =======================================================================
# def removeEntity(self, entity=None):
# activeEntity=Queue.removeEntity(self, entity) #run the default method
# # check if the queue is empty, if yes then try to signal the router, operators may need reallocation
# try:
# if self.level:
# if not len(self.getActiveObjectQueue()):
# from Globals import G
# if not G.Router.invoked:
# G.Router.invoked=True
# G.Router.isCalled.succeed(G.env.now)
# except:
# pass
# return activeEntity
# =======================================================================
# gets an entity from the predecessor that
# the predecessor index points to
......@@ -117,16 +91,6 @@ class RoutingQueue(Queue):
# if none of the siblings (same parentBatch) has gone through the buffer then the receiver should remain None
except:
pass
# # if the level is reached then try to signal the Router to reallocate the operators
# try:
# if self.level:
# if len(self.getActiveObjectQueue())==self.level:
# from Globals import G
# if not G.Router.invoked:
# G.Router.invoked=True
# G.Router.isCalled.succeed(G.env.now)
# except:
# pass
return activeEntity
# =======================================================================
......
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