Commit d8abad93 authored by Georgios Dagkakis's avatar Georgios Dagkakis

Exit updated

parent 63d66d46
......@@ -77,6 +77,8 @@ class CoreObject(object):
def parseInputs(self, inputsDict):
self.id = inputsDict.get('id')
self.objName = inputsDict.get('name')
from Globals import G
G.ObjList.append(self) # add object to ObjList
def initialize(self):
from Globals import G
......
......@@ -36,20 +36,27 @@ from CoreObject import CoreObject
class Exit(CoreObject):
family='Exit'
def __init__(self, id, name=None):
if not name:
name = id
CoreObject.__init__(self, id, name)
self.predecessorIndex=0 # holds the index of the predecessor from which the Exit will take an entity next
# general properties of the Exit
def __init__(self, id='', name='', inputsDict={}):
self.type="Exit" # XXX needed ?
#lists to hold statistics of multiple runs
self.Exits=[]
self.UnitExits=[]
self.Lifespan=[]
self.TaktTime=[]
self.TaktTime=[]
# if input is given in a dictionary
if inputsDict:
CoreObject.__init__(self, inputsDict=inputsDict)
else:
CoreObject.__init__(self, id, name)
# =======================================================================
# parses inputs if they are given in a dictionary
# =======================================================================
def parseInputs(self, inputsDict):
CoreObject.parseInputs(self, inputsDict)
from Globals import G
G.ExitList.append(self)
def initialize(self):
# using the Process __init__ and not the CoreObject __init__
......
......@@ -227,8 +227,6 @@ class Machine(CoreObject):
G.MachineList.append(self) # add machine to global MachineList
if self.operatorPool!="None":
G.OperatedMachineList.append(self) # add the machine to the operatedMachines List
G.ObjList.append(self) # add machine to ObjList
# =======================================================================
# initialize the machine
......
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