## 3 Energy Management Framework  
Based on the model of the three ME applications that are developed in Section 2, a novel optimal energy management framework for the ME system with ME applications is proposed, and its mathematical model is given in detail in this section. The decision variables vector \(\mathbf{V}\) is defined as in (21). In (21), \(\mathbf{P}_{\text{G}}\) and \(\mathbf{P}_{\text{Hdr}}\) are the output arrays for generators and P2H (G2P) plants respectively, \(\mathbf{p}\) is the daily charging price array of EVs, and \(\mathbf{\alpha}\) is the EDF vector for CCHP plants. \[\mathbf{V}=\left[\mathbf{P}_{\text{G}},\quad\mathbf{P}_{\text{Hdr}},\quad\mathbf{\rho}_{\text {TOU}},\quad\mathbf{\alpha}\right]^{T} \tag{21}\]  
The objective function comprises of three individual objectives: \(F_{1}\), \(F_{2}\), and \(F_{3}\). \(F_{1}\) is modeled as the profits of the MES, which is defined as the total revenue through selling electricity minus the generation cost:  
\[ \begin{array}{l}F_{1}=\max\sum\limits_{t=1}^{N}\left\{\sum\limits_{i\in \Omega_{\text{Br}}}\rho_{0}^{\text{EDS}}(t)\cdot D_{i}(t)+\sum\limits_{i\in \Omega_{\text{Cr}}}\rho_{\text{TOU}}^{\text{EDS}}(t)\cdot P_{\text{Chr},i}(t)- \sum\limits_{j\in\Omega_{\text{Cr}}}\rho_{\text{G}}^{\text{EDS}}\cdot\left(a _{j}+b_{j}\cdot P_{\text{G},j}(t)+\varepsilon_{j}\cdot P_{\text{G},j}^{2}(t) \right)\right.\\ \left.-\sum\limits_{k\in\Omega_{\text{Chr}}}|I(t)|\cdot\left[\frac{(I(t)+1)}{2 }\cdot\left(b_{\text{P2H}k}\cdot P_{\text{2H}k}(t)+c_{\text{P2H}k}\right) \right.\\ \left.+\frac{(I(t)-1)}{2}\cdot\left(a_{\text{GP},k}\cdot P_{\text{G2P},k}^{2}( t)+h_{\text{G2P},k}\cdot P_{\text{G2P},k}(t)+c_{\text{G2P},k}\right)\right]\\ \left.-\sum\limits_{m\in\Omega_{\text{CCHP}}}\rho_{\text{CCHP}}^{\text{PDS}} \cdot F_{CCHP,m}(t)\right\}\end{array}  \tag{22}\]  
In (22), \(\Omega_{\text{B}}\), \(\Omega_{\text{Chr}}\), \(\Omega_{\text{G}}\), \(\Omega_{\text{Hdr}}\), and \(\Omega_{\text{CCHP}}\) are the buses set, generators set, EV charging facilities set, P2H/G2P plants set, and CCHP plants set; \(P_{\text{G}}\) is the output of the generator, \(P_{\text{P2H}}\) and \(P_{\text{G2P}}\) are the output of P2H/G2P plant in P2H and G2P process, respectively, and \(a_{j}\), \(b_{j}\), \(c_{j}\), \(b_{\text{P2H}}\), \(c_{\text{P2H}}\), \(a_{\text{G2P}}\), \(b_{\text{G2P}}\), and \(c_{\text{G2P}}\) are their corresponding consumption characteristic factors; \(I\) is the state indication of P2H/G2P plant; \(D\) is the electric load and \(P_{\text{Chr}}\) is the EV charging load; \(\rho_{0}^{\text{EDS}}\) is the hourly selling price of electricity, \(\rho_{\text{TOU}}^{\text{EDS}}\) is the hourly price for EV charging, \(\rho_{\text{G}}^{\text{EDS}}\) and \(\rho_{\text{CCHP}}^{\text{EDS}}\) are the fuel price for power production, and heat, cooling power production. \(F_{2}\) is modelled as in (23) to describe the daily utilization rate of the renewable energy outputs:  
\[F_{2}=\max\left(\frac{\sum\limits_{i\in\Omega_{\text{R}}}\sum\limits_{t=1}^{N}P _{\text{R},i}(t)}{\sum\limits_{i\in\Omega_{\text{R}}}\sum\limits_{t=1}^{N}P_{ \text{R}max,i}(t)}\right). \tag{23}\]  
In (23), \(\Omega_{\text{R}}\) denotes the RES generating units set, \(P_{\text{R}}\) and \(P_{\text{R}\_\_\_\_\_\_}\) denote the outputs and maximal outputs of the RES. \(F_{3}\) is modelled to describe the energy saving performance of the concerned MES [6]. In (24), \(W_{\text{CCHP}}\), \(Q_{\text{CCHP}}\), and \(R_{\text{CCHP}}\) are the electricity, heat, and cooling output of CCHP plants, \(\eta_{F}\) is the thermal energy rate of the fuel injection.