PARAMETER AND DENSITY ESTIMATION FROM REAL-WORLD TRAFFIC DATA: A KINETIC COMPARTMENTAL APPROACH

. The main motivation of this work is to assess the validity of a LWR traﬃc ﬂow model to model measurements obtained from trajectory data, and propose extensions of this model to improve it. A formulation for a discrete dynamical system is proposed aiming at reproducing the evolution in time of the density of vehicles along a road, as observed in the measurements. This system is formulated as a chemical reaction network where road cells are interpreted as compartments, the transfer of vehicles from one cell to the other is seen as a chemical reaction between adjacent compartment and the density of vehicles is seen as a concentration of reactant. Several degrees of ﬂexibility on the parameters of this system, which basically consist of the reaction rates between the compartments, can be considered: a constant value or a function depending on time and/or space. Density measurements coming from trajectory data are then interpreted as observations of the states of this system at consecutive times. Optimal reaction rates for the system are then obtained by minimizing the discrepancy between the output of the system and the state measurements. This approach was tested both on simulated and real data, proved successful in recreating the complexity of traﬃc ﬂows despite the assumptions on the ﬂux-density relation.


Introduction
Modeling traffic flow to reflect macroscopic vehicular patterns becomes more and more important in the area of connectivity and autonomy [10,14,22,25].In this regard, proposing macroscopic traffic flow models capable of reproducing traffic flow patterns observed in real-world setting is a key problem.Such patterns are traditionally observed through data collected from sensors installed on a road (e.g.loop detectors) which collect vehicle counts or occupancy times, which in turn are aggregated and filtered to yield density, flux and speed estimates [16].Ongoing progress in image capturing and processing capabilities have permitted to multiply and democratize the use of vehicle trajectory data, which arguably provide a more complete and faithful picture of traffic behaviors since the evolution of each vehicle can be tracked along the road [15,20].We also expect that the penetration of connective vehicular technology and novel sensing and communication systems will further propel the above transition.
Model-wise, macroscopic traffic flow models play a fundamental role [10] to model network level behavior or management solutions.In particular, first order traffic flow models are predominant and reflect fundamental macroscopic properties such as conservation and flow property [14].Such models consider three main fundamental quantities defined over time and along the road (space): the density of vehicles at a given location and time, the flux (or flow) of vehicles passing a given location at a given time and the average speed at a given location and time.These three variables are linked to one another by the fundamental relationship of traffic, and are captured by first order hyperbolic partial differential equation [10] linking flux and density of vehicles.In the well-studied Lighthill-Witham-Richards (LWR) model, the speed of vehicles is expressed as a function depending on the density only, thus yielding a partial differential equation (PDE) satisfied by this last quantity [18,23].
The question of assessing the legitimacy of the hypotheses made by the continuous models is natural, especially when working with traffic flow data obtained from real-word measurements [8].Take for instance Figure 1, which shows a fundamental diagram, i.e. a scatter plot of flow vs density measurements done at the same locations and time, obtained from the real-world trajectory data (cf.Section 4.2.1 for more details) of the highD dataset [15].Modeling the seemingly complex flux-density relationship observed in this diagram by a simple univariate function, as done in the LWR model, then becomes a questionable choice.Hence the following questions motivated this work: How valid is the choice of a univariate (only density-dependent) flux function when modeling traffic flows from real-world trajectory data?How can we enhance such traffic flow models for them to better reflect the patterns observed in the available data? Answering this questions and learning to mimick the spatial and temporal change of parameters in fundamental diagrams (flux functions) has two major benefits.First, it contributes to improve the acuracy in describing the traffic dynamics (e.g.propagation of jams).Second, it supports traffic management solution by enabling to reach better performance (i.e.traffic control oriented).
In this regard, we first have to bridge the gap between continuous models and discrete measurements of traffic flows.This can be done by first fitting a flux-density function on a fundamental diagram (i.e. a scatter plot flux vs density measurements done at the same locations in space and time).An example of such a fit can be seen in Figure 1.Then, the resulting traffic flow PDE is solved (numerically) and finally the solution is compared to the measurements [8].In such an approach, the focus is put rather on finding an adequate family of flux functions that would best fit the fundamental diagram, and not on the underlying assumption that it depends only on the density.The first contribution of this work is to propose a different approach, which flips the two steps.In this approach, the gap between continuous models and trajectory-based measurements is bridged by working on discretized versions of the modeling PDE obtained by finite volume methods, thus extending an approach already used to answer control-related questions linked to these traffic models [5,11,12].The following two-step comparison is then performed: In the first step, only the density measurements are used.They are compared to the discretized PDEs through a least-square approach, thus allowing to determine the discretized models that best approximate the measurements.In the second step, the flux values resulting from the discretized PDEs are compared to the flux measurements: the fundamental diagrams and the values obtained in both cases are compared.The originality of this approach hence stems from the fact that it evaluates separately the density and flux modeling capabilities of the model.
The second contribution of this work is the interpretation of discretized PDEs as discrete dynamical systems whose parameters are directly linked to those of the original continuous PDE models, thus yielding an approach similar to the cell transmission model of [4].Besides, we use in this work a particular discretization scheme, the so-called Traffic Reaction Model (TRM) [19], which models flow dynamics along a discretized road as a chemical reaction network, thus allowing us to interpret the parameters of the system (and more generally of the PDE) as chemical reaction rates.Another contribution is that we propose an extension of the TRM taking the form of space and/or time dependent parameters and aiming at enhancing the modeling capabilities of the model.Finally, we validate our approach and draw conclusions on the choice of a LWR model to model real traffic flows through numerical experiments using both synthetic and real data.
The paper is organized as follows: In Section 2 we recall the derivation of (first order) continuous models for traffic flow, their discretization using finite volume methods and introduce the traffic reaction model, as well as a proposed extension.In Section 3, we present the discrete dynamical system and how its parameters can be tuned with the objective of mimicking observed density measurements.Finally, we present in Section 4 numerical experiments that were conducted on synthetic and real traffic data.

