Commit d7976d40 authored by Georgios Dagkakis's avatar Georgios Dagkakis

objects have to recreate signal in every replications. TODO check why and which others need it

parent 13451009
......@@ -132,6 +132,11 @@ class CoreObject(Process):
# TODO, think what to do in multiple runs
# TODO, this should be also updated in Globals.setWIP (in case we have initial wip)
self.wipStatList=[[0,0]]
# signalizing an event that activates the generator
self.isRequested=SimEvent('isRequested')
self.canDispose=SimEvent('canDispose')
self.interruptionEnd=SimEvent('interruptionEnd')
self.interruptionStart=SimEvent('interruptionStart')
# =======================================================================
# the main process of the core object
......
......@@ -211,11 +211,17 @@ class Machine(CoreObject):
# flag notifying that there is operator assigned to the actievObject
self.assignedOperator=True
self.brokerIsSet=SimEvent('brokerIsSet')
# this event is generated every time an operator is requested by machine for Load operation type.
# if the machine has not succeeded in getting an entity due to the resource absence
# and waits for the next event to get the entity,
# then it must be signalled that the operator is now available
self.loadOperatorAvailable=SimEvent('loadOperatorAvailable')
# =======================================================================
# the main process of the machine
# =======================================================================
def run(self):
# check if there is WIP and signal receiver
self.initialSignalReceiver()
# execute all through simulation time
while 1:
......
......@@ -84,6 +84,9 @@ class Queue(CoreObject):
CoreObject.initialize(self)
# initialise the internal Queue (type Resource) of the Queue object
self.Res=Resource(self.capacity)
# event used by router
self.loadOperatorAvailable=SimEvent('loadOperatorAvailable')
#===========================================================================
# run method of the queue
......
......@@ -55,7 +55,6 @@ class EntityGenerator(Process):
# the generator of the EntitiesGenerator
#===========================================================================
def run(self):
print '1'
while 1:
entity=self.victim.createEntity() # create the Entity object and assign its name
entity.creationTime=now() # assign the current simulation time as the Entity's creation time
......
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