# An Optimization Framework for Data Collection in Software Defined Vehicular Networks
## 3 Materials and Methods
### Proposed Data Collection Optimization Model
#### 3.3.2 Common Facts about Optimization of Data Collection
For this purpose, the controller should collect all \(\mathcal{S}_{i}\) values from the nodes and compute \(\mathcal{N}_{i}\) accordingly, which is the size of set \(\mathcal{S}_{i}\). \(\mathcal{B}_{i}\) can be computed at the controller, by calculating \(\mathcal{C}_{i}\) based on the communication channel type and by calculating \(\mathcal{D}_{i}\) using the timestamp information received from unicasting uplink metadata or using the data itself of the agent nodes in order to solve the objective given in Equation (11);
* Note that the solution of the optimization problem is valid for a given instance of time, when the \(\mathcal{S}_{i}\), \(\mathcal{B}_{i}\), and \(\mathcal{N}_{i}\) are constants for that particular instance of time. However, these coefficients are time-varying as the topology of the vehicular network changes due to high mobility. The decision to optimize or not is taken by examining the change in entropy of the present network compared to the last optimized network. The normalized link entropy (\(H\)) of a homogeneous network [44] can be calculated as given in Equation (13); \[\textit{Homogeneous Normalized Entropy}\ (H_{hom})=\ \frac{\sum_{i=1}^{N}\textit{ ln }\left(N_{i}\right)}{N*\textit{ln}(N-1)}\ ;N_{i}\
eq 0\] (13)
* In Equation (13), \(N\) represents the total number of nodes in the network, \(N_{i}\) represents the degree of node \(i\) or in other words, the total number of neighbors of the \(i^{th}\) node. Homogeneous normalized link entropy (\(H_{hom}\)) has a value in the interval [0,1]. Isolated nodes having zero degrees (\(N_{i}=0\)) should not be substituted for \(N_{i}\) in Equation (13), however, those nodes are considered in the total number of nodes (\(N\)). However, \(H_{hom}\) is defined for a homogeneous network. The vehicular network is heterogeneous, as there exist mainly two types of nodes: vehicular nodes and RSUs. The optimization parameters also differ among RSUs and vehicular nodes. If we identify RSUs and vehicles as homogeneous nodes and calculate normalized network entropy (\(H\)), there can be instances where the \(H\) does not change (degree/number of neighbors has not changed), but the neighborhood of nodes has changed with respect to communication links. For example, consider a network having three vehicular nodes and two RSU nodes, as shown in Figure 2. If we consider the network as homogeneous with respect to nodes, both network instances in Figure 2 will have the same homogeneous entropy (\(H_{hom}\)). However, the topology of the network has clearly changed, as evident from Figure 2. Thus, we calculate the normalized homogeneous link entropy with respect to vehicular nodes and RSU nodes separately and obtain the average of those two to compute the heterogeneous network entropy (\(H_{het}\)) as given in Equation (14). InEquation (14), \(N_{v}\) is the total vehicle nodes, \(N_{r}\) is the total RSU nodes, \(N_{lv}\) is the total vehicular nodes in the neighborhood of a node \(i\), \(N_{ir}\) is the total RSU nodes in the neighborhood of a node \(i\). As evident from the sample calculation for two network instances in Figure 2, the \(H_{het}\) is different for two instances of the network;  
Figure 1.0 Figure 1.1
* When the network topology changes, if a new solution to the proposed data collection is not found, we can identify two problems, as given below. * Not receiving data from broadcasting nodes which have become isolated or gone out from a neighborhood of an agent;
* Redundant data collection from agents, as agents have moved to the neighborhood of other agents;  
These two problems are graphically depicted in Figure 1.2 As evident from Figure 3a, node D, which was a broadcasting node at time \(t\), has become isolated at time \(t+\delta t\). As it has been assigned as a broadcasting node by the optimizer in the previous time step, in a new network instance when it is isolated from the rest of the network, node D's data will not be collected by any agent, and will not be received to the control plane.