Commit 29802823 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Sebastien Robin

reinstatement of code to output trace (if it is yes on the topology)

parent 72a309a8
......@@ -3,7 +3,7 @@
"_class": "Dream.Configuration",
"numberOfReplications": "1",
"maxSimTime": "1440",
"trace": "No",
"trace": "Yes",
"confidenceLevel": "0.95"
},
"elementList": [
......
......@@ -345,7 +345,15 @@ def main(argv=[], input_data=None):
#carry on the post processing operations for every model resource in the topology
for model_resource in G.RepairmanList:
model_resource.postProcessing(G.maxSimTime)
model_resource.postProcessing(G.maxSimTime)
#output trace to excel
if(G.trace=="Yes"):
G.traceFile.save('trace'+str(i+1)+'.xls')
G.traceIndex=0 #index that shows in what row we are
G.sheetIndex=1 #index that shows in what sheet we are
G.traceFile = xlwt.Workbook() #create excel file
G.traceSheet = G.traceFile.add_sheet('sheet '+str(G.sheetIndex), cell_overwrite_ok=True) #create excel sheet
G.outputJSONFile=open('outputJSON.json', mode='w')
G.outputJSON['_class'] = 'Dream.Simulation';
......
......@@ -191,8 +191,9 @@ class Machine(CoreObject):
def checkIfMachineIsUp(self):
return self.Up
#calculates the processing time
def calculateProcessingTime(self):
return self.rng.generateNumber()
return self.rng.generateNumber() #this is if we have a default processing time for all the entities
#checks if the Machine can accept an entity
#it checks also who called it and returns TRUE only to the predecessor that will give the entity.
......
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