Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
e968c6d1
Commit
e968c6d1
authored
Nov 04, 2013
by
Georgios Dagkakis
Committed by
Sebastien Robin
Nov 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output of trace moved to another script so that it can be called from whichever main script
parent
3efe3602
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
dream/simulation/ExcelHandler.py
dream/simulation/ExcelHandler.py
+11
-0
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+2
-7
No files found.
dream/simulation/ExcelHandler.py
0 → 100644
View file @
e968c6d1
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
dream/simulation/LineGenerationJSON.py
View file @
e968c6d1
...
@@ -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'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment