Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
7b30c11b
Commit
7b30c11b
authored
May 21, 2018
by
Neil McGlohon
Browse files
Dragonfly Plus Model: Implemented Adaptive Threshold functionality back in
parent
d04037b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/dragonfly-plus.C
View file @
7b30c11b
...
@@ -2867,15 +2867,23 @@ static Connection do_dfp_prog_adaptive_routing(router_state *s, tw_bf *bf, termi
...
@@ -2867,15 +2867,23 @@ static Connection do_dfp_prog_adaptive_routing(router_state *s, tw_bf *bf, termi
else
{
else
{
if
(
msg
->
path_type
==
MINIMAL
)
{
//we need to evaluate whether to stay on the minimal path or deviate
if
(
msg
->
path_type
==
MINIMAL
)
{
//we need to evaluate whether to stay on the minimal path or deviate
if
(
scoring_preference
==
LOWER
)
{
if
(
scoring_preference
==
LOWER
)
{
if
(
min_score
<=
intm_score
)
{
if
(
min_score
<=
adaptive_threshold
)
{
// printf("CHOOSE MIN: Min Score=%d\tNonmin Score=%d (Adaptive Threshold =%d)\n",min_score, intm_score,adaptive_threshold);
route_to_fdest
=
true
;
}
else
if
(
min_score
<=
intm_score
)
{
// printf("CHOOSE MIN: Min Score=%d\tNonmin Score=%d\n",min_score, intm_score);
route_to_fdest
=
true
;
route_to_fdest
=
true
;
}
}
else
{
//Changing to a nonminimal path!
else
{
//Changing to a nonminimal path!
// printf("CHOOSE NONMIN: Min Score=%d\tNonmin Score=%d\n",min_score, intm_score);
msg
->
path_type
=
NON_MINIMAL
;
msg
->
path_type
=
NON_MINIMAL
;
}
}
}
}
else
{
//HIGHER is better
else
{
//HIGHER is better
if
(
adaptive_threshold
>
0
)
tw_error
(
TW_LOC
,
"Adaptive threshold not compatible with HIGHER score preference yet
\n
"
);
//TODO fix this
if
(
min_score
>=
intm_score
)
{
if
(
min_score
>=
intm_score
)
{
route_to_fdest
=
true
;
route_to_fdest
=
true
;
}
}
...
...
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