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
c62ce40c
Commit
c62ce40c
authored
Jan 12, 2015
by
Georgios Dagkakis
Committed by
Ioannis Papagiannopoulos
Jan 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip working in Batches instance
parent
37837dcd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
6 deletions
+66
-6
dream/plugins/BatchesWIPSpreadsheet.py
dream/plugins/BatchesWIPSpreadsheet.py
+46
-0
dream/plugins/ReadShiftFromSpreadsheet.py
dream/plugins/ReadShiftFromSpreadsheet.py
+16
-0
dream/simulation/Examples/BatchAllInOneEmpty.json
dream/simulation/Examples/BatchAllInOneEmpty.json
+4
-6
No files found.
dream/plugins/BatchesWIPSpreadsheet.py
0 → 100644
View file @
c62ce40c
from
copy
import
copy
import
json
import
time
import
random
import
operator
from
datetime
import
datetime
from
dream.plugins
import
plugin
class
BatchesWIPSpreadsheet
(
plugin
.
InputPreparationPlugin
):
""" Input prepration
read wip-srpeadsheet data and update the wip property of the stations.
"""
def
preprocess
(
self
,
data
):
""" Set the WIP in queue from spreadsheet data.
"""
wipData
=
data
[
'input'
].
get
(
'wip_spreadsheet'
,
None
)
node
=
data
[
'graph'
][
'node'
]
if
wipData
:
wipData
.
pop
(
0
)
# pop the column names
for
wipItem
in
wipData
:
partId
=
wipItem
[
0
]
# in case there is no id, do not process the element
if
not
partId
:
continue
stationId
=
wipItem
[
1
]
numberOfUnits
=
wipItem
[
2
]
unitsToProcess
=
wipItem
[
3
]
if
not
unitsToProcess
:
unitsToProcess
=
numberOfUnits
_class
=
"Dream."
+
wipItem
[
4
]
parentBatchId
=
wipItem
[
5
]
wip
=
node
[
stationId
].
get
(
'wip'
,[])
if
not
wip
:
node
[
stationId
][
'wip'
]
=
[]
node
[
stationId
][
'wip'
].
append
({
"_class"
:
_class
,
"id"
:
partId
,
"name"
:
partId
,
"numberOfUnits"
:
numberOfUnits
,
"unitsToProcess"
:
unitsToProcess
,
"parentBatchId"
:
parentBatchId
})
return
data
\ No newline at end of file
dream/plugins/ReadShiftFromSpreadsheet.py
0 → 100644
View file @
c62ce40c
from
copy
import
copy
import
json
import
time
import
random
import
operator
from
datetime
import
datetime
from
dream.plugins
import
plugin
class
ReadShiftFromSpreadsheet
(
plugin
.
InputPreparationPlugin
):
""" Input prepration
read wip-srpeadsheet data and update the wip property of the stations.
"""
def
preprocess
(
self
,
data
):
return
data
\ No newline at end of file
dream/simulation/Examples/BatchAllInOneEmpty.json
View file @
c62ce40c
...
...
@@ -833,25 +833,23 @@
},
"preprocessing"
:
{
"plugin_list"
:
[{
"plugin"
:
"ReadShiftFromSpreadsheet"
,
"plugin"
:
"ReadShiftFromSpreadsheet
.ReadShiftFromSpreadsheet
"
,
"input_id"
:
"ShiftSpreadsheet"
},
{
"plugin"
:
"
ReadWipFrom
Spreadsheet"
,
"plugin"
:
"
BatchesWIPSpreadsheet.BatchesWIP
Spreadsheet"
,
"input_id"
:
"WipSpreadsheet"
}
]
},
"processing"
:
{
"plugin_list"
:
[{
"plugin"
:
"plugin.
PartJobShop
"
,
"plugin"
:
"plugin.
DefaultExecutionPlugin
"
,
"input_id"
:
"Simulation"
}
]
},
"postprocessing"
:
{
"plugin_list"
:
[{
"plugin"
:
"CalculateConfidenceIntervals"
}
"plugin_list"
:
[
]
},
"general"
:
{
...
...
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