# A Novel Traffic Analysis Zone Division Methodology Based on Individual Travel Data
## 3 Traffic Subdivision Methods
### Solving Traffic Cell Segmentation Model  
Based on the constructed TAZ division model, this study optimizes the division scheme using four layers, as shown in Figure 5.  
```
Input: Original dataset, Initial traffic cell limits \(L\) and \(U\), spatial cell limits, iteration limits Output: Optimal TAZ division scheme Step 1: Data Preprocessing and Initialization * Preprocess the original dataset. * Set upper and lower limits for the number of traffic cells: \(L\leq N\leq U\). * Set upper and lower limits for the number of spatial cells: \(0\leq i\leq Z\). * Set the upper and lower limits for iteration optimization times: \(0\leq j\leq Z\). * Initialize the counts \(N\) of traffic cells, \(i\) of spatial cells, and \(j\) of iteration optimizations. Step 2: Macro-Indicator Assessment for\(N=L\)to\(N=U\) with step \(l\)do  Divide the area into \(N\) TAZs. * Calculate the macro-indicators for the division scheme. * Store the result of macro evaluation for the current scheme. Step 3: Micro-Indicator Evaluation for each scheme in step 2 do * Select the starting cell for TAZ division based on the travel feature data and spatial cells. * Formulate the optimal aggregation set of cells in each TAZ. * Evaluate micro-indicators for each TAZ division scheme. Step 4: Final Scheme return Optimal TAZ division scheme based on both macro and micro evaluation.
```  
**Algorithm 1**TAZ division scheme and evaluation process.  
The first layer is the data preparation and initialization layer, which preprocesses the original dataset; sets the upper and lower limits of the number of traffic cells \((L\leq N\leq U)\), of the number of spatial cells \((0\leq i\leq Z)\), and of the number of iterative optimization times \((0\leq j\leq Z)\) in the division scheme; and initializes the counts \(N\) of the traffic cells, the counts \(i\) of the spatial cells, and the counts \(j\) of the iterative optimization.  
The second layer is the macro-indicator assessment layer. The division scheme starts with the formation of \(N=L\times TAZs\), and after completing a scheme, the macro evaluation indicators of each scheme are calculated; then \(N=(L+l)\times TAZ\) schemes are divided  
Figure 5: Structure diagram of the algorithm. Detailed pseudocode is provided in Algorithm 1.  
(where \(l\) is the interval between the number of schemes) until the division of \(N=U\times TAZ\) schemes is completed, through which \((\frac{UL}{1}+1)TAZ\) division schemes are obtained.  
The third layer is the micro-indicator evaluation layer. The starting cell for TAZ division is selected according to the second layer and the travel feature data of spatial cells. The optimal aggregation set of cells in each TAZ is obtained through the scheme formation layer.  
The fourth layer is the iterative optimization layer of the algorithm. In the scheme, the aggregation of each TAZ starts from the starting cell, and a scheme is generated according to the aggregation optimization model. Scheme formation is a multiobjective optimization process that needs to minimize the travel density difference and travel proportion in each cell. During scheme formation, these two variables are calculated after the cell found based on the aggregation rules is singled out by constraints. Then, the two variables are sorted from smallest to largest to calculate their algebraic sum. If the \(i\) grid meets both the standard deviation of travel density and the minimum travel proportion, the \(i\) grid is aggregated. If the sequence sum is not unique, then grid \(i\) with the smallest standard deviation of travel density is aggregated, as shown in Figure 6.