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
97ba4dcb
Commit
97ba4dcb
authored
Jun 02, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
batches ACO to set fill sub-line to zero
parent
af83a2f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
dream/plugins/Batches/BatchesACO.py
dream/plugins/Batches/BatchesACO.py
+14
-4
No files found.
dream/plugins/Batches/BatchesACO.py
View file @
97ba4dcb
...
...
@@ -35,22 +35,32 @@ class BatchesACO(ACO):
# of options collated into a dictionary for ease of referencing in ManPy
def
createCollatedScenarios
(
self
,
data
):
collated
=
dict
()
# fill sub-line deactivated (default to zero)
collated
[
"4"
]
=
[
0.0
]
weightData
=
data
[
'input'
].
get
(
'ACO_weights_spreadsheet'
,
None
)
for
i
in
range
(
1
,
7
):
for
i
in
range
(
1
,
6
):
# to deactivate fill sub-line the index of 4 is surpassed
if
i
<
4
:
index
=
str
(
i
)
else
:
index
=
str
(
i
+
1
)
minValue
=
weightData
[
1
][
i
]
maxValue
=
weightData
[
2
][
i
]
stepValue
=
weightData
[
3
][
i
]
staticValue
=
weightData
[
4
][
i
]
if
staticValue
:
collated
[
str
(
i
)
]
=
[
float
(
staticValue
)]
collated
[
index
]
=
[
float
(
staticValue
)]
else
:
collated
[
str
(
i
)
]
=
[]
collated
[
index
]
=
[]
value
=
float
(
minValue
)
while
1
:
collated
[
str
(
i
)
].
append
(
round
(
float
(
value
),
2
))
collated
[
index
].
append
(
round
(
float
(
value
),
2
))
value
+=
float
(
stepValue
)
if
value
>
float
(
maxValue
):
break
from
pprint
import
pprint
pprint
(
collated
)
return
collated
# creates the ant scenario based on what ACO randomly selected
...
...
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