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

change so that the batches instance works correct with the daily attainment

parent 8da10ad6
...@@ -38,10 +38,17 @@ class EventGenerator(ObjectInterruption): ...@@ -38,10 +38,17 @@ class EventGenerator(ObjectInterruption):
self.name=name self.name=name
self.start=float(start) #the time that the generator will be activated for the first time self.start=float(start) #the time that the generator will be activated for the first time
self.stop=float(stop) #the time that the generator will stop to trigger events self.stop=float(stop) #the time that the generator will stop to trigger events
# negative stop means infinity
if self.stop<0:
self.stop=float('inf')
self.interval=float(interval) #the interval that the generator sleeps self.interval=float(interval) #the interval that the generator sleeps
self.duration=float(duration) #the duration that the generation is awake (this is not active for now) self.duration=float(duration) #the duration that the generation is awake (this is not active for now)
self.method=method #the method to be invoked self.method=method #the method to be invoke
self.argumentDict=argumentDict #the arguments of the method given in a dict self.argumentDict=argumentDict
# if the argumentDict is passed as string convert it to dict
if isinstance(self.argumentDict, basestring):
import ast
self.argumentDict=ast.literal_eval(self.argumentDict)
from Globals import G from Globals import G
G.EventGeneratorList.append(self) G.EventGeneratorList.append(self)
self.method=method self.method=method
......
...@@ -300,7 +300,7 @@ def setWIP(entityList): ...@@ -300,7 +300,7 @@ def setWIP(entityList):
entity.currentStation.expectedSignals['initialWIP']=0 entity.currentStation.expectedSignals['initialWIP']=0
def countIntervalThroughput(): def countIntervalThroughput(**kw):
from Exit import Exit from Exit import Exit
currentExited=0 currentExited=0
for obj in G.ObjList: for obj in G.ObjList:
......
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