|
Algorithm 3 Optional Path Selection Function |
-
Input:
The set of optional paths of all flows F
-
Output:
A selected optional path p and its corresponding flow f
-
1:
for each
do
-
2:
Calculate the , , and of p;
-
3:
end for
-
4:
Arrange P in ascending order according to ;
-
5:
Initialize , a temporary set of optional paths ;
-
6:
for
do
-
7:
if
==count[0] then
-
8:
;
-
9:
end if
-
10:
end for
-
11:
Arrange in descending order according to and ;
-
12:
for
do
-
13:
if
then
-
14:
break;
-
15:
end if
-
16:
end for
-
17:
return and the corresponding flow f.
|