Commit 82815e3c authored by Georgios Dagkakis's avatar Georgios Dagkakis

correction in signal reset

parent f0069316
......@@ -51,8 +51,6 @@ class Failure(ObjectInterruption):
self.repairman=repairman # the resource that may be needed to fix the failure
# if now resource is needed this will be "None"
self.type="Failure"
self.id=0
# shows how the time to failure is measured
# 'constant' means it counts not matter the state of the victim
# 'onShift' counts only if the victim is onShift
......
......@@ -606,10 +606,10 @@ class Machine(CoreObject):
# this loop is repeated until the processing time is expired with no failure
# check when the processingEndedFlag switched to false
self.expectedSignals['interruptionStart']=1
self.expectedSignals['preemptQueue']=1
while processingNotFinished:
self.expectedSignals['interruptionStart']=1
self.expectedSignals['preemptQueue']=1
# timeLastProcessingStarted : dummy variable to keep track of the time that the processing starts after
# every interruption
self.timeLastProcessingStarted=self.env.now
......@@ -634,9 +634,7 @@ class Machine(CoreObject):
self.releaseOperator()
self.expectedSignals['brokerIsSet']=1
yield self.brokerIsSet
self.expectedSignals['brokerIsSet']=0
transmitter, eventTime=self.brokerIsSet.value
......@@ -833,7 +831,6 @@ class Machine(CoreObject):
if not self.haveToDispose():
break
self.expectedSignals['interruptionStart']=0
self.expectedSignals['canDispose']=0
# =======================================================================
......
......@@ -121,6 +121,7 @@ class ObjectInterruption(ManPyObject):
self.victim.interruptedBy=self.type
succeedTuple=(self,self.env.now)
self.victim.interruptionStart.succeed(succeedTuple)
self.victim.expectedSignals['interruptionStart']=0
# if the machines are operated by dedicated operators
if self.victim.dedicatedOperator:
# request allocation
......
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