## 3 Methodology
### Pinn  
Many scientific fields have adopted machine learning algorithms, but do these algorithms understand the underlying physical systems they are attempting to solve? For neural network models to understand the underlying physical system, prior scientific knowledge is incorporated into the network through governing differential equations. PINN algorithms combine the contribution of the neural network with residual terms from the governing equations, which are used as penalties to constrain the space of acceptable solutions. A PINN algorithm for the LWR Model is shown in Figure 1 with the neural network along with a physics-informed component. In addition to the contribution from the neural network, the loss function is evaluated based on the residual of the governing equation. In PINN part, the loss function consists of errors from governing PDE, initial condition, and intersection conditions. The intersection conditions include the traffic flow continuity and flow conservation at the intersection points. In order to minimize the loss function, weights (w) and biases (b) are determined such that the loss function is minimized below a specified threshold or until a maximum number of iterations is reached. The following studies have focused on PINNs in transportation related studies. Using SUMO simulated data, [PERSON] and [PERSON] validated Greenshields-based LWR models for loop detector scenarios using the PIL algorithm [29]. Based on the data collected from probe vehicles, [PERSON] et al. developed a PINNs model for trajectory reconstruction [30]. [PERSON] et al. (2020) integrated second-order ARZ model for TSE by using  
Figure 1: Neural network architecture of the proposed algorithm. loop detectors and probe vehicle data [31]. They also expanded their study to estimate fundamental diagrams (FDs) and determine model parameters [32]. To illustrate the method in an example network, Figure 2 presents a small traffic flow network, which is composed of four links. Link-Nets are employed in each link with the different architecture of the neural networks to solve the integrated traffic flow model. The Link-Nets offer better computational efficiency through parallelization of the network. Moreover, shallow and deep networks could be employed for various links depending upon the complexity of traffic on the links. On the traffic flow model, the general form of the partial differential equation of the Lighthill-Whitham-Richards (LWR) model of traffic flow is given by:  
\[\partial_{t}\rho+\partial_{x}(\rho v)=0;\;v=V(\rho) \tag{1}\]  
where \(\rho\): \(\mathbb{R}\)\(\rightarrow\)\([0,1]\) is the traffic density, i.e., the number of vehicles per unit length \(v\) is the traffic speed, and \(V\) (\(\rho\)) is the flux which is a speed-density function. Consider a traffic flow network consisting of N number of non-overlapping links. Let \(D[\cdot]\) be a general differential operator and \(\Omega_{q}\) be a subset of the computational domain \(\Omega\). The traffic state \(\rho(x,t)\) at each point \((x,t)\) in a continuous domain is determined such that the following traffic flow model PDE could be satisfied:  
\[\partial_{t}\rho+D[\rho(x,t)]=0,\;x\in\Omega_{q},\;t\in[0,T] \tag{2}\]  
The output of the PINNs for the \(q\)th link is given by  
\[\rho_{\widetilde{q}_{q}}=N^{\ell}(z;\widetilde{\theta}_{q})\;,z\in\Omega_{q},\,q\in 1,2,\ldots,N \tag{3}\]  
Let \(\{x_{u_{q}}^{i}\}_{i=1}^{N_{u_{q}}}\), \(\{x_{f_{q}}^{i}\}_{i=1}^{N_{f_{q}}}\), and \(\{x_{l_{q}}^{i}\}_{i=1}^{N_{l_{q}}}\) be the set of randomly drawn training, residual and intersection points in the \(q\)th link, respectively. In a \(q\)th link, the number training, residual, and intersection points are respectively represented by \(N_{u_{q}}\), \(N_{f_{q}}\), and \(N_{l_{q}}\). On the ML part, under the PINN algorithm, the loss from PUNN and PINN for TSE is respectively given by \(\rho_{\widetilde{q}_{q}}\) and \(\tilde{f}_{\widetilde{q}_{q}}\).