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
bd67c7cf
Commit
bd67c7cf
authored
Mar 20, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically add Event Generator for queue statistics when using Queue stat widget
parent
9b3e3987
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
dream/simulation/GUI/Default.py
dream/simulation/GUI/Default.py
+13
-0
dream/simulation/GUI/PartJobShop.py
dream/simulation/GUI/PartJobShop.py
+1
-1
dream/simulation/GUI/Shifts.py
dream/simulation/GUI/Shifts.py
+1
-0
No files found.
dream/simulation/GUI/Default.py
View file @
bd67c7cf
...
@@ -366,6 +366,19 @@ class Simulation(object):
...
@@ -366,6 +366,19 @@ class Simulation(object):
def
_preprocess
(
self
,
data
):
def
_preprocess
(
self
,
data
):
"""Preprocess the data, for instance reading spreadsheet.
"""Preprocess the data, for instance reading spreadsheet.
"""
"""
# by default we add an event generator if using queue stats
if
self
.
getConfigurationDict
()[
"Dream-Configuration"
][
"gui"
][
"queue_stat"
]:
if
not
"__queue_stat"
in
data
[
"nodes"
]:
data
[
"nodes"
][
"__queue_stat"
]
=
{
"_class"
:
"Dream.EventGenerator"
,
"argumentDict"
:
"{}"
,
"duration"
:
10
,
"interval"
:
10
,
"method"
:
"Globals.countQueueMetrics"
,
"name"
:
"Queue Statistics"
,
"start"
:
1
,
"stop"
:
-
1
}
return
data
return
data
def
run
(
self
,
data
):
def
run
(
self
,
data
):
...
...
dream/simulation/GUI/PartJobShop.py
View file @
bd67c7cf
...
@@ -149,7 +149,7 @@ class Simulation(ACO.Simulation):
...
@@ -149,7 +149,7 @@ class Simulation(ACO.Simulation):
def
_preprocess
(
self
,
in_data
):
def
_preprocess
(
self
,
in_data
):
""" Set the WIP in queue from spreadsheet data.
""" Set the WIP in queue from spreadsheet data.
"""
"""
data
=
copy
(
in_data
)
data
=
copy
(
ACO
.
Simulation
.
_preprocess
(
self
,
in_data
)
)
self
.
data
=
data
self
.
data
=
data
now
=
datetime
.
now
()
now
=
datetime
.
now
()
...
...
dream/simulation/GUI/Shifts.py
View file @
bd67c7cf
...
@@ -14,6 +14,7 @@ class Simulation(DefaultSimulation):
...
@@ -14,6 +14,7 @@ class Simulation(DefaultSimulation):
def
_preprocess
(
self
,
data
):
def
_preprocess
(
self
,
data
):
"""Preprocess data, reading shift spreadsheet
"""Preprocess data, reading shift spreadsheet
"""
"""
data
=
DefaultSimulation
.
_preprocess
(
data
)
strptime
=
datetime
.
datetime
.
strptime
strptime
=
datetime
.
datetime
.
strptime
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
now
=
strptime
(
data
[
'general'
][
'currentDate'
],
'%Y/%m/%d'
)
...
...
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