Commit 86c1267f authored by Georgios Dagkakis's avatar Georgios Dagkakis

In all objects Run() method changed to run() for the shake of consistency

parent 143fea7f
......@@ -81,7 +81,7 @@ class Assembly(Process):
self.Res.waitQ=[]
def Run(self):
def run(self):
while 1:
yield waituntil, self, self.canAcceptAndIsRequested #wait until the Assembly can accept a frame
#and one "frame" predecessor requests it
......
......@@ -60,7 +60,7 @@ class Exit(Process):
self.waitToDispose=False #shows if the machine waits to dispose an entity
def Run(self):
def run(self):
while 1:
yield waituntil, self, self.canAcceptAndIsRequested #wait until the Queue can accept an entity
#and one predecessor requests it
......
......@@ -53,7 +53,7 @@ class Failure(Process):
self.rngTTR=RandomNumberGenerator(self, self.distType)
self.rngTTR.avg=MTTR
def Run(self):
def run(self):
while 1:
#yield hold,self,self.calcTimeToFailure()
yield hold,self,self.rngTTF.generateNumber() #wait until a failure happens
......
......@@ -198,7 +198,7 @@ def initializeObjects():
def activateObjects():
for j in range(len(G.ObjList)):
try:
activate(G.ObjList[j],G.ObjList[j].Run())
activate(G.ObjList[j],G.ObjList[j].run())
except AttributeError:
pass
......
......@@ -86,12 +86,12 @@ class Machine(Process):
#if the failure distribution for the machine is fixed, activate the failure
if(self.failureDistType=="Fixed" or self.failureDistType=="Availability"):
MFailure=Failure(self, self.failureDistType, self.MTTF, self.MTTR, self.availability, self.id, self.repairman)
activate(MFailure,MFailure.Run())
activate(MFailure,MFailure.run())
self.Res=Resource(self.capacity)
#the main process of the machine
def Run(self):
def run(self):
#execute all through simulation time
while 1:
yield waituntil, self, self.canAcceptAndIsRequested #wait until the machine can accept an entity
......
......@@ -59,7 +59,7 @@ class Queue(Process):
self.waitToDispose=False #shows if the machine waits to dispose an entity
def Run(self):
def run(self):
while 1:
yield waituntil, self, self.canAcceptAndIsRequested #wait until the Queue can accept an entity
#and one predecessor requests it
......
......@@ -65,7 +65,7 @@ class Source(Process):
self.waitToDispose=False #shows if the machine waits to dispose an entity
def Run(self):
def run(self):
i=0
if(self.distType=="Fixed"): #if the distribution type is fixed
from Globals import G
......
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