## 3 Public Transport-Assisted Data-Dissemination System
### Capacitated Vehicle Routing Problem (CVRP)  
Once we select the best network in terms of energy efficiency. It is important to know which vehicle can be more energy-efficient when we allocate data onto buses at each bus stop. As shown below, in Figure 10, the source data center accumulates all the data from nearby user devices and caches it until an optimal bus is not found for the destination route. At each bus stop, RSUs have been deployed to offload data onto buses, and these buses carry data until the destination bus stop and upload onto the destination bus stop and to the data center. We will take different demands from the data center (DC) to allocate data onto buses as per their maximum capacity to carry data until reaching the destination while minimizing energy consumption. We will, first, define CVRP to minimize energy consumption while using public transport as a data carrier. In our model, all demands are allocated by the controller to the appropriate bus going in that direction. The demands are fetched from the DC and are allocated to the bus going on a trip in the direction of the destination location. Note that data offloading/uploading is possible at each bus stop; therefore, the transmission range is expected to be limited for data offloading onto these buses. The whole transmission procedure and energy consumption is calculated in three stages: \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline N & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline RI & 0 & 0 & 0.58 & 0.9 & 1.12 & 1.24 & 1.32 & 1.41 & 1.45 & 1.49 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The random index. Figure 10: CVRP problem for data allocation. Stage 1: RSU-Bus transmission: When the bus stops at the parent stop or source data center, data is allocated onto the bus within the transmission range. As shown in Figure 10, a and b are the earliest and final points for stage 1. Point c denotes the central projection when the bus stops at the bus stop; Stage 2: Stable State: In stage 2, the bus will carry data, as per demands, on its fixed route and does not consume any extra energy, and will consume negligible energy. Stage 3: Bus-RSU transmission: In stage 3, the bus reaches the destination spot and uploads data onto the bus stop. 1 and m are the initial and final points of this stage, and c' is the vertical projection of RSU deployed at the destination bus stop. We will minimize energy consumption by offloading data onto the fixed bus with a fixed capacity to carry data and, thus, finding the optimal solution. * Problem Definition To offload data onto buses, there is n number of demands being fulfilled by a DC, and a nearby stop is a depot to start the bus journey and return to the same bus stop after finishing its route. B is the set of buses, CB is the capacity of the bus, D is the deadline for the message delivery, which also considers the number of trips being taken by a bus. Each DC has different demands di for different locations. We define our problem in a graph \(G(V,E)\), where \(V=0,1,2\ldots n\) is a set of all nodes of the graph and E is the set of edges \((i,j)\ldots(I,j)eN\). Arc \((i,j)\) represents the path from node \(i\) to node \(j\). The energy cost \((E_{i,j})\) is calculated for each bus to carry data from the source until the destination. The minimum number of buses required to fulfill all the demands is \(\frac{\sum_{i=1}^{n}d_{i}}{\epsilon_{0}}\). The controller will assign demands onto each bus as per the destination location. A CVRP can be formulated as follows: Objective: To minimize \[\sum_{b\in B}\sum_{i=1}^{n}\sum_{j=1}^{n}E_{ij}X_{i,j,b},\] (13) which minimizes the total energy consumption cost of buses.