
Resources Trading in Wireless Networks 37
or larger than t
o
. Therefore, our next problem is how to use the available
bandwidth or the acceptable delay trading for minimum energy consumption?
For this purpose, we develop Algorithms 1 and 2 to search for optimal W
o
and
t
o
, respectively. Methods in Algorithms 1 and 2 are similar, but for searching
W
o
and t
o
, respectively.
Algorithm 1 Adaptive W
o
Strategy.
Input: W
a
Output: W
user
1: for i=1:κ do
2: Calculate d
i
3: Calculate W
o
(d
i
) by Eq. (2.9)
4: if W
a
>W
o
(d
i
) then
5: W
user
(d
i
)=W
o
(d
i
)
6: else
7: W
user
(d
i
)=W
a
8: end if
9: end for
Algorithm 2 Adaptive t
o
Strategy.
Input: t
a
Output: t
user
1: for i=1:κ do
2: Calculate d
i
3: