• No results found

Chapter 3 Maximizing Rewards in Wireless Networks with Energy

3.1 System Model and Problem Formulation

3.2.1 Branch-and-Prune Algorithm

Consider a tuple (¯rik, ¯tik, ¯eik) as a state, where ¯rik denotes the reward sum of the first i tasks corresponding to the accumulated transmission time ¯uik and energy sum ¯

eik. We use a list to record all the states of task i

Li = h(¯ri1, ¯ti1, ¯ei1), (¯ri2, ¯ti2, ¯ei2), . . . , (¯rini, ¯tini, ¯eini)i,

where ni is the number of states after the ith iteration. Due to the delay and en- ergy constraints, branching from unpromising states that generate infeasible or non- optimal solutions can be avoided. We summarize three circumstances, referred to pruning criteria, in which branches from a certain state will be pruned.

1. Temporal Criterion: The state (¯rik, ¯tik, ¯eik) in list Li will be pruned if it satisfies that ¯ tik+ N X j=i+1 T Tj Cmin j sM > T.

The inequality means the partial solution will not meet the deadline by trans- mitting the smallest size of data to the remaining receivers even at the maximal

Table 3.1: An example for 4 data streams with 2 data size levels and 2 transmission rate levels.

Data Stream (r, t, e) at c1 and s1 (r, t, e) at c1 and s2 (r, t, e) at c2 and s1 (r, t, e) at c2 and s2

1 (1,2,1) (1,1,4) (2,4,2) (2,2,8)

2 (1,2,1) (1,1,5) (2,4,2) (2,2,10)

3 (2,2,1) (2,1,4) (4,4,2) (4,2,8)

transmission rate. Therefore the solutions generated from this state are infea- sible.

2. Energy Criterion: The state (¯rik, ¯tik, ¯eik) in list Li will be pruned if it satisfies that ¯ eik+ N X j=i+1 T Tj Ei(s1, Cjmin) > Emax.

The inequality means the partial solution will not meet the energy constraint by transmitting the smallest size of data to the remaining receivers even at the minimal transmission rate. Therefore the solutions generated from this state are infeasible.

3. Dominance Criterion: If two states (¯rik, ¯tik, ¯eik) and (¯rij, ¯tij, ¯eij) in a list Li satisfy ¯rik > ¯rij and ¯tik ≤ ¯tij and ¯eik ≤ ¯eij, or ¯rik ≥ ¯rij and ¯tik ≤ ¯tij and ¯

eik < ¯eij, or ¯rik ≥ ¯rij and ¯tik < ¯tij and ¯eik ≤ ¯eij, then the latter state is said to be dominated by the former one. Intuitively, if a state uses more energy, requires larger transmission time but achieves smaller reward than another state, it can always be replaced by the latter state.

In the following, we use an example to show how these three pruning criteria work. Suppose there are three data streams with two transmission rate levels and two data

size levels each, as shown in Table 3.1. Assume the time and energy constraint is (7, 7). A root node 0 at level-0 is represented by a 3-tuple (0, 0, 0) which means reward, time, and energy are all zero since no data stream has been enumerated. Start from the root node, we first enumerate data stream 1. Note that the order of enumerating the data streams will not have impact on the final solution. Since there are two transmission rate levels and two data size levels for each data streams, we have four different nodes generated from root node after enumerating data stream 1, shown in Fig. 3.2. We label these four nodes at level-1 as 1, 2, 3 and 4.

0,0,0 0 4 3 2 1 1,2,1 1,1,4 2,4,2 2,2,8

Figure 3.2: Partial state space tree after one enumeration.

Then we proceed to the next level. We examine every node at level-1 and enumer- ate data stream 2. Start from node 1, we find nodes 1 cannot be pruned based on all above three pruning criteria. So we can generate 4 new nodes at level-2 from node 1 by enumerating data stream 2 and calculate the 3-tuple (r, t, e) for the new nodes. In the same way, we can derive another 8 new nodes at level-2 starting from node 2 and 3. Node 4 will be pruned due to energy criterion (the current energy consumption is 8 which exceeds the energy budget 7). So there will be no level-2 nodes derived from node 4. After pruning and enumeration, we obtain 12 nodes at level-2, shown in Fig. 3.3.

When we examine the level-2 nodes, we find node 8, 10, 12, and 16 can be pruned according to the energy criterion. Node 15 is pruned due to the temporal criterion. Nodes 6 and 14 will be pruned as well because they are dominated by nodes 9 and 11,

4,6,12 2,4,2 2,3,6 3,6,3 3,4,11 2,3,5 2,2,9 3,5,6 3,3,14 3,6,3 3,5,7 4,8,4 0,0,0 0 4 3 2 1 1,2,1 1,1,4 2,4,2 2,2,8 8 7 6 5 9 10 11 12 13 14 15 16 Temporal pruning Energy pruning Dominance pruning

Figure 3.3: Partial state space tree after two enumerations.

6,8,4 6,6,10 4,6,3 4,5,6 2,4,2 2,3,6 3,6,3 3,4,11 2,3,5 2,2,9 3,5,6 3,3,14 3,6,3 3,5,7 4,8,4 4,6,12 0,0,0 0 4 3 2 1 1,2,1 1,1,4 2,4,2 2,2,8 8 7 6 5 9 10 11 12 13 14 15 16 20 19 18 17 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 7,10,5 6,6,10 5,8,4 5,7,7 4,5,6 4,4,9 6,7,7 6,5,13 5,7,7 5,6,10 7,9,8 7,7,14 5,8,4 5,7,7 7,10,5 7,8,11 Temporal pruning Energy pruning Dominance pruning

respectively. Iteratively performing this sequence of steps (nodes generation, 3-tuple calculation, and pruning), we can obtain all nodes at level-3. Thus we generate the complete state space tree for the given task set. The complete state space tree is shown in Fig. 3.4. The generated nodes at level-3 with solid line are feasible solutions while those with dotted line are infeasible solutions. Among those feasible solutions, the dark node numbered 27 represents the optimal solution (6, 7, 7) because it has the largest reward value. The number of final nodes (level-3 nodes) now is 20. It has been reduced dramatically in contrast to that without any pruning, which is 64.

Algorithm 1 shows the pseudo-code. Initially, we have list L0 with zero reward, zero time and zero energy. List Li is obtained by the following steps. We first get

a number of lists L0ijk by adding reward, transmission time and energy values of

task i under each data size j ∈ {c1

i, c2i, . . . , cKi } and each transmission rate k ∈ S to the states in list Li−1. The component-wise addition is denoted by L0ijk = Li−1⊕ (¯rijk, ¯tijk, ¯eijk). Secondly, we merge the lists L0ijk into a list L

0

i in decreasing order of reward value. Thirdly, we prune all non-feasible state by the Temporal Criterion and Energy Criterion. Finally, we use the procedure Prune-Lists() to find the un- dominated states in L0 and returns it as L00. In this procedure, we check each pair of states to eliminate the dominated states as many as possible in order to save more space.