## 3 Problem Solution
Assuming that the sensor nodes are deployed uniformly in the area of interest, when the number of sensor nodes is small, also small is the number of them in conditions to be assigned with low-consumption bursty transmissions (good channels and high residual energies), implying that \(w_{2}/w_{1}>1\) will not bring advantage over \(w_{1}/w_{2}>1\). In other terms, when \(N\) is small, say \(N<30\), there is practically no difference between the lifetime improvements achieved by privileging equalized consumptions or by privileging bursty transmissions. In this case, total flexibility is given to the choice of the weights \(w_{1}\) and \(w_{2}\). When \(N\) is large, say \(N>80\), the number of nodes in conditions to be assigned with low-consumption bursty transmissions increases, implying that \(w_{2}/w_{1}>1\) will bring advantage over \(w_{1}/w_{2}>1\). In this case, then, we must have \(w_{1}=0\) and \(w_{2}=1\), unless we can live with the lifetime penalty brought when the equalized consumptions are of more importance. For a moderate number of sensor nodes, say \(30<N<80\), we have found that a good trade-off is achieved with \(w_{1}=1\) and \(w_{2}=2\). Numerical results shown in Section 4 confirm these statements. Notice that, from the perspective of a mathematical optimization problem, any pair of \(w_{1}\) and \(w_{2}\) will yield optimum solutions. By varying them, a Pareto optimum frontier [38] (p. 57) will be established, unveiling the typical losses and gains of a trade-off analysis. At the \(k\)-th optimization event, the following constraints must be satisfied while minimizing the objective function defined in Equation (3):  
* The activity levels must be non-negative, i.e., \(\mathbf{x}_{f}(k)\succeq 0\), \(f=1,2,\ldots,F\), meaning that the smallest number of slots assigned to a sensor node is zero. * The activity levels assigned to the sensor nodes in a given frame must add to one, i.e., \(\mathbf{I}^{\mathbf{T}}\mathbf{x}_{f}(k)=\sum_{n=1}^{N}x_{n,f}(k)=1\), with \(x_{n,f}(k)\) being the \(n\)-th element of \(\mathbf{x}_{f}(k)\). This constraint is consistent with the definition of the activity level as the assigned fraction of the slots in a frame. The effect of this constraint is the guarantee of not penalizing the throughput while the optimization attempts to minimize the residual and discounted residual energies in the objective function defined in Equation (3). * The optimization computes the activity levels and the residual energies based on past maximum energy consumption information, that is, the residual energies available to the \((f+1)\)-th frame, are the residual energies at the end of the \(f\)-th frame minus the energy consumptions during the \(f\)-th frame. Then, based on Equation (1), \(\mathbf{s}_{f+1}(k)=\mathbf{s}_{f}(k)-\mathbf{b}_{f}(k)\circ\mathbf{x}_{f}(k)\), \(f=1,2,\ldots,F\). Noticethat the maximum consumptions to be used as input data to the subsequent optimization event come from the actual information on past residual and recharge energies. Putting it all together, for each optimization event \(k\) it must be solved the optimization problem  
\[ \begin{array}{ll}\text{minimize}&f_{0}\left[\mathbf{s}_{f}(k)\right]=w_{1} \max\{\mathbf{s}_{f}(k)\}+w_{2}\max\{\mathbf{s}_{f}(k)-\mathbf{b}_{f}(k)\}, \ \ f=1,2,\ldots,F\\ \text{subject to}&\mathbf{x}_{f}(k)\succeq 0\\ &\mathbf{1}^{\mathrm{T}}\mathbf{x}_{f}(k)=1\\ &\mathbf{s}_{f+1}(k)=\mathbf{s}_{f}(k)-\mathbf{b}_{f}(k)\circ\mathbf{x}_{f}(k).\end{array}  \tag{4}\]  
This is a convex optimization problem, since the max function is convex [38] (p. 72), and the nonnegative weighted sum of convex functions is also convex [38] (p. 79). The optimization problem (4) can be easily converted into a linear optimization problem, usually referred to as a linear program (LP) [38] (p. 146), by means of its epigraph [38] (p. 134) form  
\[