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
62bcc3f5
Commit
62bcc3f5
authored
Apr 15, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACO: update return value
I don't know why yet, but returned value has changed
parent
01b6c23a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
dream/plugins/ACO.py
dream/plugins/ACO.py
+8
-2
No files found.
dream/plugins/ACO.py
View file @
62bcc3f5
...
@@ -118,7 +118,13 @@ class ACO(plugin.ExecutionPlugin):
...
@@ -118,7 +118,13 @@ class ACO(plugin.ExecutionPlugin):
break
break
for
ant
,
result
in
zip
(
scenario_list
,
result_list
):
for
ant
,
result
in
zip
(
scenario_list
,
result_list
):
ant
[
'result'
]
=
json
.
loads
(
result
)[
'result'
]
result
=
json
.
loads
(
result
)
if
'result'
in
result
:
# XXX is this still needed ???
result
=
result
[
'result'
]
assert
"result_list"
in
result
else
:
result
=
{
'result_list'
:
[
result
]}
ant
[
'result'
]
=
result
for
ant
in
scenario_list
:
for
ant
in
scenario_list
:
ant
[
'score'
]
=
self
.
_calculateAntScore
(
ant
)
ant
[
'score'
]
=
self
.
_calculateAntScore
(
ant
)
...
@@ -126,7 +132,7 @@ class ACO(plugin.ExecutionPlugin):
...
@@ -126,7 +132,7 @@ class ACO(plugin.ExecutionPlugin):
ants
.
extend
(
scenario_list
)
ants
.
extend
(
scenario_list
)
# remove ants that outputs the same schedules
# remove ants that outputs the same schedules
# XXX we in fact remove an
d
s that produce the same output json
# XXX we in fact remove an
t
s that produce the same output json
ants_without_duplicates
=
dict
()
ants_without_duplicates
=
dict
()
for
ant
in
ants
:
for
ant
in
ants
:
ant_result
,
=
copy
(
ant
[
'result'
][
'result_list'
])
ant_result
,
=
copy
(
ant
[
'result'
][
'result_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