|
Algorithm 2. Candidate Selection by Partial Vector Bin Packing |
| 1 |
Input: |
| 2 |
the weight for traffic as metric |
| 3 |
|
| 4 |
the set of candidates of the final plan |
| 5 |
for eachdo
|
| 6 |
|
| 7 |
|
| 8 |
end for |
| 9 |
|
| 10 |
whilethen
|
| 11 |
// the reconfigure node |
| 12 |
for each
do
|
| 13 |
|
| 14 |
if
then
|
| 15 |
|
| 16 |
Break
|
| 17 |
end if
|
| 18 |
end for
|
| 19 |
if
then break
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
for each
do
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
if
then continue
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
if
then
|
| 34 |
|
| 35 |
|
| 36 |
end if
|
| 37 |
end for
|
| 38 |
|
| 39 |
|
| 40 |
if
then break
|
| 41 |
else then
|
| 42 |
end if
|
| 43 |
end while |
| 44 |
|
| 45 |
Output: |
| 46 |
return
|