## 6 Modified Priority-Based Greedy Heuristic
These logical links are represented by \((n^{\
u}_{i},n^{\
u}_{i})\), where \(n^{\
u}_{i}\) and \(n^{\
u}_{j}\) are two consecutive VNFrs of SFCr \(\gamma\). To model the bandwidth constraints, a link variable is defined:

\[y_{\gamma,n^{\pi}_{i},n^{\pi}_{j},n^{\pi}_{u},n^{s}_{v}}= \begin{cases}1,&\text {the mapping of }(n^{\
u}_{i},n^{\
u}_{j})\text{ in }SFcr\text{ }\gamma\\ &\text{ goes through }(n^{s}_{u},n^{s}_{v}),(n^{s}_{u},n^{s}_{v})\in E^{s},\\ 0,&\text{otherwise}\end{cases}  \tag{12}\]

Due to the VN reuse strategy, two different VNFrs in one SFCr can be mapped on the same substrate node. Therefore, the flow of the logical link \((n^{\
u}_{i},n^{\
u}_{j})\) may go through a substrate link or not. This fact determines the following constraint:

\[\sum_{(n^{\
u}_{u},n^{\
u}_{i})\in E^{s}}y_{\gamma,n^{\pi}_{i},n^{\pi}_{j},n^{ \pi}_{u},n^{\pi}_{v}}\geq 0,(n^{\
u}_{i},n^{\
u}_{j})\in E^{\
u}_{\gamma}, \gamma\in\Gamma \tag{13}\]

Using this variable, the bandwidth constraint can be modeled as follows. For each link in the substrate network, the link capacity must be satisfied:

\[\sum_{\gamma=0}^{|\Gamma|-1}\sum_{(n^{\
u}_{i},n^{\
u}_{j})\in E^{\
u}_{\gamma }}b_{\gamma,n^{\pi}_{i},n^{\
u}_{j}}\cdot y_{\gamma,n^{\pi}_{i},n^{\pi}_{j},n^ {\pi}_{u},n^{\pi}_{v}}\leq C^{link}_{(n^{\
u}_{u},n^{s}_{v})},\,(n^{s}_{u},n^{ s}_{v})\in E^{s},\,\gamma\in\Gamma \tag{14}\]

where \(b_{\gamma,n^{\pi}_{i},n^{\pi}_{j}}\) indicates the bandwidth consumption of the logical link \((n^{\
u}_{i},n^{\
u}_{j})\) in SFCr \(\gamma\). In this scenario, the edge computing network allows the location of sensitive services in MDCs and not in remote CDCs. Therefore, considering only propagation delays, the ILP model includes two latency constraints: \(D^{MDC}_{\gamma}\), SAR to MDC tolerated propagation delay; and \(D^{CDC}_{\gamma}\), the entire tolerated propagation delay:

\[\sum_{i=0}^{|\Phi_{\gamma}|-1}\sum_{j=0}^{|\Phi_{\gamma}|-1}\sum_{(n^{\
u}_{i },n^{\
u}_{j})\in E^{s}}d_{n^{s}_{u},n^{s}_{v}}\cdot y_{\gamma,n^{\pi}_{i},n^{ \pi}_{j},n^{\pi}_{u},n^{s}_{v}}\leq D^{MDC}_{\gamma},(n^{\
u}_{i},n^{\
u}_{j}) \in E^{\
u}_



\[\sum_{n_{v}^{\text{P},\text{U},\text{R}\cup\text{G}}}^{\text{P},\text{U}, \text{R}\cup\text{G}}y_{\gamma,n_{v}^{\text{P}},n_{v}^{\text{P}},n_{u}^{\text{P} }}\in\{0,1\},\gamma\in\Gamma,(n_{u}^{s},n_{v}^{s})\in E^{\text{S}},(n_{i}^{v}, n_{j}^{v})\in E^{\text{v}}_{\gamma} \tag{113}\] \[\sum_{n_{u}^{s}}^{\text{P},\text{U},\text{R}\cup\text{G}}y_{\gamma,n _{v}^{\text{P}},n_{j}^{\text{P}},n_{u}^{\text{P}}}\in\{0,1\},\gamma\in\Gamma,(n _{v}^{s},n_{u}^{s})\in E^{\text{S}},(n_{i}^{v},n_{j}^{v})\in E^{\text{v}}_{\gamma}\] (114) \[\sum_{n_{v}^{\text{P}}}^{\text{P},\text{U},\text{R}\cup\text{G}}y_ {\gamma,n_{v}^{\text{P}},n_{u}^{\text{P}},n_{u}^{\text{P}}}-\sum_{n_{u}^{ \text{P}}}^{\text{P},\text{U},\text{R}\cup\text{G}}y_{\gamma,n_{v}^{\text{P}},n_{v}^{\text{P}},n_{v}^{\text{P}},n_{u}^{\text{P}}}=x_{\gamma,n_{v}^{\text{P }},n_{u}^{\text{P}},n_{u}^{\text{P}}}-x_{\gamma,n_{v}^{\text{P}},n_{u}^{ \text{P}}},\] (115) \[\gamma\in\Gamma,(n_{u}^{s},n_{v}^{s})\in E^{\text{S}},(n_{i}^{v}, n_{j}^{v})\in E^{\text{v}}_{\gamma}\]

Equation (113) indicates whether a logical link is mapped on one of the substrate links that leave out node \(n_{u}^{s}\), and Equation (114) indicates whether the logical link is mapped on one of the substrate links that go in node \(n_{u}^{s}\). Both equations ensure that one logical link can only be mapped on a single path. Equation (115) ensures that the path in the substrate network is consistent for a logical link. ### Optimization Target

The optimization target of the VNF placement problem is to minimize the total cost:

\[ \begin{split} Minimize\left(T_{c}\right)=\\ min\{\alpha*(\text{CPU}_{c}+\text{BRC}_{c}^{\text{CPU}})+\beta*( \text{MEM}_{c}+\text{BRC}_{c}^{\text{mem}})\}\end{split}  \tag{116}\]

where the total CPU resource consumption is:

\[ \begin{split} CPU_{c}=\sum_{\gamma=0}^{|\Gamma|-1}\sum_{i=0}^{| \Phi|-1}\sum_{j=0}^{|R|+|G|-1}CPU_{\gamma,n_{i}^{v}}\cdot x_{\gamma,n_{i}^{v},n _{u}^{s}}\end{split}