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
840d7423
Commit
840d7423
authored
Nov 01, 2013
by
Ioannis Papagiannopoulos
Committed by
Sebastien Robin
Nov 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BatchReassembly-method canAcceptAndIsRequested updated
parent
9dbd1c2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dream/simulation/BatchReassembly.py
dream/simulation/BatchReassembly.py
+6
-6
No files found.
dream/simulation/BatchReassembly.py
View file @
840d7423
...
...
@@ -98,11 +98,7 @@ class BatchReassembly(CoreObject):
self
.
reassemble
()
def
reassemble
(
self
):
#, activeEntity=None):
# maybe I can use as argument the activeEntity passing the getEntity as argument to this function in the run function
# for example
# self.decompose(self.getEntity)
def
reassemble
(
self
):
activeObject
=
self
.
getActiveObject
()
activeObjectQueue
=
activeObject
.
getActiveObjectQueue
()
# get the internal queue of the active core object
...
...
@@ -208,5 +204,9 @@ class BatchReassembly(CoreObject):
activeObject
.
predecessorIndex
=
i
maxTimeWaiting
=
timeWaiting
i
+=
1
# pick the predecessor waiting the more
return
isRequested
and
len
(
activeObjectQueue
<
self
.
numberOfSubBatches
)
return
isRequested
\
and
activeObject
.
Up
\
and
len
(
activeObjectQueue
<
self
.
numberOfSubBatches
)
\
and
(
len
(
activeObjectQueue
)
==
0
or
activeObjectQueue
[
0
].
type
!=
'Batch'
)
\
and
activeObject
.
getGiverObjectQueue
()[
0
].
batchId
==
activeObjectQueue
[
0
].
batchId
# return true when the Queue is not fully occupied and a predecessor is requesting it
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