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
82f22365
Commit
82f22365
authored
Jan 29, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose some ACO parameters
parent
e7436630
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
dream/simulation/GUI/ACO.py
dream/simulation/GUI/ACO.py
+17
-2
No files found.
dream/simulation/GUI/ACO.py
View file @
82f22365
...
...
@@ -11,6 +11,20 @@ class Simulation(DefaultSimulation):
max_results
=
4
def
getConfigurationDict
(
self
):
conf
=
DefaultSimulation
.
getConfigurationDict
(
self
)
conf
[
"Dream-Configuration"
][
"property_list"
].
append
(
{
"id"
:
"numberOfGenerations"
,
"type"
:
"integer"
,
"_class"
:
"Dream.Property"
,
"_default"
:
"10"
}
)
conf
[
"Dream-Configuration"
][
"property_list"
].
append
(
{
"id"
:
"numberOfAntsPerGenerations"
,
"type"
:
"integer"
,
"_class"
:
"Dream.Property"
,
"_default"
:
"20"
}
)
return
conf
def
_preprocess
(
self
,
data
):
"""Override in subclass to preprocess data.
"""
...
...
@@ -52,8 +66,9 @@ class Simulation(DefaultSimulation):
# Number of times new ants are to be created, i.e. number of generations (a
# generation can have more than 1 ant)
for
i
in
range
(
10
):
for
j
in
range
(
20
):
# number of ants created per generation
for
i
in
range
(
int
(
data
[
"general"
][
"numberOfGenerations"
])):
# number of ants created per generation
for
j
in
range
(
int
(
data
[
"general"
][
"numberOfAntsPerGenerations"
])):
# an ant dictionary to contain rule to queue assignment information
ant
=
{}
# for each of the machines, rules are randomly picked from the
...
...
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