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
60c595a4
Commit
60c595a4
authored
Nov 18, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
if we have only deterministic evaluation in generations do not set score to zero
parent
6ea4f45b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
dream/plugins/Batches/BatchesStochasticACO.py
dream/plugins/Batches/BatchesStochasticACO.py
+7
-5
No files found.
dream/plugins/Batches/BatchesStochasticACO.py
View file @
60c595a4
...
...
@@ -210,10 +210,12 @@ class BatchesStochasticACO(BatchesACO):
self
.
outputSheet
.
write
(
self
.
rowIndex
,
3
,
-
ant
[
'score'
])
self
.
rowIndex
+=
1
# for the ants that were not evaluated stochastically set score = 0
for
ant
in
antsInCurrentGeneration
:
if
ant
[
'evaluationType'
]
==
'deterministic'
:
ant
[
'score'
]
=
0
# if we had stochastic evaluation of ants at the end of the generation
if
numberOfAntsForStochasticEvaluationInGeneration
:
# for the ants that were not evaluated stochastically set score = 0
for
ant
in
antsInCurrentGeneration
:
if
ant
[
'evaluationType'
]
==
'deterministic'
:
ant
[
'score'
]
=
0
# if we had stochastic evaluation keep only those ants in sorting
if
numberOfAntsForStochasticEvaluationInGeneration
:
...
...
@@ -263,7 +265,7 @@ class BatchesStochasticACO(BatchesACO):
self
.
outputSheet
.
write
(
self
.
rowIndex
,
2
,
ant
[
'key'
])
self
.
rowIndex
+=
1
ant
[
'result'
]
=
self
.
runOneScenario
(
ant
[
'input'
])[
'result'
]
ant
[
'score'
]
=
self
.
calculateStochasticAntScore
(
ant
)
ant
[
'score'
]
=
self
.
calculateStochasticAntScore
(
ant
)
self
.
outputSheet
.
write
(
self
.
rowIndex
,
2
,
'Average Units Throughput'
)
self
.
outputSheet
.
write
(
self
.
rowIndex
,
3
,
-
ant
[
'score'
])
self
.
rowIndex
+=
1
...
...
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