Continuous traffic models and their discretization
2.1.First order macroscopic traffic flow model.Let us assume that a traffic flow is studied on a onedirectional stretch of road.The density of vehicles ρ and the flux (or flow) of vehicles φ are two continuous quantities defined across space (i.e.along the road) and time routinely used to characterize the traffic flow in macroscopic models.Integrating the density function at a time t, across a section ∆x of the road, gives the count of vehicles in ∆x at t; and integrating the flux function at a location x of the road, across a time interval ∆t, gives the count of the vehicles crossing x during ∆t.
For any two locations x 1 < x 2 on the road and time t, a conservation law can hence be written to express the fact that the variation of the number of vehicles between x 1 and x 2 is equal 1 to the difference between the number of vehicles entering this road section at x 1 and those leaving the section at x 2 .This gives the integral representation (1) d dt which is equivalent to the following partial differential equation ∂ρ ∂t under suitable regularity conditions on the functions ρ and φ.
It is common to assume some additional relationship between the density ρ and the flux φ based on some observed links between the two quantities.For instance, when the density is 0 (meaning that the road is empty), so should the flux.Similarly, when the density is at its maximal value (corresponding to a bumper-to-bumper traffic), the flux should be zero as well.The so-called Lighthill-Whitham-Richards (LWR) model [18,23] in particular stems from these observations by expressing the flux as a function f of the density (only) as follows where f is a (univariate) function satisfying f (0) = 0 and f (ρ m ) = 0, for ρ m the maximal value the density can take.The simplest form f can take is arguably the quadratic function defined by where v m > 0 is a parameter that can be interpreted as the maximal speed achievable by vehicles on the road and the notation f (ρ ; v m , ρ m ) is used to mark the fact that f is seen as function of the density ρ depending on the two parameters v m and ρ m .Then, the conservation law under the LWR model becomes We will assume that the maximal density ρ m > 0 is a known constant, which characterizes the capacity of the road, i.e., the maximal amount of vehicles that can fit on a road section.As such, it can be directly estimated by considering for instance the ratio between the number of lanes and the typical length of a vehicle.We hence introduce the normalized density function u, which will become from now on our main variable of interest: Then, PDE (3) leads to the following PDE satisfied by u: where f also denotes, with a slight abuse of notation, the normalized flux function defined by ( 5) For any given bounded initial condition u 0 = u(0, •), the existence and uniqueness of (entropy) solutions of PDE (4) on R + × R, T > 0, is guaranteed in the more general case where the maximal speed is taken to be a function (t, x) → v m (t, x) that is bounded and Lipschitz continuous [3,13].

Finite volume approximations of PDEs.
In general, no closed-form solution of PDE ( 4) is available, and therefore, numerical methods must be used to approximate it.In particular, finite volume schemes have been widely used to compute solutions of the (hyperbolic) PDEs of the form (4).As we will see, the quantities computed by such schemes relate to integrals of the solution, which are more appropriate since hyperbolic PDEs often have solutions that develop discontinuities in finite time and therefore for which point evaluations do not make sense everywhere [17].Assume that PDE (4) is approximated on a domain that has been discretized as follows: in time we consider equidistant time steps t i = i∆t for step size ∆t > 0 and i ∈ N, in space we consider equispaced cells of size ∆x > 0 with centroids x j = j∆x for j ∈ Z.We then introduce the cell average functions U j defined by (6) U 1 For sake of data availability and exposition of the method, we assume in this work that no on-or off-ramps are present in the road, meaning that no additional source or sink terms need to be added to the law of conservation of vehicles.Hence, U j is the cell average of the solution u of the PDE on the j-th cell.Then, the conservation law (1) applied on the j-th cell yields the following differential equation satisfied by U j where x j±1/2 = x j ± ∆x/2 are the boundary points of the j-th cell, and f (u(t, x j±1/2 ) ; v m ) = φ(t, x j±1/2 )/ρ m denotes the (normalized) flux of vehicles at each boundary of the cell.Finite volume methods propose to turn this set of equations into a system of ordinary differential equations by replacing the right-hand side of ( 7) by a function of the cell averages {U j : j ∈ Z}.In the particular case of (3-point) conservative schemes, the flux at a boundary point x j−1/2 is replaced by a so-called numerical flux F (U j−1 , U j ; v m ) depending on the cell averages of the two cells j − 1 and j sharing that boundary and on the parameter v m defining the flux function.
Hence, Equation (7) yields a system of ODEs for the finite volume approximations U j of the cell averages U j : We assume, for all j, that the initial condition {U j (0) : j ∈ Z} is known, and use it to set the initial values of the finite volume approximation U j (t 0 ) = U j (t 0 ).Then the numerical solution of the PDE using such schemes can be obtained at times t 1 , t 2 , . . .by considering an Euler time discretization (of step size ∆t) of the system (8), which yields the recurrence relation where U i j is the quantity defined by U i j ≈ U j (t i ).Different choices of numerical flux F yield different schemes.Among the choices most encountered in the literature, we can cite the Lax-Friedrichs (LxF) scheme and the Godunov scheme which are presented in Appendix A [1,7,17].

