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
bbfaa106
Commit
bbfaa106
authored
Jul 15, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Sep 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new method routing() added to Batch
parent
6365cc75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
dream/simulation/Batch.py
dream/simulation/Batch.py
+13
-3
No files found.
dream/simulation/Batch.py
View file @
bbfaa106
...
...
@@ -28,7 +28,9 @@ Batch is an Entity that contains a number of units
from
Entity
import
Entity
from
SubBatch
import
SubBatch
#The batch object
#===============================================================================
# The batch object
#===============================================================================
class
Batch
(
Entity
):
type
=
"Batch"
...
...
@@ -37,6 +39,14 @@ class Batch(Entity):
self
.
numberOfUnits
=
numberOfUnits
self
.
numberOfSubBatches
=
1
#integer that shows in how many sub batches is the batch broken
self
.
subBatchList
=
[]
#list that contains the sub-batches that this batch has been broken into
self
.
routing
=
[]
# list that holds the route a child entity has picked in case the other children have to follow the same routing
#===========================================================================
# finds the schedule of each child and returns the combined route
# (it should be the same for every sub-batch)
#===========================================================================
def
routing
(
self
):
route
=
[]
for
child
in
self
.
subBatchList
:
route
.
append
([
step
for
step
,
time
in
child
.
schedule
])
route
=
list
(
set
(
route
))
return
route
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