# A Framework for the Joint Placement of Edge Service Infrastructure and User Plane Functions for 5G
## 4 Framework Proposal
### Edge Node Placement Stage  
Overall, in this stage our goal is to place computing, storage and network resources at the edge of the network in a cost-effective manner. To decrease the EN network costs, we aim to optimize the site selection and reduce the number of ENs deployed and the capacity assigned to each EN. The underlying problem formulation models the service demand, distributed over a given area, as traffic generators (TGs) [23]. In more detail, the aggregated cell structure composed by the TGs in the form of 4G/5G mobile base stations, wireless access points, etc., is considered to be known. Moreover, since the traffic to the services hosted in any given EN is aggregated through the 5G access layer, the (R)AN nodes distributed over a given service area and the underlying demand are simplified and modeled as TGs [7; 23]. This kind of model allows us to simplify the problem without loss of generality since the placement optimization is directly linked to the capacities and behavior of the traffic aggregation points (i.e., TGs) and thus independent from the particularities of the underlying end-users. The cost function for the optimization problem is presented in (1). \[\text{Min}\ \sum_{\forall e}\omega\cdot c_{e}\cdot v_{e}+\sum_{\forall e,\ t}L_{et }\cdot u_{et}+\sum_{\forall e}F_{e}\cdot v_{e} \tag{1}\]  
where:  
* \(\omega\): cost per capacity unit
* \(c_{e}\): capacity of an EN at \(e\)
* \(v_{e}\): 1 if an EN at \(e\) is placed, 0 otherwise
* \(L_{et}\): cost of interconnecting an EN at \(e\) and a TG at \(t\)
* \(u_{et}\): 1 if a TG at \(t\) is covered by an EN at \(e\), 0 otherwise
* \(F_{e}\): fixed cost of deploying an EN at \(e\)  
Through expression (1) the main expenses when deploying an EN network are represented: EN capacity costs (\(\omega\)), TG-EN interconnection expenses and any site-specific costs. Several restrictions were added to characterize the TG service levels and underlying demands. Every TG was ensured to be fully covered (in terms of its particular demand) by one or more ENs, always considering the reliability requirement of each TG. This way, if an arbitrary TG required ultra-high reliability, the model ensured that it was covered by at least two ENs. Additionally, each EN was assigned limited capacity (a maximum capacity value was set for every EN candidate). Latency requirements were constrained through predefined thresholds looking to satisfy most of the envisioned 5G delay-sensitive use cases [1]. For this purpose, two main latency values were selected (see Section 5.1) accounting for TGs with ultra-low latency requirements (maximum delay of 1 ms) and low latency requirements. The **Infrastructure Placement** module is in charge of the ENPP solution. At first, it carries out a partial demand distribution characterization, by classifying the service areas as urban or rural and it executes additional pre-processing optimization procedures. By conducting this kind of classification the problem complexity can be reduced, since a straightforward co-location strategy can be followed in less dense areas, placing the ENs within the TG infrastructure site. This kind of approach reduces CAPEX and OPEX as the demand in these areas is primarily scattered over large underpopulated territories. Within this stage, further pre-optimization is carried through pre-processing optimization procedures, i.e., isolation analysis, where those TGs outside the coverage range of any other EN potential location are immediately upgraded to ENs. Finally, the EN placement method is executed to find the optimized locations to place the ENs. After the ENPP is solved, the framework outputs the set of restriction-free locations where the edge infrastructure should be placed, the allocated capacities and demand covered per EN, and additional relevant data regarding the performance of the executed solution methods. Solving the ENPP implies the analysis of all possible EN-TG combinations in order to find the minimum cost solution.