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
90948150
Commit
90948150
authored
Dec 05, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aco to statically define seed
parent
c4e847c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
dream/simulation/GUI/ACO.py
dream/simulation/GUI/ACO.py
+5
-1
No files found.
dream/simulation/GUI/ACO.py
View file @
90948150
...
...
@@ -99,8 +99,12 @@ class Simulation(DefaultSimulation):
ant
=
{}
# for each of the machines, rules are randomly picked from the
# options list
l
=
1
# used to create different random from every key
for
k
in
collated
.
keys
():
ant
[
k
]
=
random
.
choice
(
collated
[
k
])
from
random
import
Random
rnd
=
Random
(
1
+
i
*
j
*
l
)
l
+=
1
ant
[
k
]
=
rnd
.
choice
(
collated
[
k
])
# TODO: function to calculate ant id. Store ant id in ant dict
ant_key
=
repr
(
ant
)
# if the ant was not already tested, only then test it
...
...
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