Traffic reaction model.
In this paper, we focus on a particular finite volume scheme [19] for solving PDE (4) under the assumption that f is given by (2): the so-called "Traffic Reaction Model" (TRM).The TRM is obtained by modeling the road traffic dynamic (on the discretized road) as a chemical reaction network.More precisely, the process of a vehicle passing from a cell j to the next one is interpreted as a chemical reaction that "transforms" a unit of occupied space O j in j and a unit of free space Φ j+1 in j + 1 into a unit of free space Φ j in j and a unit of occupied space O j+1 in j + 1 (cf.Figure 2).Hence, the road cells are interpreted as compartments containing two homogeneously distributed chemical reactants (Free space Φ j and Occupied space O j ) and interacting with each other (through the "transfer" reaction).
The law of mass action then allows to study the kinetics of this network of reactions [9].The rate at which a particular reaction happens is then modeled as being proportional to the product of the concentration of each one of its reactants (elevated to the power of the stoichiometric coefficient of the reactant, i.e., the number of "units" of this reactant consumed by a single reaction).Denote by o j (t) (resp ϕ j (t)) the concentration of Occupied space O j (resp.Free space Φ j ) in the j-th compartment at time t ≥ 0. The evolution of these concentrations can be expressed as the difference between the rate at which they are produced by the rate at which they are consumed by the reactions happening in the compartment, thus giving where, for any j, k j−1→j is the reaction rate (proportionality) constant of the reaction between the (j − 1)-th compartment and the j-th compartment.Adding these two differential equations gives in particular that the quantity ϕ j + o j is conserved through time.
From now on, we assume that all the reaction rates k j−1→j are constant and equal to k. Identifying then the concentration of occupied space o j with the density of vehicles ρ j in the j-th road cell/compartment, and the identifying the concentration of free space ϕ j with a density of free space, we note that the conserved quantity o j + ϕ j can be interpreted as the maximal capacity of the cell, which gives o j + ϕ j = ρ m .Hence, we have Dividing this last expression by ρ m to get back to normalized densities and using an Euler time discretization then gives (10) , where C is the quantity defined by (11) C = ∆tρ m k .
Note in particular that by definition of the reaction rate k, the quantity Cρ m ∆x = (kρ m ∆t)(ρ m ∆x) corresponds to the maximal number of vehicles that can be transferred from the (j −1)-th to the j-th cell during a period ∆t.Indeed in the ideal case where the j-th cell is empty (i.e., ϕ j = ρ m ), the transfer reaction between (j − 1) and j happens at rate kϕ j o j−1 = kρ m o j−1 .Hence during ∆t, the concentration of reactants decreases by kρ m o j−1 ∆t times.Hence, if the (j − 1)-th cell is full (o j−1 = ρ m ), (kρ m ∆t)(ρ m ∆x) vehicles will be transferred.This quantity can also be expressed in terms of the maximal speed v m of the vehicles.Indeed, during ∆t, vehicles can travel a distance of at most v m ∆t meaning that at most ρ m (v m ∆t) can cross a cell interface during this period.By equating both expressions we get which in turn gives with the normalized numerical flux FT given by As a finite volume scheme, the TRM has several desirable properties.First, it is a consistent with the quadratic flux (5), meaning that numerical flux F T satisfies F T (u, u ; v m ) = f (u ; v m ) for any u ∈ [0, 1].Then, under the assumption that the discretization steps ∆t, ∆x satisfy a so-called Courant-Friedrichs-Lewy (CFL) condition given by (13) ∆t ∆x ≤ 1 2v m , In particular (cf.[19]) the TRM is • monotone: if the recurrence is initialized with two initial conditions { U 0 j : j ∈ Z} and { V 0 j : j ∈ Z} such that for any j, U 0 j ≤ V 0 j then for any i and any j, U i j ≤ V i j .• L ∞ -stable: if there exist A, B ≥ 0 such that the initial condition satisfies for any j, U 0 j ∈ [A, B], then for any i and j, U i j ∈ [A, B]. • convergent: the L 1 norm between the discrete cell-defined solutions and the true solution2 converges to 0 as ∆x → 0 (with ∆t/∆x kept constant).This convergence result is a consequence of the consistency and monotonicity of the scheme [17].
Remark 2.1.The CFL condition (13) can also be interpreted in the context of reaction kinetics.Indeed, starting from the quantity C defined above, we have that the CFL condition is equivalent to imposing that ( 14) Let us then consider for instance the interface between the compartment (j − 1) and j.Recall that, according to the law of mass action, the rate at which the transfer reaction of this interface happens is ko j−1 ϕ j , meaning that during ∆t, N (∆t) = ko j−1 ϕ j ∆t∆x vehicles are transferred.Note that, since o j−1 is upper-bounded by the maximal capacity ρ m , we can upper-bound N (∆t) by N (∆t) ≤ kρ m ϕ j ∆t∆x.Then, the CFL condition yields through (14) an upper-bound for k, which in turn gives This means in particular that, during ∆t, the number of vehicles transferred from cell (j − 1) to cell j is lower than the number of free slots in the left-half of cell j.Similarly, we can prove that this same number is lower than the number of vehicles slots in the right-half of cell j − 1 (by starting by upper-bounding ϕ j ).Hence, the CFL condition allows to decouple what is happening at the different interfaces during a timelapse ∆t: indeed, at each interface between two cells (j − 1) and j, the reaction dynamics come down to a transfer of vehicles from the right-half of cell (j − 1) to the left-half of cell j, and in this sense are independent of what is happening at other interfaces (or within other half cells).
2.4.Extension of the TRM to spatial and temporal variation in parameter.Reverting to the traffic interpretation of traffic flow dynamics used by the TRM and presented in Section 2.3, working with a constant parameter v m in the traffic model implies that the traffic flows without perturbation along a homogeneous road: indeed all the reactions between consecutive road compartments happen with the same rate.A direct generalization of this model consists in considering that these reaction rates can now vary in time or across space (i.e., two pairs of consecutive compartments can have different reaction rates).
Let us first assume that the road is infinite and discretized into cells of same size.The evolution of the normalized density in a given compartment would then take the form where, for any j, k j−1→j (t) is the reaction rate of the reaction between the (j − 1)-th compartment and the j-th compartment, at time t.An explicit Euler discretization of this expression then gives the recurrence where for any j, n, the quantity C n j is defined, at the n-th time step t n , by Note that, following the same approach as in Section 2.3, the quantity C n j ρ m ∆x amounts to the maximal amount of vehicle transfers that can happen between the (j − 1)-th cell and the j-th cell during a period ∆t starting at time t n .Assuming that, around the interface (j − 1)/j, the maximal speed of the vehicles is now a time dependent function v m (•, x j−1/2 ) : t → v m (t, x j−1/2 ), this quantity can be equated to by seeing the integral on the right-hand side as the limit of a Riemann sum, and using the similar result derived in Section 2.3 for the constant case.Hence, we have In particular, following the reasoning of Remark 2.1, we will assume that the quantities C n j satisfy the same condition as in the constant case, namely C n j ∈ (0, 1/2).The scheme defined by ( 15) can be seen as finite volume scheme with a numerical flux consistent with the space-time dependent flux function f defined by ( 16) This type of finite volume scheme was studied in the context of approximation of non-homogeneous scalar conservation laws [2].Under some regularity assumption on the speed parameter v m (that are not stricter than those described earlier for the existence and uniqueness of an entropy solution), this finite volume scheme converges to the entropy solution of PDE (4), hence corresponding to a LWR model with space-time varying parameter v m [2, Theorem 1].
3. A discrete dynamical system to bridge the gap between models and measurements 3.1.Constant parameter case.Let us assume that measurements of the density and flux of vehicles along a road are available.In particular, we assume that these measurements are made along a road discretized into N x cells of size ∆x (centered at locations ]) and at N t time steps spaced by ∆t (and denoted by ).These measurements are collected into a density matrix whose entries D i j and F i j are the measurements made at time t i and location x j .We will also assume that the maximal density ρ m of the road is known, and that therefore a normalized density matrix Nt×Nx can be obtained from D by dividing its entries by ρ m .We aim at assessing whether the continuous LWR model introduced in the previous section adequately represents the traffic flow as observed through D (or U ) and F .
In order to bridge the gap between continuous models of density and the discrete measurements at hand, and therefore to be able to compare them, we think of the density observations in U as arising from a particular solution of the (continuous) PDE ( 4) for some unknown (but constant) value of the parameter vm .We then propose to leverage the fact that finite volume schemes would naturally provide estimates for the entries of U (assuming vm is known).The idea is then to look for the PDE parameter value v * m which gives finite volume estimates U * closest to the observed data U .Then, the quality of the continuous model is assessed by comparing U * to U , and comparing the flux matrix F to flux estimates obtained by applying the flux-density relationship (2) of the model to the density estimates U * .
The optimal parameter value v * m is obtained as follows: For any choice of parameter v m , we can compute the finite volume discretization of PDE (4) by applying the recurrence relation (9) N t − 1 times, thus giving a matrix of estimates The initial state of this recurrence is set up using U as ( 17) Observed data is only available on a road of finite length.As has been seen earlier, the scheme only takes values from the neighboring compartments into account.Therefore, we choose boundary conditions using once again U by imposing (18) ] .This overall process is seen as computing the output of a discrete dynamical system at times t 1 , . . ., t Nt−1 .Indeed, note that for the finite volume schemes (12), (31) and (32) considered in this paper, we can introduce the (unit-free) scaling parameter C by and then write the finite volume recurrence relation (9) as where U i ∈ R Nx is the vector defined by T , and transformation defined in part by the boundary conditions ( 18) as ( 21) with h and F depending on the choice of numerical scheme (see Equations ( 12), (31) and (32)).The discrete dynamical system is then defined as follows: • the state vector of the system contains the finite volume approximations of the PDE across the discretized road, at a given time step; • the initial state of the system is the vector U 0 , defined by the initial condition (17) of the scheme; • the recurrence relation (20) defines the successive state updates; • the scaling parameter C acts like a control parameter of the system.Remark 3.1.Note that the CFL condition (13) actually imposes a restriction on the domain of definition of the control parameter C: for the schemes considered in this paper to yield approximations of the cell averages of the solution (and ensure that the recurrence does not diverge), we should only consider C ∈ (0, 1/2).
The optimal PDE parameter v * m is then obtained by finding the value of the control parameter C of the discrete dynamical system that minimizes a cost function measuring the discrepancy between the output of the system and the data U .In particular, we consider a least-square approach, meaning that the optimal control parameter C * will be the solution of the problem (22) C * = argmin Following (19), this gives in turn an optimal PDE parameter v * m given by and optimal finite volume estimates given by U * = U (C * ).
Finally, we turn the minimization problem ( 22) into an unconstrained minimization problem by introducing the parameter θ defined by ( 23) where lgt : R → (0, 1) is the logit function3 which defines a strictly increasing bijection between R and (0, 1).The strict monotonicity and smoothness of lgt then allow to cast the minimization problem ( 22) into the following equivalent minimization problem ( 24) where, for any θ ∈ R, C(θ) ∈ (0, 1/2) is defined by (23).Then, the optimal control parameter C * of Equation ( 22) is simply obtained by taking Following from the boundary conditions (18) and initial conditions (17), the minimization problem (24) then boils down to the unconstrained minimization of the cost function L defined by ( 25) This minimization task can be in particular tackled using gradient-based optimization problems since the structure of the recurrence relation (20) can be leveraged to derive analytic expressions for the gradient of L (cf.Appendix C).That is of course if we assume that we can take the derivative of the maps H i in (20), which in our case forces us to work with either the LxF scheme or the TRM scheme.In particular, in the applications presented in this paper, only these two schemes are considered and the conjugate gradient algorithm is used to perform the minimization [21].
3.2.Varying parameter case.The approach presented in the previous section naturally extends to the assumption where parameters varying in space or time are considered (as described in Section 2.4).The discrete dynamical system is defined using the recurrence relation (15), and its output is once again compared to the density data U to derive optimal control parameter values through a minimization approach.In particular, • the boundary and initial conditions are set in the same way as in the constant case; • the recurrence relation defining the system takes the form • the control parameters of the system are the coefficients ]}, and are determined by minimizing (without constraints) a cost function L given as the sum of a least-square cost and a regularization term R(C) (clarified below): where C(θ) ∈ (0, 1/2) (Nx+1)Nt is obtained by applying the function (23) to each entry of θ ∈ R (Nx+1)Nt and λ > 0 is a hyperparameter balancing the importance of the least-square minimization of the regularization; Data discretization grid Scheme discretization grid Space subdivision • the following regularization term R(C) is considered: Note that the regularization term introduced above plays two roles.On the one hand it allows to reduce the risk of overfitting: indeed the number of parameters now amounts to N t (N x +1) which is larger than the number of terms in the least-square term, and thus increases the risk of overfitting.On the other hand it allows to ensure some kind of smoothness in space and time of the parameters, as sharp changes between consecutive coefficients in space or time are penalized.This kind of smoothness assumption of the space-time varying parameter v m is usually required to prove the existence and uniqueness of solutions of PDE (4) and explains why we try to enforce it in the estimation approach [3,13].
Finally, the minimization of the cost function is performed once again using the Conjugate gradient algorithm, while using the explicit formula of the gradient given in Appendix C.

