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

correction in signal reset

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