## 2 Model and Method
### Dynamic Model of a Complex Network
The Delay matrix (\(D\)) of existing routes between a source device \(s\) and a destination device \(d\) in the domain \(G_{T}\) can be obtained as follows:  
\[D(s,d)=\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\bigl{\{}\delta_{ij}x_{ij}\bigr{\}}_{t_{ij}} \tag{1}\]  
The Load matrix (\(L\)) of all existing routes between a source device \(s\) and a destination device \(d\) in the domain \(G_{T}\) can be obtained as follows:  
\[L(s,d)=\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\bigl{\{}\lambda x_{ij}\bigr{\}}_{t_{ij }}+\lambda \tag{2}\]  
where  
\(\delta_{ij}\) represents the forwarding delay from device \(i\) to device \(j\). \(\lambda\) represents the message size. Figure 1: Example of a dynamic network model. Figure 2: Sequence of connectivity matrixes of the dynamic network model in Figure 1.  
\(x_{ij}=1\) if devices \(\{i,j\}\) contact at any time and that link is used in a route between the source device \(s\) and the destination \(d\) (i.e., device \(i\) decides to forward a copy of the message to device \(j\)). \(x_{ij}=0\) if devices \(\{i,j\}\) do not connect or if the link is not used in any route between the source device \(s\) and destination \(d\). \(t_{ij}\) represents the encounter time of device \(i\) and device \(j\). We suggest the Dynamic Shortest Path Method, drawing on the aforementioned factors. This approach aims to achieve a compromise between decreasing communication costs, guaranteeing equitable load distribution, and obtaining the ideal delivery delay. To do this, we employ a tuning parameter \(\alpha\) that enables the three factors to be considered when determining the optimum route between source and destination nodes. The variables \(\{\alpha_{1},\alpha_{2},\alpha_{3}\}\) can also be changed depending on the analysis to give the three variables different relative weights. Next, we list the equations that describe the dynamic shortest path approach that is suggested:  
* Delivery Delay: \[\alpha_{1}min(D(s,d))=\alpha_{1}min\left(\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\{ \delta_{ij}x_{ij}\}_{t_{ij}}\right)\] (3)
* Load Balancing: \[\alpha_{2}min\left(\frac{1}{\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}x_{ij}}\sum_{i=1 }^{|V|-1}\sum_{j=2}^{|V|}\left(\{\delta_{ij}x_{ij}\}_{t_{ij}}-\frac{1}{\sum_{ i=1}^{|V|-1}\sum_{j=2}^{|V|}x_{ij}}\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\{ \delta_{ij}x_{ij}\}_{t_{ij}}\right)^{2}\right)^{1/2}\] (4)
* Communication Overhead: \[\alpha_{3}min(L(s,d))=\alpha_{3}min\left(\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|} \left(\{\lambda x_{ij}\}_{t_{ij}}\right)+\lambda\right)\] (5) subject to the following restrictions: \[\delta_{ij}>0,\forall i,j\in V\] \[\lambda>0\] \[L(s,d)=\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\bigl{\{}\lambda x_{ij}\bigr{\}}_{t_{ij }}+\lambda \tag{2}\]0 \[L(s,d)=\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\bigl{\{}\lambda x_{ij}\bigr{\}}_{t_{ij }}+\lambda \tag{2}\]1 (the shortest path only uses one link from the source device). \[L(s,d)=\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\bigl{\{}\lambda x_{ij}\bigr{\}}_{t_{ij }}+\lambda \tag{2}\]2 (the shortest path only uses one link to the destination device). \[L(s,d)=\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\bigl{\{}\lambda x_{ij}\bigr{\}}_{t_{ij }}+\lambda \tag{2}\]3 (in the shortest path, if a link arriving at device \(k\) is used, then a single link leaving \(k\) will be used). \[L(s,d)=\sum_{i=1}^{|V|-1}\sum_{j=2}^{|V|}\bigl{\{}\lambda x_{ij}\bigr{\}}_{t_{ij }}+\lambda \tag{2}\]4 The example of Figure 3 lists the values of the three variables for the four pathways (in different colors) from device \(A\) to device \(B\) depending on the time order to demonstrate the efficacy of the suggested strategy. * Number of Paths between devices \(A\) and \(B\) is \(p(A,B)=\sum_{i=1}^{|V|-1}M_{T}^{i}(A,B)=4\).