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
d413a62a
Commit
d413a62a
authored
Nov 03, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not remove ants that produce the same deterministic result
parent
3b5a2c7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
dream/plugins/Batches/BatchesStochasticACO.py
dream/plugins/Batches/BatchesStochasticACO.py
+4
-1
No files found.
dream/plugins/Batches/BatchesStochasticACO.py
View file @
d413a62a
...
...
@@ -139,12 +139,15 @@ class BatchesStochasticACO(BatchesACO):
# in this generation remove ants that outputs the same schedules
# XXX we in fact remove ants that produce the same output json
# XXX in the stochastic case maybe there is not benefit to remove ants.
# XXX so I kept totalExecutionTime to have them all
uniqueAntsInThisGeneration
=
dict
()
for
ant
in
antsInCurrentGeneration
:
ant_result
,
=
copy
(
ant
[
'result'
][
'result_list'
])
ant_result
[
'general'
].
pop
(
'totalExecutionTime'
,
None
)
#
ant_result['general'].pop('totalExecutionTime', None)
ant_result
=
json
.
dumps
(
ant_result
,
sort_keys
=
True
)
uniqueAntsInThisGeneration
[
ant_result
]
=
ant
print
ant_result
# The ants in this generation are ranked based on their scores and the
# best (numberOfAntsForNextGeneration) are selected to carry their pheromones to next generation
...
...
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