Commit e3568381 authored by Georgios Dagkakis's avatar Georgios Dagkakis

dismantle routing method changed. Defining of where parts and frames go...

dismantle routing method changed. Defining of where parts and frames go handled by separate method and the defineRouting one is moved to the abstract
parent 9d3fdbce
...@@ -53,6 +53,7 @@ class Dismantle(CoreObject): ...@@ -53,6 +53,7 @@ class Dismantle(CoreObject):
self.nextIds=[] #list with the ids of the next objects in the flow self.nextIds=[] #list with the ids of the next objects in the flow
self.nextPartIds=[] #list with the ids of the next objects that receive parts self.nextPartIds=[] #list with the ids of the next objects that receive parts
self.nextFrameIds=[] #list with the ids of the next objects that receive frames self.nextFrameIds=[] #list with the ids of the next objects that receive frames
self.next=[]
#lists to hold statistics of multiple runs #lists to hold statistics of multiple runs
self.Waiting=[] self.Waiting=[]
...@@ -132,9 +133,7 @@ class Dismantle(CoreObject): ...@@ -132,9 +133,7 @@ class Dismantle(CoreObject):
def canAccept(self): def canAccept(self):
return len(self.Res.activeQ)==0 return len(self.Res.activeQ)==0
#sets the routing in and out elements for the Dismantle def definePartFrameRouting(self, np, nf):
def defineRouting(self, p, np, nf):
self.previous=p
self.nextPart=np self.nextPart=np
self.nextFrame=nf self.nextFrame=nf
......
...@@ -223,7 +223,6 @@ def setTopology(): ...@@ -223,7 +223,6 @@ def setTopology():
if G.ObjList[q].id==element.nextIds[j]: if G.ObjList[q].id==element.nextIds[j]:
next.append(G.ObjList[q]) next.append(G.ObjList[q])
if element.type=="Source": if element.type=="Source":
element.defineRouting(next) element.defineRouting(next)
elif element.type=="Exit": elif element.type=="Exit":
...@@ -241,7 +240,8 @@ def setTopology(): ...@@ -241,7 +240,8 @@ def setTopology():
for q in range(len(G.ObjList)): for q in range(len(G.ObjList)):
if G.ObjList[q].id==element.nextFrameIds[j]: if G.ObjList[q].id==element.nextFrameIds[j]:
nextFrame.append(G.ObjList[q]) nextFrame.append(G.ObjList[q])
element.defineRouting(previous, nextPart, nextFrame) element.defineRouting(previous, next)
element.definePartFrameRouting(nextPart, nextFrame)
else: else:
element.defineRouting(previous, next) element.defineRouting(previous, next)
......
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