3.3.
Extension to a multilevel approach.So far, the finite volume approximations U were computed on the same discretization grid as the one used to create the density matrix U .This has two consequences.First, if the discretization steps are large with respect to the size of the domain, we can fear that the finite volume scheme will not yield satisfactory approximations of the cell averages of the solution.Second, this choice implicitly imposes a restriction on either the range of admissible parameters v m or the discretization pattern ∆t, ∆x since we also impose that for the discretization steps used to compute U , the CFL condition (13) should be satisfied.For instance, assuming that we upper-bound the admissible values of the critical speed v m by a speed of 180 km • h −1 = 50 m • s −1 , the CFL condition (13) gives that the discretization steps ∆t, ∆x should satisfy ∆t/∆x < 0.01 s • m −1 , or equivalently ∆t < 0.01∆x s.Such a coupling may lead to consider very overly small time step sizes or large space step sizes, which can be limiting if one is not able to change the discretization pattern of the data.
To circumvent these limitations, we propose to use a multilevel approach where a different (and finer) discretization pattern, denoted by ∆t, ∆x, is used for the finite volume computations.In particular, we will take for some P t , P x ∈ N * , (26) ∆t = ∆t P t , ∆x = ∆x P x , meaning that the discretization pattern of the finite volume scheme will be a subdivision of the discretization pattern ∆t, ∆x of the data (cf.Figure 3).Therefore, the CFL condition will become (27) ∆t ∆x = ∆t ∆x Thus introducing two additional parameters P t , P x can be used to enforce the CFL condition without having to impose anything on the discretization pattern of the data.
The choice (26) yields that each road cell used to compute the density matrix U is subdivided into P x subcells and each time step is subdivided into P t steps.Hence, the finite volume matrix U will have size (P t (N t − 1) + 1) × (P x N x ).We then note that, for i ∈ ] and by definition, each entry U i j of the density matrix U can be expressed as function of the solution u of the PDE (4) (with parameter vm ) as where the integral on the right-hand side corresponds to the cell average of the solution over the k-th subcell of the j-th road cell, at time iP t ∆t.Since this last quantity is approximated by the entry (iP t , k + jP x ) of the finite volume matrix U , we deduce that an approximation of U i j is obtained by taking the average of the quantities In order to use the recurrence relation ( 9), initial and boundary conditions defined on the finer discretization grid of the finite volume scheme are needed.We deduce them from the data U by imposing an initial condition constant across all subcells of a given road cell, i.e. (28) ] , and for the boundary conditions, by considering a linear interpolation of the boundary conditions obtained from the data, i.e. (29) The minimization problems introduced in the previous sections can then be readily reformulated to account for the difference in discretization steps between the data matrix and the finite volume estimates, as presented in detail in Appendix B.

