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):
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.nextFrameIds=[] #list with the ids of the next objects that receive frames
self.next=[]
#lists to hold statistics of multiple runs
self.Waiting=[]
......@@ -131,10 +132,8 @@ class Dismantle(CoreObject):
#checks if the Dismantle can accept an entity
def canAccept(self):
return len(self.Res.activeQ)==0
#sets the routing in and out elements for the Dismantle
def defineRouting(self, p, np, nf):
self.previous=p
def definePartFrameRouting(self, np, nf):
self.nextPart=np
self.nextFrame=nf
......
......@@ -222,8 +222,7 @@ def setTopology():
for q in range(len(G.ObjList)):
if G.ObjList[q].id==element.nextIds[j]:
next.append(G.ObjList[q])
if element.type=="Source":
element.defineRouting(next)
elif element.type=="Exit":
......@@ -241,7 +240,8 @@ def setTopology():
for q in range(len(G.ObjList)):
if G.ObjList[q].id==element.nextFrameIds[j]:
nextFrame.append(G.ObjList[q])
element.defineRouting(previous, nextPart, nextFrame)
element.defineRouting(previous, next)
element.definePartFrameRouting(nextPart, nextFrame)
else:
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