Algorithm 1 Rebalancing strategy |
1: |
Initialize , , , done
|
2: |
Set parameters
|
|
3: |
Set
|
▹ Vector with survival times before rebalancing |
4: |
Set
|
▹ Smallest survival time before rebalancing |
5: |
|
▹ Set the survival time threshold |
6: |
Set
|
▹ Vector with optimal survival times for each station
|
7: |
while () and (done ) do
|
▹ Until there are nodes to visit that can improve the net reward |
8: |
|
|
9: |
|
▹ Choose unvisited node with smallest survival time |
10: |
|
▹ Update survival time of node
|
11: |
|
▹ Update reward |
12: |
Determine rebalancing path over
|
|
13: |
compute path length of
|
▹ Compute distance to cover for rebalancing |
14: |
|
▹ Update cost |
15: |
if (reward − cost)
then
|
▹ It is worth to include node in the rebalancing |
16: |
|
17: |
reward − cost |
18: |
if
then
|
19: |
done
|
▹ The optimization function can no longer be increased |