Numerical experiments
4.1.Application to parameter identification.In this case study, we numerically solve PDE (4) using the Godunov finite volume scheme over a space domain [−1.5, 1.5] and a time frame [0, 1], with a parameter value vm = 1 and a maximal density ρ m = 1.In particular, the space discretization step is chosen small compared to the domain extension, namely ∆x = 10 −4 , in order to guarantee that the numerical solution is close to the true solution.As for the time discretization step, it is set to ∆t = 0.25∆x/v m in accordance with the CFL condition (13).Hence Nx = 30000 space cells and Nt = 40001 time steps are considered.The initial condition is taken as and therefore has a profile that is non-symmetric and has oscillations across space (cf. Figure 4).Note that reflexive boundary conditions are considered, meaning that we set U i −1 = U i 0 and U i Nx = U i Nx−1 for any i ≥ 0 in the recurrence (9).The resulting numerical solution is cropped in space into the section [−1, 1] in order to avoid any possible boundary effect coming from the boundary conditions: this solution, represented in Figure 4, is from now on considered as the ground truth solution.
Starting from the PDE solution described above, we build density data matrices U corresponding to different choices of discretization steps ∆t, ∆x.Examples of such density matrices are represented in Figure 5.We then estimate for each density matrix the value of the PDE parameter v * m by solving the minimization problem (24), using both the TRM and the LxF scheme.We also compute the Root Mean Square Error (RMSE) between the considered density matrix U and the corresponding finite volume approximations U * = U (v * m ).The discretization steps used by these schemes are set according to Section 3.3: the finite volume approximations are computed on a grid obtained by applying P x ∈ {1, 3, 5} space subdivisions and P t time subdivisions of the discretization grid of U , where for each value P x , P t is the smallest integer so that the CFL condition (27) is satisfied.
The relative errors between the estimated parameters and the true value vm = 1 are given in Table 1 and the RMSE values between the associated finite volume approximations and the density matrices are given in Table 2. First, one can note that for density matrices with more than 11 space cells, errors on the parameter estimation lower than 15% (and even in some case lower than 5%) can be obtained.This shows that the parameter can indeed be identified from the discretized density matrices.As for the residual error on the parameter, it can be explained by the nature of the density matrices used here: indeed, comparing the PDE solution in Figure 4 and its discretizations in Figure 5, suggests that considering too coarse discretizations might smear the solution to a point where identification is no longer possible.In such cases, the features of the original solution which could    help to better identify the parameter are no longer visible in the discretized data: for instance, in Figure 5d, the time and position where sharp changes in the PDE solution occurred (as seen in Figure 4b) are no longer identifiable.
Then, for both the TRM and the LxF scheme, the errors on the parameter and density estimations seem to only depend on the number of space discretization steps N x , and not on the number of time discretization steps N t .Besides, the higher the number of space subdivisions used in the scheme, the better the parameter and density estimates are.A takeaway from these results is that the quality of the parameter and density estimations can be improved independently of the time discretization of the data, by working with fine space discretization steps and by subdividing the cells in space when using the schemes.
Besides, when comparing the schemes, one can note that the TRM systematically and significantly outperforms the LxF scheme in terms of RMSE and generally yields better parameter estimates.To understand why, we represent in Figures 6 and 7 the finite volume approximations associated with two density matrices (respectively obtained by taking N x = 11 and N x = 51) when using both the TRM and the LxF scheme (with 5 space subdivisions).It can be observed, especially in Figure 7, that the density estimates are smoother than the original data.The LxF scheme seems to smear the solution more than the TRM, which explains the higher RMSE on the density estimates.
Finally, in order to test the robustness of the approximation, we consider the following approach.Starting from one of the previously formed density matrices, we "hide" some of its columns during the estimation procedure.More precisely, we carry out the parameter estimation (and density approximations) while assuming that only 3 of the density columns are known: the first and the last one (which are used to define boundary conditions) and the center column (i.e., the ((N x − 1)/2)-th column).However, we will always assume that the 0-th row of U is observed (as it is used to define the initial state of the finite volume recurrence).Following        Appendix B, this means in particular that the cost function of the minimization problem now takes the form where I c = {(N x − 1)/2} is the set of observed road cells (excluding the boundary cells).Following Corollary C.4, the minimization of this cost function can once again be tackled using a gradient-based optimization algorithm and in particular the conjugate gradient algorithm.The relative error between the estimated parameters and the true value vm = 1 are then given in Table 3 and the RMSE values between the associated finite volume approximations and the density matrices are given in Table 4.One observes that the TRM is still able to yield good estimates of the parameter and RMSE on the density estimates that are similar to when considering the whole density matrix.However, the LxF scheme now gives poor estimates of the parameter and high-RMSE density estimates.Hence, the TRM proves to be more robust to missing input data than the LxF scheme.From now on, only the TRM will be used as finite volume scheme.In the next section, we apply the same approach as the one used in this case study to real-world measurements of density.

