Commit ab83067e authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Ioannis Papagiannopoulos

corrections. Now topology09 runs correctly. Check the TODO in Source

parent 06ec4e3a
......@@ -202,7 +202,7 @@ class CoreObject(Process):
#get the entity from the previous object and put it in front of the activeQ
activeObjectQueue.append(activeEntity)
# if the giverObject is blocked then unBlock it
if giverObject.exitIsAssigned():
if giverObject.exitIsAssignedTo():
giverObject.unAssignExit()
#append the time to schedule so that it can be read in the result
#remember that every entity has it's schedule which is supposed to be updated every time
......
......@@ -25,7 +25,7 @@ Created on 6 Feb 2013
models the exit of the model
'''
from SimPy.Simulation import now, Process, Resource, infinity, waituntil
from SimPy.Simulation import now, Process, Resource, infinity, waituntil, waitevent
import xlwt
from CoreObject import CoreObject
......
......@@ -26,7 +26,7 @@ Created on 8 Nov 2012
models the source object that generates the entities
'''
from SimPy.Simulation import now, Process, Resource, infinity, hold, SimEvent, activate
from SimPy.Simulation import now, Process, Resource, infinity, hold, SimEvent, activate, waitevent
from RandomNumberGenerator import RandomNumberGenerator
from CoreObject import CoreObject
from Globals import G
......@@ -67,7 +67,7 @@ class EntityGenerator(Process):
self.victim.numberOfArrivals+=1 # we have one new arrival
G.numberOfEntities+=1
yield hold,self,self.victim.calculateInterarrivalTime() # wait until the next arrival
self.victim.entityCreated.signal(str(entity.id)+' created')
self.victim.entityCreated.signal(str(entity.name)+' created')
#============================================================================
# The Source object is a Process
......@@ -132,7 +132,11 @@ class Source(CoreObject):
yield waitevent, self, self.canDispose
if activeObject.signalReceiver():
break
# note, it needs to lose the control here.
# TODO Need to think
else:
yield hold, self, 0
#============================================================================
# sets the routing out element for the Source
#============================================================================
......
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