## 2 MILP Model
### Objective Functions  
The economic objective function to be minimized is the total annual cost for owning, operating and maintaining the whole system:  
\[ \begin{split}&\text{{Min: }}c_{tot}=c_{inv}+c_{man}+c_{ope} \end{split}  \tag{44}\]  
The annual cost of the investment (\(c_{inv}\)) is the sum of the investment cost of the sites, of the central unit, and of the network. The investment cost of a site can be evaluated through:  
\[ \begin{split}& c_{inv,u}(u)=\Sigma_{i}\left\{f_{mgt}\cdot\mathbf{X}_{mgt}( j,u)\cdot c_{mgt}(j,u)+f_{icc}\cdot\mathbf{X}_{icc}(j,u)\cdot c_{icicc}(j,u)+f_{hp} \cdot\mathbf{X_{hp}}(j,u)\cdot c_{hp}(j,u)+f_{dais}\cdot\mathbf{X_{abs}}(j,u)\cdot c_{ abs}(j,u)\right\}\\ &\qquad+f_{bai}\cdot\mathbf{S_{bait}}(u)\cdot c_{bait}+f_{cc}\cdot\mathbf{ S_{ce}}(u)\cdot c_{icc}+f_{rpv}\cdot\mathbf{S_{rep}}(u)\cdot c_{rep}+f_{tpv}\cdot\mathbf{S_{ stp}}(u)\cdot c_{stp}+f_{ts}\cdot\mathbf{S_{ts}}(u)\cdot c_{ts}+f_{ts}\cdot\mathbf{S_{ts}}(u) \cdot c_{ts}\end{split}  \tag{45}\]  
The investment cost of the central unit is:  
\[ \begin{split}& c_{int,c}=f_{icc}\left(\mathbf{S_{icic,c}}\cdot c_{icc,v}+\mathbf{X_{ie,c}}\cdot c_{icc,f}\right)+f_{boi}\cdot\langle\mathbf{S_{boi,c}}\cdot cboi,v+\mathbf{X_{boi,c}}\cdot cboi,f\right)\\ &\qquad+f\mathbf{stp}\cdot\mathbf{S_{stp,c}}\cdot c\mathbf{stp,c}+f_{ts}\cdot \mathbf{S_{ts,c}}\cdot c\mathbf{t}\cdot\mathbf{t}\cdot\mathbf{(cnet_{f,c}\cdot\mathbf{X_{net,c}}+ cnet,v,c\cdot\mathbf{S_{t,net,c}})}\end{split}  \tag{46}\]  
The investment cost of the network is:  
\[ \begin{split}& c_{net}=f_{net}\cdot\Sigma_{uv,v}[c_{net,f_{c}}(1) \cdot(\mathbf{X_{hp}}(u,v)+\mathbf{X_{cp}}(u,v))+c_{net,f_{c}}(1)\cdot\mathbf{X_{net}}(u,v) +c_{net,v^{\prime}}(\mathbf{S_{H,net,c}}(u,v)+\mathbf{S_{C,net}}(u,v))]\end{split}  \tag{47}\]  
Maintenance costs related to the components are considered proportional to the products, while the operation costs include the costs for fuel, electricity bought from the grid and the eventual income from the sale of electricity. For each site \(u\) the annual operation cost is evaluated as:  
\[\begin{split}& c_{ope,u}(u)=\Sigma_{m,d,h}\left[c_{fine,alp}(m) \cdot(F_{icc}(m,d,h,u)+F_{mgt}(m,d,h,u))+c_{fine,boi}(m)\cdot F_{boi}(m,d,h,u) \right.\\ &+c_{cl,bgt}(m,d,h)\cdot\mathbf{E_{bgt}}(m,d,h,u)-c_{cl,jac}\cdot \mathbf{E_{pvp}}(m,d,h,u)-c_{cl,sol}(m,d,h)\cdot\mathbf{E_{sol}}(mThe other objective function to be minimized is the annual operation greenhouse emissions (CO\({}_{2}\) emissions). The total annual emissions are related to the net electric energy received from the grid (bought minus sold) and to the fuel consumption by the DG energy system (boilers and/or CHP). Therefore, the total annual emissions can be evaluated through:  
\[ \begin{split} em_{tot}=em_{el}\cdot\Sigma_{\text{m,d,h,u}}\ [\mathbf{E}_{bgt}(m \text{,}d\text{,}h\text{,}u)-\mathbf{E}_{sol}(m\text{,}d\text{,}h\text{,}u)-\mathbf{E}_ {ice,c}(m\text{,}d\text{,}h)]\cdot wgt(m\text{,}d\text{,}h)\\ +emf\text{,}clip\cdot\Sigma_{\text{m,d,h,u}}\ [F_{ice}(m\text{,}d\text{,}h \text{,}u)+F_{mgt}(m\text{,}d\text{,}h\text{,}u)]\cdot wgt(m\text{,}d\text{,}h )+emf\text{,}boi\cdot\Sigma_{\text{m,d,h,u}}\ [(F_{boi}(m\text{,}d\text{,}h \text{,}u)\\ +F_{boi,c}(m\text{,}d\text{,}h)]\cdot wgt(m\text{,}d\text{,}h)+emf _{,cnn}\cdot\Sigma_{\text{m,d,h}}\ F_{ice,c}(m\text{,}d\text{,}h)\cdot wgt(m \text{,}d\text{,}h)\end{split}  \tag{50}\]  
The greenhouse emissions due to the consumption of fuel by the DG system are mainly related to the kind of fuel itself [33], while the electricity carbon intensity largely depends on the technology mix of each electricity supplier. These two objectives are conflicting ones because the adoption of environmental efficient energy systems are costly. Likewise, the solution which allows the minimum annual cost does not permit us to obtain minimum total annual operation emissions. The \(\varepsilon\)-constrained method [34] has been adopted to obtain the Pareto front solutions. First, the economic and environmental optimal solutions have been obtained.