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
a1a20c0b
Commit
a1a20c0b
authored
Nov 12, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not crash in case of zero throughput
parent
c821a097
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
dream/plugins/Batches/BatchesStochasticACO.py
dream/plugins/Batches/BatchesStochasticACO.py
+2
-6
No files found.
dream/plugins/Batches/BatchesStochasticACO.py
View file @
a1a20c0b
...
@@ -45,6 +45,8 @@ class BatchesStochasticACO(BatchesACO):
...
@@ -45,6 +45,8 @@ class BatchesStochasticACO(BatchesACO):
#id the class is Exit get the unitsThroughput
#id the class is Exit get the unitsThroughput
if
element_family
==
'Exit'
:
if
element_family
==
'Exit'
:
unitsThroughput
=
element
[
'results'
].
get
(
'unitsThroughput'
,
None
)
unitsThroughput
=
element
[
'results'
].
get
(
'unitsThroughput'
,
None
)
if
not
unitsThroughput
:
unitsThroughput
=
element
[
'results'
][
'throughput'
]
# below checking the predecessors of exit. If a predecessor is reassembly and
# below checking the predecessors of exit. If a predecessor is reassembly and
# has WIP add this also in the throughput
# has WIP add this also in the throughput
for
objectId
in
self
.
getPredecessors
(
ant
[
'input'
],
element
[
'id'
]):
for
objectId
in
self
.
getPredecessors
(
ant
[
'input'
],
element
[
'id'
]):
...
@@ -175,12 +177,6 @@ class BatchesStochasticACO(BatchesACO):
...
@@ -175,12 +177,6 @@ class BatchesStochasticACO(BatchesACO):
self
.
outputSheet
.
write
(
self
.
rowIndex
,
3
,
-
ant
[
'score'
])
self
.
outputSheet
.
write
(
self
.
rowIndex
,
3
,
-
ant
[
'score'
])
self
.
rowIndex
+=
1
self
.
rowIndex
+=
1
# for ant in scenario_list:
# ant['score'] = self._calculateAntScore(ant)
# self.outputSheet.write(self.rowIndex,0,'Units Throughput')
# self.outputSheet.write(self.rowIndex,1,-ant['score'])
# self.rowIndex+=1
ants
.
extend
(
scenario_list
)
ants
.
extend
(
scenario_list
)
antsInCurrentGeneration
.
extend
(
scenario_list
)
antsInCurrentGeneration
.
extend
(
scenario_list
)
...
...
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