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
0ddbce33
Commit
0ddbce33
authored
Feb 18, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AddBatchStations plugin to work if user leave workingBatchSize blank
parent
f710963d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
dream/plugins/AddBatchStations.py
dream/plugins/AddBatchStations.py
+5
-2
No files found.
dream/plugins/AddBatchStations.py
View file @
0ddbce33
...
@@ -16,7 +16,6 @@ class AddBatchStations(plugin.InputPreparationPlugin):
...
@@ -16,7 +16,6 @@ class AddBatchStations(plugin.InputPreparationPlugin):
def
preprocess
(
self
,
data
):
def
preprocess
(
self
,
data
):
nodes
=
copy
(
data
[
'graph'
][
'node'
])
nodes
=
copy
(
data
[
'graph'
][
'node'
])
edges
=
copy
(
data
[
'graph'
][
'edge'
])
edges
=
copy
(
data
[
'graph'
][
'edge'
])
data_uri_encoded_input_data
=
data
[
'input'
].
get
(
self
.
configuration_dict
[
'input_id'
],
{})
# get the number of units for a standard batch
# get the number of units for a standard batch
standardBatchUnits
=
0
standardBatchUnits
=
0
...
@@ -126,7 +125,11 @@ class AddBatchStations(plugin.InputPreparationPlugin):
...
@@ -126,7 +125,11 @@ class AddBatchStations(plugin.InputPreparationPlugin):
# returns true if it is needed to add decomposition/reassembly
# returns true if it is needed to add decomposition/reassembly
def
checkIfMachineNeedsAddition
(
self
,
data
,
machineId
,
standardBatchUnits
):
def
checkIfMachineNeedsAddition
(
self
,
data
,
machineId
,
standardBatchUnits
):
nodes
=
copy
(
data
[
'graph'
][
'node'
])
nodes
=
copy
(
data
[
'graph'
][
'node'
])
workingBatchSize
=
int
(
nodes
[
machineId
].
get
(
'workingBatchSize'
,
standardBatchUnits
))
workingBatchSize
=
(
nodes
[
machineId
].
get
(
'workingBatchSize'
,
standardBatchUnits
))
if
workingBatchSize
:
workingBatchSize
=
int
(
workingBatchSize
)
else
:
# if the workingBatchSize is not defined by the user set it to standardBatchUnits
workingBatchSize
=
standardBatchUnits
# if the workingBatchSize is equal or higher to standardBatchUnits we do not need to add decomposition/reassembly
# if the workingBatchSize is equal or higher to standardBatchUnits we do not need to add decomposition/reassembly
if
workingBatchSize
>=
standardBatchUnits
:
if
workingBatchSize
>=
standardBatchUnits
:
return
False
return
False
...
...
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