Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
22843365
Commit
22843365
authored
Mar 29, 2000
by
Christopher Alfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug that caused hang on only 1 switch (and other very rare cases).
parent
68444442
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
assign/assign.cc
assign/assign.cc
+6
-4
No files found.
assign/assign.cc
View file @
22843365
...
...
@@ -414,11 +414,11 @@ int assign()
absphys
[
n3
]
=
physnodes
[
n3
];
}
if
(
bestscore
==
0
)
{
if
(
bestscore
<
0.11
f
)
{
#ifdef VERBOSE
cout
<<
"Problem started optimal
\n
"
;
#endif
return
1
;
goto
DONE
;
}
while
(
temp
>=
2
)
{
...
...
@@ -441,12 +441,12 @@ int assign()
newpos
=
random
()
%
nparts
;
scupdate
(
n
,
newpos
);
newscore
=
score
();
if
(
newscore
<
0.1
f
)
{
if
(
newscore
<
0.
1
1
f
)
{
timeend
=
used_time
(
timestart
);
cout
<<
"OPTIMAL (0.0) in "
<<
iters
<<
" iters, "
<<
timeend
<<
" seconds"
<<
endl
;
return
1
;
goto
DONE
;
}
/* So it's negative if bad */
scorediff
=
bestscore
-
newscore
;
...
...
@@ -471,6 +471,8 @@ int assign()
temp
*=
.9
;
}
DONE:
forall_nodes
(
n
,
G
)
{
bestnodes
[
n
]
=
absnodes
[
n
];
}
...
...
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