# NFV-Enabled Efficient Renewable and Non-Renewable Energy Management: Requirements and Algorithms
## 3 Adaptive Energy Managements: Requirements, Components, and Mechanisms
### Components of the NFV-Enabled Ecosystem and Proposed Energy Management Mechanisms
#### 3.3.3 NFV-Enabled Energy Manager and Mechanisms for Adaptive Consumption  
The energy adaptation process is continuously carried out every time that an EC requests energy consumption. Thus, before using energy, the ECs notify the EM of their demands. The EM performs the calculations (execution of algorithmic strategies) for the efficient (optimal) utilization of available energy. As a result of this procedure, the EM knows the service(s) that can be executed and their execution time (a service can be advanced, delayed in time, or rejected). Subsequently, the consumption instructions are sent to the ECs, and the energy allocation is performed for the service(s) that can be executed. Depending on the amount of \(P_{ES}\), the ES through the EM can promote an increase or decrease in consumption through the anticipated or delayed execution of services. Figure 2 shows a summary of the adaptation process between components.  
The strategies that are considered by the EM to optimize the use of \(P_{ES}\) are described below and they are used in the model that is presented in Section 4 and in the algorithmic strategies described in Sections 5 and 7.  
* _Adaptation of consumption to availability by exploiting time-shifting capabilities of services_: the adaptation of the consumption pattern to the availability, is achieved with the use of temporary displacement on the service. Thus, a service \(k\) (\(S_{k}\)) can be affected by a _time-shifting_ (\(T_{s}^{k}\)) forward (i.e., \(T_{s_{fw}}^{k}\)) or backward (i.e., \(T_{s_{fw}}^{k}\)) within a finite interval of time horizon \(W\). These parameters are independent for each service \(S_{k}\), and the management strategies (algorithms as shown in Section 5) deployed in the NFV domain determine the efficient (optimal) scheduling of services to optimize the use of \(P_{ES}\).
* _Prioritization in energy distribution and rejection of demands_: if \(P_{ES}<P_{D}\), the the EM allocates the energy resources to the services according to the category to which they belong, i.e., the supply is prioritized for the execution of CS (\(l=1\)). The remaining energy is allocated to the NCS in decreasing order according to their priority level (from \(l=2\) down to \(l=L\)). Thus, services with a lower priority level are more likely to be unprocessed or rejected. If all services have an equal level of priority, the service scheduling algorithms aim to use energy as efficiently as possible and, second, to try to meet as many demands (services) as possible. This procedure is explained in detail in the algorithm in Figure 3. Other alternatives that could be analyzed in future work, if \(P_{ES}<P_{D}\), are the degradation of the quality of services (e.g., decrease in display brightness of a device), and the use of energy stored in batteries during energy surplus periods. A service \(S_{k}\) is completely defined by the parameters that are listed in Table 3, and an example is illustrated in Figure 4.  
Figure 2: Energy adaptation process (handshake between the Energy Supplier (ES) and the Energy Consumer (EC)). Adapted from [5].  
Figure 3: Flow chart for \(AR\) computation of OptTs when there exist service rejection.  
\begin{table}
\begin{tabular}{c l l} \hline \hline
**Parameter** & **Description** & **Unit/Comment** \\ \hline \(N\) & Number of services & Integer number \\ \(S_{k}\) & Service identifier & \(k\in\{1,\cdots,N\}\) \\ \(L\) & Number of priority levels & Integer number \\ \(l\) & Priority identifier & \(l\in\{1,\cdots,L\}\) \\ \(P_{d}^{k}\) & Power demanded by service \(k\) & Power units \\ \(T_{init}^{k}\) & Starting time of service \(k\) & Time units \\ \(T_{d}^{k}\) & Lifetime of service \(k\) & Time units \\ \(T_{s_{\text{inv}}}^{k}\) & Backward time-shifting of service \(k\) & Time units \\ \(T_{s_{\text{inv}}}^{k}\) & Forward time-shifting of service \(k\) & Time units \\ \(U^{k}\) & Priority of service \(k\) & Integer number \\ \hline \hline \end{tabular}
\end{table}
Table 3: Parameters of services or power demands.