## 3 Methodology
### Model Formulation
The minimum threshold reflects the essential baseline activity, while the maximum cap reflects infrastructural or regulatory limits, thus encapsulating the range of feasible traffic scenarios. These constraints provide a safeguard against the variability inherent in traffic flow data, promoting the generation of realistic and applicable vehicle count estimations within the scope of the transportation model. \[\text{min\_vehicle\_count}\ \leq\hat{x}_{ijk}\leq\text{max\_vehicle\_count},\ \ \forall i,j,k\] (6) \[\text{min\_vehicle\_count}\ \leq\hat{x}^{\prime}_{ijk}\leq\text{max\_vehicle\_count},\ \ \forall i,j,k\] (7)
* Vehicle Number Change Constraints: To account for the inherent fluctuations in vehicle flow and avoid drastic variations in consecutive estimations that could undermine the model's reliability, vehicle number change constraints are instituted. These are mathematically formulated in Equation (8). Here, max_change specifies the maximum allowable variation in vehicle counts between successive intervals within the same period and day, for both datasets. This parameter is pivotal in ensuring that the estimated vehicle counts transition smoothly over time, thereby reflecting the natural progression of traffic density and preventing artificial spikes or drops that could result from data collection anomalies or estimation errors. By limiting the rate of change between intervals, these constraints preserve the temporal coherence of traffic flow estimations across the dataset. \[\left|\hat{x}_{ijk}-\hat{x}_{ij(k-1)}\right|\leq\text{max\_change},\ \ \forall i,j,k>1\] (8)
* Data Consistency Constraints: The constraints on data consistency within the modeling framework are critical in maintaining alignment between the estimated vehicle counts and the actual observed data. This alignment is encapsulated within the data consistency constraints, defined as in Equations (9) and (10). The parameter max_inconsistency denotes the threshold of acceptable deviation between the model's estimated vehicle count \(\hat{x}_{ijk}\) or \(\hat{x}^{\prime}_{ijk}\) for each day \(i\), interval \(j\), and condition \(k\) and the corresponding actual vehicle count \(D_{ij}\) or \(D^{\prime}_{ij}\). The max_inconsistency value is determined by analyzing historical traffic data to identify the typical range of deviations between observed and predicted counts. It is set as a multiple of the standard deviation of these differences to account for natural variability while minimizing the impact of outliers. Empirical testing of different max_inconsistency values helps optimize the balance between accuracy and robustness, with input from traffic management experts further fine-tuning the parameter based on practical considerations. The application of these constraints is instrumental in mitigating the risk of significant discrepancies that could compromise the utility and accuracy of the model. They ensure that the estimations remain within a defined proximity to the empirical data, thus enhancing the model's validity. In practice, these constraints anchor the estimated data to a realistic range, reflecting the trustworthiness of the traffic data and supporting the integrity of subsequent analytical evaluations. \[\left|\hat{x}_{ijk}-D_{ij}\right|\leq\text{max\_inconsistency},\ \ \forall i,j,k\] (9) \[\left|\hat{x}^{\prime}_{ijk}-D^{\prime}_{ij}\right|\leq\text{max\_inconsistency},\ \ \forall i,j,k\] (10)  
These constraints are imposed to ensure that the vehicle count estimates generated by the model are closely aligned with the empirically observed data, confining any discrepancies within a predefined margin of deviation. Furthermore, the model is designed to limit variability between consecutive time intervals by setting a maximum allowable change in vehicle numbers from one period to the next. This careful calibration minimizes disparities between the two distinct datasets under consideration.