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
29802823
Commit
29802823
authored
Sep 30, 2013
by
Georgios Dagkakis
Committed by
Sebastien Robin
Sep 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reinstatement of code to output trace (if it is yes on the topology)
parent
72a309a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
dream/simulation/JSONInputs/Topology01.json
dream/simulation/JSONInputs/Topology01.json
+1
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+9
-1
dream/simulation/Machine.py
dream/simulation/Machine.py
+2
-1
No files found.
dream/simulation/JSONInputs/Topology01.json
View file @
29802823
...
...
@@ -3,7 +3,7 @@
"_class"
:
"Dream.Configuration"
,
"numberOfReplications"
:
"1"
,
"maxSimTime"
:
"1440"
,
"trace"
:
"
No
"
,
"trace"
:
"
Yes
"
,
"confidenceLevel"
:
"0.95"
},
"elementList"
:
[
...
...
dream/simulation/LineGenerationJSON.py
View file @
29802823
...
...
@@ -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'
;
...
...
dream/simulation/Machine.py
View file @
29802823
...
...
@@ -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.
...
...
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