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
c821a097
Commit
c821a097
authored
Nov 12, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set 0 score for ants that were only evaluated deterministically
parent
28f99cec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
dream/plugins/Batches/BatchesStochasticACO.py
dream/plugins/Batches/BatchesStochasticACO.py
+9
-5
No files found.
dream/plugins/Batches/BatchesStochasticACO.py
View file @
c821a097
...
@@ -212,11 +212,15 @@ class BatchesStochasticACO(BatchesACO):
...
@@ -212,11 +212,15 @@ 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 the ants that were not evaluated stochastically set score = 0
# for the ants that were not evaluated stochastically set score = 0
# antsNotEvaluatedStochastically=[x for x in uniqueAntsInThisGeneration if x not in antsForStochasticEvaluationInGeneration]
for
ant
in
antsInCurrentGeneration
:
# for ant in antsNotEvaluatedStochastically:
antEvaluatedStochastically
=
False
# ant['score']=0
for
stochasticAnt
in
antsForStochasticEvaluationInGeneration
:
if
ant
[
'key'
]
==
stochasticAnt
[
'key'
]:
antEvaluatedStochastically
=
True
if
not
antEvaluatedStochastically
:
ant
[
'score'
]
=
0
# if we had stochastic evaluation keep only those ants in sorting
# if we had stochastic evaluation keep only those ants in sorting
if
numberOfAntsForStochasticEvaluationInGeneration
:
if
numberOfAntsForStochasticEvaluationInGeneration
:
uniqueAntsInThisGeneration
=
dict
()
uniqueAntsInThisGeneration
=
dict
()
...
...
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