Mimicking real traffic dynamics.
4.2.1.Generalized density data.Most tools designed to measure traffic flows and densities are based on counting the number of vehicles passing a given point of the road or present in a given section of the road.The resulting density measurements are then essentially discrete since they depend on these discrete count variables.However, when trajectory data is available, Edie [6] suggests a generalization of this idea that leverages the continuity of trajectories (in space and time) to yield a continuous estimation of the density.Take a region A of the    4. RMSE between the density data U and the approximated densities U * for various choices of discretization steps and schemes, in case where only the center road cell is observed through time.space-time domain on which the vehicle trajectories lie.The density of vehicles in A is defined as the ratio between the time spent by all the vehicles in A by the area of A. Similarly, the flow of vehicles in A is defined as the ratio between the distance traveled by all the vehicles in A by the area of A. Both quantities can be computed for each vehicle whose trajectory intersects A, using the definition represented in Figure 8.
Using this definition of a density measurement, it is possible to build a matrix of density measurements D containing the densities associated with a space-time discretization of the domain on which the trajectories lie.Indeed, we discretize this domain into a grid composed of N x cells in the space dimension and N t cells in the time dimension (see Figure 9).Then, D is built as the matrix of size N t × N x for which the (i, j)-th entry, denoted by D i j , is the estimated density of the (i, j)-th grid cell, as obtained by applying Edie's definition on the space-time region defined by the cell.
The resulting densities D i j are assimilated to a ratio between some kind of continuous count of vehicles (given by the ratio between the total time spent by all vehicles the region A and the time width of A) and the size of the road cells.As such, they can be considered as approximations of the cell average ρ i j of the density function ρ, which is expressed as where (t i , x j ) are the coordinates of the center the (i, j)-th cell of the grid introduced above.The right hand side of this last equality links the cell averages of the normalized density u to the density data D i j : indeed, dividing both sides of this equation by ρ m yields that the cell average U i j of the normalized density is approximated by the ratio D i j /ρ m .4.2.2.Constant parameter case.We test our approach for parameter identification (and density estimation) on real-world data.We consider in particular two density matrices, both obtained from the same trajectory data, using the approach presented in Section 4.2.1.We work here with trajectory data extracted from the highD dataset, which comes from video recordings along sections of German highways [15].We consider a particular section with length of about 400 m, which we discretize into 11 road cells.Based on this, we build two density matrices, which we call Dataset 1 and Dataset 2, corresponding to observations of the section over time-lapses of 2 min taken at different times, so that Dataset 1 reflects free flow conditions only, and Dataset 2 reflects a transition between free flow conditions and a congested state.The time step used to build these density matrices is ∆t = 2 s.The resulting density matrices have N t = 60 rows and N x = 11 columns and can be observed in Figure 10.Finally we estimate the maximal density of the considered road by dividing the number of lanes by the mean length of the observed vehicles, which gives ρ m ≈ 0.49 m −1 .For each density matrix, we compute the parameter and density estimate using the TRM scheme with the following discretization choice: the space cells are subdivided into P x = 3 subcells and the number of time subdivisions P t is taken to be the smallest integer so that the CFL condition ( 27) is satisfied for some rough estimate of the maximal speed v m = 130 km • h −1 , thus giving P t = 15.Once again, the first and last columns as well as the first row of the density matrix are used as boundary and initial conditions for the finite volume recurrences.Then, three cases are considered: either the whole density matrix is used and hence the cost function (30) with I c = {1, . . ., 9} is minimized, or half of the columns are used and hence the cost function ( 30) is minimized but with I c = {2, 4, 6, 8}, or only one column is used and hence the cost function (30) is minimized with The results of these estimations are represented in Figure 11 for Dataset 1 and in Figure 12 for Dataset 2. In both cases we can once again notice the robustness of the estimation since removing some columns from the dataset does not affect significantly the value of the estimated parameter or the RMSE of the estimated densities.Besides, one can note that TRM seems to smooth the true evolution of the densities.When comparing the results obtained for both datasets, the RMSE for Dataset 1 is significantly lower than that of Dataset 2, which can be explained by comparing visually the estimated densities in both cases.
For Dataset 1, the TRM was able to recreate the linear trends of density values appearing in the dataset and that are characteristic of free flow conditions: indeed, in this case, the vehicles are able to travel freely across the road and hence the vehicles can transfer from one cell to the next undisturbed.Therefore, modeling this vehicle transfer with a unique and constant reaction rate, as the TRM does, seems appropriate.For Dataset 2, however, congestion appears in the dataset and hence there is a change in the conditions with which vehicles can transfer from one cell to the other.A single reaction rate becomes now a more controversial choice, which is confirmed by the fact that the estimated densities do not depict the same congestion as in the data.
Another way to understand the difference of approximation quality between both datasets is to compare their fundamental diagrams.A fundamental diagram is a scatter-plot representing density measurements against flux    measurements done at the same time and space locations.In our case, flux measurements associated to our datasets can be computed from the trajectory data using once gain the approach in Section 4.2.1.As for the flux "measurements" associated with the estimated densities, we use the quadratic flux-density relationship (2) assumed by the LWR model, and plug in the estimated parameter v * m .The resulting fundamental diagrams are shown in Figure 13.For Dataset 1, the true fundamental diagram looks quite linear, as expected for free flow conditions, and the quadratic flux of the estimation process then yields an adequate approximation.However, for Dataset 2, the quadratic flux fails to give a good approximation of the true fundamental diagram, which now shows a mix of linear trend and more diffuse point pattern.In order to improve these estimations, we propose to offer more flexibility to the models by adding new (and physically meaningful) parameters.This is the purpose of the next section.4.2.3.Varying parameter case.Starting from the two datasets introduced in Section 4.2.2, we use the same least-square minimization approach to derive the values of the now varying parameter v m .We consider three cases: • the parameter v m is time-dependent only, meaning that the scaling parameters of the finite volume recurrence satisfy that for any n ∈ [[0, N t − 1]], there exists C n ∈ (0, 1/2) such that for any j ∈ [[0, N x ]], C n j = C n .Hence, the actual number of parameters to be estimated in this case is N t .• the parameter v m is space-dependent only, meaning that the scaling parameters of the finite volume recurrence satisfy that for any j ∈ [[0, N x ]], there exists C n ∈ (0, 1/2) such that for any n ∈ [[0, N t − 1]], C n j = C j .Hence, the actual number of parameters to be estimated in this case is N x .• the parameter v m is space-time-dependent, and hence, the actual number of parameters to be estimated in this case is (N x + 1)N t .The estimations are carried out while considering half of the columns of the density matrices (hence I c = {2, 4, 6, 8}) and the parameter λ are set so that the overall RMSE between the estimated densities and the    whole density matrix is minimized.A TRM with 3 space subdivisions (and 15 time subdivisions) is used as a finite volume scheme, which is the scheme used for the robustness study in the constant case (cf.Section 4.2.2, results in Figures 11 and 12).The results are presented in Figure 14 for the time-dependent case, Figure 15 for the space-dependent case and Figure 16 for the space-time-dependent case.
Considering first the results for Dataset 1 (free flow conditions), we can see that the varying parameters estimated in each case stay close and vary around the value estimated under the assumption that the parameter is constant.This is coherent with the conclusions drawn in Section 4.2.2: in free flow conditions, the LWR model with a constant parameter is an adequate choice of model.Comparing now the RMSE of the estimated densities, we see that the time-dependent and space-dependent parameters yield very similar values and density profiles as in the constant case (cf. Figure 11).However, a significant decrease of the RMSE is observed when a space-time-dependent parameter is considered.Hence, adding small perturbations of the parameters in space and time seems to yield more realistic density profiles and in particular the small scale variations of the density that are not observed in the constant case (due to the smoothness of the estimation).Considering now the results for Dataset 2 (free flow and congested conditions), we can see that the varying parameters estimated in each case do not stick around the value estimated in the constant case anymore.
In the time-dependent case, we observe two regimes.The first regime spans until t = 1100 s, and has the parameter varying around and close to the parameter estimated in the constant case, thus hinting at free flow conditions.The second regime starts at t = 1100 s and has the parameter displaying sharp variations between very low and very large values: such behavior can be interpreted as the model trying to accommodate the congested conditions by intermittently stopping or letting all the vehicles go in order to create congested cells.In the space-dependent case, the estimated densities globally decrease across space: this can be seen as an attempt from the model to create congestion by having cells with higher transfer rates upstream (which will tend to let vehicles flow easily), and then gradually decreasing these rates as we go down the road, so that vehicles can accumulate downstream.In both these cases however, the resulting RMSE of the estimated densities is lower but still of the same order as the one from the constant case.
In the space-time-dependent case, the estimated parameters at all locations show the same trend: they start close to the value estimated in the constant case and after some time globally decrease with time.Besides, this drop in parameter value occurs at increasing times as we go from the right-most cell to the left-most cell.Hence, the model seems to account for congestion by gradually reducing the transfer rates between the compartments, going from right to left.In this case, the resulting RMSE of the estimated densities is significantly reduced compared to the constant case and the estimated densities display a realistic profile, which also recreates the congestion observed in the data.
Note that, following the link established between the reaction rates and the parameters of the continuous traffic flow models, the gradual decrease of reaction rates observed for Dataset 2 in the time-dependent and spacetime-dependent cases can be interpreted as a gradual drop in road capacity.This observation is corroborated by looking at the actual trajectories corresponding to this dataset and shown in Figure 17.Indeed, overtaking between vehicles can be observed from trajectory crossings.These overtakings mechanically decrease the overall capacity of the road as less lanes are free.As on can see, these overtaking happen more and more frequently as time passes, and start to appear downhill on the road.The same observations were made when looking at the space-time dependent reaction rates.
Finally, we compare the three choices of parametrizations considered in this section in terms of their ability to recreate a fundamental diagram similar to the one associated with the density data.In particular, flux estimates can be derived from the density estimates by once again applying the quadratic flux-density relation (2), but using now the varying parameter v m : to compute the flux estimate of the j-th cell at time t n , v m is taken as the  average of the parameter estimates at both boundaries of the j-th cell, at time t n .We obtain the fundamental diagrams shown in Figure 18.The time-dependent estimates show for both datasets a fundamental diagram which is more scattered than the one from the data, and yield higher RMSE than in the constant case.On the other end, the space-dependent estimates produce fundamental diagrams that are similar to the one obtained in the constant case, but with slightly more dispersion.In both cases however, the fundamental diagrams consist in superposition of quadratic functions and seem to fail to reproduce the scattering observed in Dataset 2 (and due to congested conditions).This goal is however achieved with the space-time-dependent estimates which yield fundamental diagrams that nicely overlap the ones from the data, and significantly lower RMSE compared to the constant case.
In conclusion, the recourse to space-time dependent parameters provides more flexibility to the LWR model in a physically sound manner, thus allowing it to recreate real-word density and fundamental diagrams: • On the one hand, allowing the reaction rates between compartments in the TRM to vary in space and time locally creates conditions that give rise to congestion or sharp changes in the density.• On the other hand, realistic fundamental diagrams are obtained even though a quadratic relation between flux and density is assumed, by allowing the shape of the relation to change over space and time.Hence, the change of behavior in the fundamental diagram usually interpreted as a capacity drop now becomes a transfer rate drop.Besides, complex point patterns in the diagram can be recreated since in theory each point of the diagram belongs to its own quadratic function.

