Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ST7-Intel
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Maréchal
ST7-Intel
Commits
114a4667
Commit
114a4667
authored
Mar 23, 2021
by
Matthieu Oberon
Browse files
Options
Downloads
Patches
Plain Diff
add functionality to record of best_costs in file
parent
3dbd9140
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Appli-iso3dfd/ACO.py
+3
-0
3 additions, 0 deletions
Appli-iso3dfd/ACO.py
with
3 additions
and
0 deletions
Appli-iso3dfd/ACO.py
+
3
−
0
View file @
114a4667
...
...
@@ -124,6 +124,9 @@ def ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter, n1_max=256, n2_max
if
best_cost
<
cost_opti
:
cost_opti
=
best_cost
path_opti
=
best_p
if
Me
==
0
:
with
open
(
"
cost_opti.txt
"
,
'
a
'
)
as
file
:
file
.
write
(
f
"
{
cost_opti
}
\n
"
)
n1
=
256
*
(
2
**
(
path_opti
[
0
]
-
1
))
n2
=
256
*
(
2
**
(
path_opti
[
1
]
-
1
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment