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
32527fe2
Commit
32527fe2
authored
Jun 05, 2018
by
Neil McGlohon
Browse files
dfp: add queued count back in as considertation
parent
6fec8d6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networks/model-net/dragonfly-plus.C
View file @
32527fe2
...
...
@@ -2545,7 +2545,7 @@ static int dfp_score_connection(router_state *s, tw_bf *bf, terminal_plus_messag
{
score
+=
s
->
vc_occupancy
[
port
][
k
];
}
//
score += s->queued_count[port];
score
+=
s
->
queued_count
[
port
];
break
;
}
case
BETA
:
//consideres vc occupancy and queued count multiplied by the number of minimum hops to the destination LOWER SCORE IS BETTER
...
...
@@ -2555,7 +2555,7 @@ static int dfp_score_connection(router_state *s, tw_bf *bf, terminal_plus_messag
{
base_score
+=
s
->
vc_occupancy
[
port
][
k
];
}
//
base_score += s->queued_count[port];
base_score
+=
s
->
queued_count
[
port
];
score
=
base_score
*
get_min_hops_to_dest_from_conn
(
s
,
bf
,
msg
,
lp
,
conn
);
break
;
}
...
...
@@ -2567,7 +2567,7 @@ static int dfp_score_connection(router_state *s, tw_bf *bf, terminal_plus_messag
{
to_subtract
+=
s
->
vc_occupancy
[
port
][
k
];
}
//
to_subtract += s->queued_count[port];
to_subtract
+=
s
->
queued_count
[
port
];
score
-=
to_subtract
;
if
(
c_minimality
==
C_MIN
)
//the connection maintains the paths minimality - gets a bonus of 2x
...
...
@@ -2580,7 +2580,7 @@ static int dfp_score_connection(router_state *s, tw_bf *bf, terminal_plus_messag
{
score
+=
s
->
vc_occupancy
[
port
][
k
];
}
//
score += s->queued_count[port];
score
+=
s
->
queued_count
[
port
];
if
(
c_minimality
!=
C_MIN
)
score
=
score
*
2
;
...
...
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