Conclusion
The main motivation of this work is to assess the validity of a LWR traffic flow model to model measurements obtained from trajectory data, and propose extensions of this model to improve it.We answer these questions by comparing continuous models and measurements using a discrete dynamical system defined from a particular discretization of the PDE of the continuous model.This discretization is formulated as a chemical reaction network where road cells are interpreted as compartments, the transfer of vehicles from one cell to the other is seen as a chemical reaction between adjacent compartment and the density of vehicles is seen as a concentration of reactant.Several degrees of flexibility on the parameters of this system, which basically consist of the reaction rates between the compartments, are considered: These rates are taken equal to the same constant value or allowed to depend on time and/or space.We then interpret generalized density measurements coming from trajectory data as observations of the states of the discrete dynamical system at consecutive times, and derive optimal reaction rates for the system by minimizing the discrepancy between the output of the system and the state measurements.
The use of constant reaction rates proves to be enough to reproduce the patterns observed in the density and flux data in free flow conditions but not in mixed conditions where congestion appears.This motivates us to recommend the use of the more flexible models, and in particular the model with space-time dependent reaction rates.This last model proved to perform well both in free flow and mixed conditions as it mimicked the patterns observed in the density data as well as the fundamental diagrams.Recall that the discrete dynamical system can be seen as a particular finite volume discretization of the LWR model with the flux of vehicles depending quadratically on the density.The reaction rates of the system then simply set the shape of this relation (meaning here the maximal value of the flux function).Our numerical experiments hence showed that allowing the shape of this quadratic relation to vary through time, space or even better both, allowed the LWR model to better recreate specific patterns observed in real-world data, such as the appearance of congestion (compared to when a fixed shape is considered).
Direct extensions of the approach presented in this paper are possible.On the one hand, working on networks would be straightforward since the proposed kinetic system can be generalized to this setting by simply dropping the assumptions that the compartments are ordered as chain (which makes sense for a single road) and allowing them to be linked to more than 2 other compartments (thus mimicking the junctions of the network).On the other hand, the use of conventional detector data could be considered, since it would simply come down to the assumption that measurements are only available in some compartments (those where sensors are located), similarly as what was assumed in the robustness tests done in Section 4.1.Finally, a link between the proposed discrete dynamical system and artificial neural networks (ANN) was not exploited in this paper but paves the way to exciting outlooks with Jac H i ( U i ) ∈ R Nx×Nx being the Jacobian matrix of the mapping U i → H i ( U i , C ; U ) and Jac H i (C) ∈ R Nx×N C being the Jacobian matrix of the mapping C → H i ( U i , C ; U ).
Proof.Applying the chain rule to (25) yields exactly (34).Then, applying the chain rule to (20) gives the recurrence relation in (35).The fact that Jac U 0 (C) = 0 follows from the fact that U 0 does not depend on C (but is defined in (17) using the data U ).
The explicit expression of the Jacobian matrices Jac H i ( U i ) and Jac H i (C) in Proposition C.1 depends on the choice of the numerical scheme to compute the approximations in U .This scheme should only involve smooth functions as assumed at the beginning of this section.This is in particular the case for the TRM and Lax-Friedrichs scheme, and the corresponding Jacobian matrices are given in Appendix D.1.
Using these expressions, Algorithm 1 provides a first way to compute the gradient vector (34).This algorithm can be referred to as a Forward-Propagation algorithm: we visit each "time" i sequentially from 0 to the final time to compute the gradient.The finite volume approximations U 1 , . . ., U Nt−1 are computed on-the-fly, thus saving some storage space.On the other hand, note that each iteration requires matrix-matrix multiplications.Even though the Jacobian matrices involved in these products are sparse, the stored matrix G will fill up as i grows, rendering the computational and storage costs of each iteration more and more expensive.This could become cumbersome in some applications where the size of this matrix, which is N t × N x , is large.
Inspired by the theory around the fitting of neural networks we propose a Back-Propagation algorithm which allows us to compute this same gradient while only requiring matrix-vector products, thus keeping the computational and storage costs in check.This algorithm is based on the next result.
Corollary C.2 provides an alternative expression for computing the gradient function, which in turn yields Algorithm 2. This last algorithm can be referred to as a Back-Propagation algorithm: we visit each "time" i sequentially from the latest to the initial time to compute the gradient.Consequently, it is no longer possible to compute the density vectors on-the-fly: they must be computed and stored beforehand.Once this is done, each iteration of Algorithm 2 requires the same computational and storage costs, those associated with products between some sparse matrices and vectors.Hence, these costs are much less influenced by the size of the problem, assuming that there is enough storage space for the density vectors.

Figure 2 .
Figure 2. Representation of the Traffic Reaction Model interpretation of traffic flow.

Figure 3 .
Figure 3. Space and time subdivisions of the multilevel approach.The discretization grid on which the data are defined (left, in black) is subdivided in space (each cell is subdivided into P x = 4 subcells) and in time (P t − 1 = 2 intermediate time steps are added between each consecutive time steps of the initial discretization).The resulting grid (right, in grey) is used to compute the finite volume density approximations.

Figure 4 .
Figure 4. Initial condition and associated solution of the PDE used in the synthetic case.

Figure 5 .
Figure 5. Density matrices obtained after various choices of discretizations (into N x cells in space and N t steps in time) of the PDE solution.

N
(a) TRM: No Space subdivision

Figure 6 .
Figure 6.Estimated densities from data (a) discretized into 11 space cells and 51 time steps, using the TRM (b) and LxF (c) schemes with 5 subdivisions.

Figure 7 .
Figure 7.Estimated densities from data (a) discretized into 51 space cells and 51 time steps, using the TRM (b) and LxF (c) schemes with 5 subdivisions.

Figure 8 .
Figure 8. Quantities used in Edie's generalized definition of density and flow.

Figure 9 .
Figure 9. Space-time discretization grid used to compute the density matrix from Edie's definition, which is applied to each cell of the grid.

Figure 10 .
Figure 10.Representation of the two datasets used in the real-data case.

Figure 11 .
Figure 11.Estimated densities using different subsets of the Dataset 1 (and the TRM), and associated estimated parameter v m and RMSE.The blue arrows point to the columns used for the boundary conditions and the green arrows to the ones used in the minimization problem.

Figure 12 .
Figure 12.Estimated densities using different subsets of the Dataset 2 (and the TRM), and associated estimated parameter v m and RMSE.The blue arrows point to the columns used for the boundary conditions and the green arrows to the ones used in the minimization problem.

Figure 13 .
Figure 13.Comparison between the fundamental diagram of the two datasets and their estimations through the TRM.

Figure 14 .
Figure 14.Estimated densities and parameters for each dataset when time dependent parameters are considered.The plots (c) and (f) represent the evolution through time of the estimated parameter.The blue line represents the estimated parameter in the constant case.

Figure 15 .
Figure 15.Estimated densities and parameters for each dataset when space dependent parameters are considered.The plots (c) and (f) represent the evolution in space of the estimated parameter.The blue line represents the estimated parameter in the constant case.

Figure 16 .
Figure 16.Estimated densities and parameters for each dataset when space-time dependent parameters are considered.The plots (c) and (f) represent, for each location, the evolution through time of the estimated parameter.The blue line represents the estimated parameter in the constant case.

Figure 17 .
Figure 17.Trajectories of Dataset 2. Each line corresponds to the trajectory of a given vehicle, the line color is linked to the length of the vehicle.

Figure 18 .
Figure 18.Comparison between the fundamental diagram of the two datasets and their estimations through the TRM with time-dependent, space-dependent and space-time dependent parameters.

Table 1 .
Relative error |v m − v * m |/v m on the parameter estimation for various choices of discretization steps and schemes, in case where all data is used.

Table 2 .
RMSE between the density data U and the approximated densities U * for various choices of discretization steps and schemes, in case where all data is used.

Table 3 .
Relative error |v m − v * m |/v m on the parameter estimation for various choices of discretization steps and schemes, in case where only the center road cell is observed through time.