Commit 1d4fc3c6 authored by Georgios Dagkakis's avatar Georgios Dagkakis

CoreObject to send isRequested also in the new way

parent 9164973f
......@@ -168,6 +168,7 @@ class Assembly(CoreObject):
for i in range(self.getActiveObjectQueue()[0].capacity): #this loop will be carried until the Frame is full with the parts
self.printTrace(self.id, waitEvent='(to load parts)')
self.expectedSignals['isRequested']=1
yield self.isRequested
if self.isRequested.value:
transmitter, eventTime=self.isRequested.value
......
......@@ -493,8 +493,10 @@ class CoreObject(ManPyObject):
self.printTrace(self.id, signalReceiver=self.receiver.id)
# assign the entry of the receiver
self.receiver.assignEntryTo()
succeedTuple=(self,self.env.now)
self.receiver.isRequested.succeed(succeedTuple)
if self.receiver.expectedSignals['isRequested']:
succeedTuple=(self,self.env.now)
self.receiver.isRequested.succeed(succeedTuple)
self.receiver.expectedSignals['isRequested']=0
return True
# if no receiver can accept then try to preempt a receive if the stations holds a critical order
self.preemptReceiver()
......
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