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
95bbebcc
Commit
95bbebcc
authored
Aug 19, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction so that plugin does not use the standard units as hard-coded
parent
4d266b2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dream/plugins/Batches/BatchesWIPShort.py
dream/plugins/Batches/BatchesWIPShort.py
+3
-3
No files found.
dream/plugins/Batches/BatchesWIPShort.py
View file @
95bbebcc
...
@@ -43,7 +43,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
...
@@ -43,7 +43,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
sharingStations
=
[]
sharingStations
=
[]
if
workingBatchSize
!=
standardBatchUnits
:
if
workingBatchSize
!=
standardBatchUnits
:
sharingStations
=
self
.
findSharingStations
(
data
,
stationId
)
sharingStations
=
self
.
findSharingStations
(
data
,
stationId
)
self
.
checkIfDefinitionIsValid
(
data
,
WIPData
,
stationId
,
sharingStations
)
self
.
checkIfDefinitionIsValid
(
data
,
WIPData
,
stationId
,
sharingStations
,
standardBatchUnits
)
return
data
return
data
...
@@ -82,7 +82,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
...
@@ -82,7 +82,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
return
sharingStations
return
sharingStations
# validates the definition of WIP and throws an error message in case it is not valid, i.e. not full batches are formed
# validates the definition of WIP and throws an error message in case it is not valid, i.e. not full batches are formed
def
checkIfDefinitionIsValid
(
self
,
data
,
WIPData
,
stationId
,
sharingStations
):
def
checkIfDefinitionIsValid
(
self
,
data
,
WIPData
,
stationId
,
sharingStations
,
standardBatchUnits
):
# find all the stations in the group. For example PackagingA may not share batches with PackagingB.
# find all the stations in the group. For example PackagingA may not share batches with PackagingB.
# but carding does share with both so the group should contain all 3 stations
# but carding does share with both so the group should contain all 3 stations
allStations
=
[
stationId
]
+
sharingStations
allStations
=
[
stationId
]
+
sharingStations
...
@@ -100,7 +100,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
...
@@ -100,7 +100,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
totalUnits
+=
int
(
row
[
1
])
totalUnits
+=
int
(
row
[
1
])
if
row
[
2
]:
if
row
[
2
]:
totalUnits
+=
int
(
row
[
2
])
totalUnits
+=
int
(
row
[
2
])
assert
totalUnits
%
80
==
0
,
'wrong wip definition in group '
+
str
(
allStations
)
+
'. Not full batches.'
assert
totalUnits
%
standardBatchUnits
==
0
,
'wrong wip definition in group '
+
str
(
allStations
)
+
'. Not full batches.'
...
...
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