Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
7f0c5265
Commit
7f0c5265
authored
Jun 05, 2018
by
Neil McGlohon
Browse files
dfp: revert minimal to choose best on local
parent
32527fe2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/dragonfly-plus.C
View file @
7f0c5265
...
...
@@ -3017,18 +3017,18 @@ static Connection do_dfp_routing(router_state *s,
if
(
poss_next_stops
.
size
()
<
1
)
tw_error
(
TW_LOC
,
"MINIMAL DEAD END
\n
"
);
int
rand_sel
=
tw_rand_integer
(
lp
->
rng
,
0
,
poss_next_stops
.
size
()
-
1
);
return
poss_next_stops
[
rand_sel
];
//
ConnectionType conn_type = poss_next_stops[0].conn_type;
//
Connection best_min_conn;
//
if (conn_type == CONN_GLOBAL) {
//
int rand_sel = tw_rand_integer(lp->rng, 0, poss_next_stops.size() -1);
//
return poss_next_stops[rand_sel];
//
}
//
else
//
best_min_conn = get_absolute_best_connection_from_conns(s, bf, msg, lp, poss_next_stops); //gets absolute best
//
return best_min_conn;
//
int rand_sel = tw_rand_integer(lp->rng, 0, poss_next_stops.size() -1 );
//
return poss_next_stops[rand_sel];
ConnectionType
conn_type
=
poss_next_stops
[
0
].
conn_type
;
Connection
best_min_conn
;
if
(
conn_type
==
CONN_GLOBAL
)
{
int
rand_sel
=
tw_rand_integer
(
lp
->
rng
,
0
,
poss_next_stops
.
size
()
-
1
);
return
poss_next_stops
[
rand_sel
];
}
else
best_min_conn
=
get_absolute_best_connection_from_conns
(
s
,
bf
,
msg
,
lp
,
poss_next_stops
);
//gets absolute best
return
best_min_conn
;
}
else
{
//routing algorithm is specified in routing
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment