## 3 System Model and Problem Formulation
### ILP Model
#### 3.4.5 Optimization Objectives  
Finally, we optimize two objectives: the service response delay and resource consumption cost of an IoT-SR. We formulate the resource consumption cost, which consists of VNF placement cost, resource consumption cost, and the penalty for rejecting IoT-SR.  
Considering the inflation of marginal costs associated with resource usage as the resource load increases, the relationship between resource utilization and cost is characterized by an exponential function in our study. This relationship can be defined as follows [2]:  
\[\begin{split} Cost_{i}(r)=\sum_{p\in F_{i}}\sum_{c\in\mathcal{C}}x _{pc}(\eta_{a})^{1-\omega_{c}^{cpu}}+\\ \sum_{m,n\in F_{i}}\sum_{uv\in\mathcal{L}}x_{uv}^{mm}(\eta_{b})^{1- \omega_{uv}^{bw}}\end{split} \tag{11}\]  
In this equation, the constants \(\eta_{a}\) and \(\eta_{b}\) are utilized, both of which satisfy the condition \(\eta_{a},\eta_{b}>1\). It is worth noting that as the values of \(1-\omega_{c}^{cpu}\) and \(1-\omega_{uv}^{bw}\) increase, the resource usage cost also increases proportionally.  
The placement cost of VNF of type \(p\) is formulated as follows:  
\[Cost_{i}(d)=\sum_{p\in F_{i}}x_{i}^{c}\big{(}1-x_{pc}\big{)}c_{p}^{act} \tag{12}\]  
The activation cost of VNFs of type \(p\) is represented as \(c_{p}^{act}\). The selection of cloudlet \(c\) by IoT-SR\({}_{i}\) for placement of the required VNF is indicated by the binary variable \(x_{i}^{c}\), which equals 1 if cloudlet \(c\) is the node for VNF placement and 0 otherwise.  
In the event that the service request of IoT-SR\({}_{i}\) is declined, it incurs a penalty denoted as \(\tau\):  
\[Cost_{i}(pen)=\tau\mathbb{1}(1-\delta_{i}) \tag{13}\]  
The indicator function (\(\mathbb{1}(x)\)) is defined on the basis of set \(X\), that is, if \(x\) is true, it equals 1 and and 0 otherwise.  
Therefore, the total cost for routing IoT-SR\({}_{i}\) can be represented as follows:  
\[Cost_{i}=Cost_{i}(r)+Cost_{i}(d)+Cost_{i}(pen) \tag{14}\]  
The dynamic SFC placement problem, which aims to minimize the formulation of the weighted sum of the resource consumption cost and the end-to-end delay of every IoT-SR, is expressed as Equation (15):  
\[\begin{array}{ll}Minimize&\omega_{1}d_{i}+\omega_{2}Cost_{i}\\ s.t.&\text{Equations \eqref{eq:1}--\eqref{eq:2}}\end{array} \tag{15}\]  
Parameters \(\omega_{1}\) and \(\omega_{2}\) are the weighting coefficients that reflect the importance level of minimizing the delay of forwarding and minimizing the resource consumption cost provisioning of IoT-SR, respectively, where \(\omega_{1}+\omega_{2}=1\) and \(\omega_{1}\), \(\omega_{2}>0\).  
Solving the aforementioned optimization problem with a series of constraints is a non-trivial task, as it has been proven to be NP-hard. Traditional approaches such as ILP solvers or heuristic algorithms require extensive iterations and computations to achieve dynamic VNF placement and traffic routing. In order to address this challenge, we employ an intelligent method known for meta reinforcement learning-based SFC placement (MRL-SFCP) to facilitate real-time network transitions and optimize the placement of dynamic SFCs.