Commit c2bb4d25 authored by Georgios Dagkakis's avatar Georgios Dagkakis

added NotImplementedError exception in CoreObject's run

parent a5b5eb15
......@@ -65,7 +65,7 @@ class CoreObject(Process):
#the main process of the core object
#this is dummy, every object must have its own implementation
def run(self):
yield hold,self,0
raise NotImplementedError("Subclass must define 'run' method")
#sets the routing in and out elements for the Object
def defineRouting(self, p, n):
......
......@@ -79,7 +79,7 @@ class Queue(CoreObject):
self.processingTimeOfCurrentEntity=0 #holds the total processing time that the current entity required
self.waitToDispose=False #shows if the object waits to dispose an entity
def run(self):
while 1:
yield waituntil, self, self.canAcceptAndIsRequested #wait until the Queue can accept an entity
......@@ -88,7 +88,7 @@ class Queue(CoreObject):
#if entity just got to the dummyQ set its startTime as the current time
if self.isDummy:
self.Res.activeQ[0].startTime=now()
self.Res.activeQ[0].startTime=now()
#checks if the Q has one available place
def checkIfQHasPlace(self):
......
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