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

output of trace moved to another script so that it can be called from whichever main script

parent 3efe3602
from Globals import G
import xlwt
import xlrd
def outputTrace(fileNumber=1):
G.traceFile.save('trace'+str(fileNumber)+'.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
\ No newline at end of file
...@@ -76,8 +76,7 @@ from BatchSource import BatchSource ...@@ -76,8 +76,7 @@ from BatchSource import BatchSource
from BatchDecomposition import BatchDecomposition from BatchDecomposition import BatchDecomposition
from BatchReassembly import BatchReassembly from BatchReassembly import BatchReassembly
import xlwt import ExcelHandler
import xlrd
import time import time
import json import json
from random import Random from random import Random
...@@ -557,11 +556,7 @@ def main(argv=[], input_data=None): ...@@ -557,11 +556,7 @@ def main(argv=[], input_data=None):
#output trace to excel #output trace to excel
if(G.trace=="Yes"): if(G.trace=="Yes"):
G.traceFile.save('trace'+str(i+1)+'.xls') ExcelHandler.outputTrace(i)
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.outputJSONFile=open('outputJSON.json', mode='w')
G.outputJSON['_class'] = 'Dream.Simulation'; G.outputJSON['_class'] = 'Dream.Simulation';
......
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