---
abstract: 'This paper is concerned with highway traffic estimation using traffic sensing data, in a Lagrangian-based modeling framework.  We consider the Lighthill-Whitham-Richards (LWR) model [@LW; @Richards] in Lagrangian-coordinates, and provide rigorous mathematical results regarding the equivalence of viscosity solutions to the Hamilton-Jacobi equations in Eulerian and Lagrangian coordinates.  We derive closed-form solutions to the Lagrangian-based Hamilton-Jacobi equation using the Lax-Hopf formula [@HJDaganzo; @ABSP], and discuss issues of fusing traffic data of various types into the Lagrangian-based H-J equation.  A numerical study of the [*Mobile Century*]{} field experiment [@MC] demonstrates the unique modeling features and insights provided by the Lagrangian-based approach.' 
author:
- |
    Ke Han$^{a}\thanks{Corresponding author, e-mail: kxh323@psu.edu}$ Tao Yao$^{b}\thanks{e-mail: tyy1@engr.psu.edu}$ Terry L. Friesz$^{b}\thanks{e-mail: tfriesz@psu.edu}$\
    \
    $^{a}$*Department of Mathematics*\
    *Pennsylvania State University, University Park, PA 16802, USA*\
    $^{b}$*Department of Industrial and Manufacturing Engineering*\
    *Pennsylvania State University, University Park, PA 16802, USA*
title: |
    Lagrangian-based Hydrodynamic Model:\
    Freeway Traffic Estimation
---

Introduction
============

General background
------------------

Highway traffic estimation and prediction are of pivotal importance for traffic operation and management.  From an estimation perspective, it is desirable to have a substantial amount of information available.  This has been made possible by emerging technology in fixed and mobile sensing and by the advancement of cyber-physical infrastructure, see [@MC] for a specific discussion.  Depending on the characteristics of sensing devices and the underlying modeling framework, traffic sensing can be categorized as Eulerian sensing (such as using loop detector, virtual tripwire, and video camera) and Lagrangian sensing (such as using GPS and smart phone). 

This paper is concerned with using the Lighthill-Whitham-Richards model to estimate traffic states, subject to constraints imposed by sensing data that are large in quantity, and high in dimension.  The LWR model is described by a [*partial differential equation*]{} (PDE), more specifically, by a [*scalar conservation law*]{} (SCL).  For general mathematical background on SCL, the reader is referred to [@Bbook].  The LWR SCL is closely related to a Hamilton-Jacobi equation, via the Moskowitz function [@Moskowitz], also known as the Newell curve [@Newell].  It is shown in [@Evans] that a weak entropy solution to the LWR SCL leads to the viscosity solution of the corresponding H-J equation; and vise versa. 

Viability theory and Lax-Hopf formula
-------------------------------------

From a PDE perspective, additional information on the traffic stream provided by sensors imposes multiple initial/boundary and/or internal boundary conditions that may lead to non-existence of a well-defined solution, namely, entropy solution to the scalar conservation law; or viscosity solution to the H-J equation.  Recently, [@ABSP] extended the viscosity solution of H-J equations to a solution class known as the Barron-Jensen/Frankowska solutions [@BJ; @Frankowska].  The generalized solution, called viability episolution [@Aubin], is lower semi-continuous, and satisfies the initial/boundary and/or internal boundary conditions in an inequality sense.  Such a relaxation, while excluding some nice mathematical properties of the solution, does allow the PDE to incorporate multiple value conditions and produce solutions that are well-informed of traffic states transmitted by the sensors.  Based on this idea, a sequence of seminal papers, [@CC1; @CC2; @Convex] were created, which performed highway traffic estimation as well as data assimilation and inverse modeling. 

The LWR model in Lagrangian coordinate
--------------------------------------

The LWR model is commonly formulated as a scalar conservation law in [*Eulerian coordinate*]{} (EC), i.e. with independent variables $t$ (time) and $x$ (location).  A list of selected references in this line of research includes [@BH; @BH1; @CC1; @CC2; @HJDaganzo; @HJDaganzo2; @LWRDUE; @Newell].  Another way of formulating the traffic dynamic is through [*Lagrangian coordinate*]{} (LC), which identifies $t$ (time) and $n$ (vehicle label).  In contrast to EC, LC describes time evolution of traffic quantities associated with a moving vehicle.  Such a framework was initially introduced by [@CF] in the context of gas dynamics.  LC was introduced to traffic flow modeling by [@HJDaganzo2], and subsequently studied by [@Leclercq] and [@Yuan].  A more detailed review of the LWR model in both EC and LC is presented later in Section \[LWREL\]. 

The LWR PDE in LC can be derived from the Eulerian-based PDE; and vise versa.  This procedure was given an intuitive illustration in [@HJDaganzo2], provided that all quantities of interest were continuously differentiable.  In [@Leclercq], the authors related the equivalence of EC- and LC-based PDEs to an earlier work [@Wagner] on gas dynamics.  However, we point out that [@Wagner] studied an Euler equation, which is a system of conservation laws; results regarding such a system do not apply immediately to the scalar conservation law of interest.  In this paper, we provide a rigorous proof of the equivalence between the two systems, in the context of Hamilton-Jacobi equation and viscosity solutions.  The result will apply to the LWR conservation laws even if the solutions are not continuous, let alone differentiable.  Technical result is presented in Section \[LCequivalence\]. 

As mentioned before, solution to the H-J equation has been extended to treat multiple value conditions, using viability theory [@Aubin].  In this paper, we apply the framework of viability theory to the Lagrangian-based Hamilton-Jacobi equations.  The goal is to explore the unique modeling and computational advantages of the LC in highway traffic estimation.  In particular, using the Lax-Hopf formula, we derive explicit solutions to the LC-based H-J equation with various value conditions including initial/intermediate condition, upstream/downstream boundary condition, internal boundary condition, and a combination of the above.  This is presented in Section \[simplesol\].  As pointed out by recent studies [@Leclercq] and [@Yuan], LC-based conservation law has certain computational advantage over EC-based ones, in the context of Godunov scheme [@Godunov].  Namely, the Godunov scheme reduces to an upwind scheme for LC-based conservation law, since the corresponding fundamental diagram is monotonically increasing.  As we show in this paper, when solved with the Lax-Hopf formula, the LC-based H-J equation also reduces the computational complexity, compared with the EC-based H-J equation.  Finally, we test the framework of Lagrangian-based traffic sensing and estimation with dataset obtained from the Mobile Century field experiment [@MC].  The Lagrangian-based approach provides traffic information associated with each moving vehicle, such as trajectory and speed.  Such information are relatively difficult to obtain from the Eulerian-based approach: one has to perform partial inversion of the Moskowitz function. 

Organization
------------

The rest of this paper is organized as follows.  In Section \[LWREL\], we briefly review the Lighthill-Whitham-Richards model in both Eulerian and Lagrangian coordinates.  A rigorous equivalence result regarding the EC-based and LC-based H-J equations is presented in Section \[LCequivalence\].  Section \[BJF\] introduces the notion of viability episolution and the generalized Lax-Hopf formula.  Data of different sources are discussed and integrated into the Lagrangian PDE.  In section \[simplesol\], we derive explicit solutions to the Lagrangian-based H-J equation, using the Lax-Hopf formula.  In Section \[numerical\], we apply the Lagrangian-based computational paradigm to estimate real-world highway traffic stream. 

The LWR model in transformed coordinates {#LWREL}
========================================

In this section, we review the Lighthill-Whitham-Richards model in both Eulerian and Lagrangian coordinates.  The transformation between these two coordinate systems is made through a function inversion under minor assumption.  In section \[LCequivalence\], rigorous result on the equivalence of the two systems is provided, using Hamilton-Jacobi equation and the notion of viscosity solution. 

The LWR model in Eulerian coordinates {#LCEulerian}
-------------------------------------

The classical LWR PDE reads \_t(t,x)+ f\_x((t,x)) = 0(t,x)\[0,+)where the subscripts denote partial derivative.  The scalar conservation law above describes the temporal-spatial evolution of average vehicle density $\rho(t,\,x)$ and average vehicle flow $f\big(\rho(t,\,x)\big)$. The density-flow relation is articulated by the [*fundamental diagram*]{} $f(\cdot)$ f() = v()where $\rho_{max}$ is jam density.  The average vehicle speed $v(\rho)\in[0,\,v_{max}]$ is a decreasing function of density; $v_{max}$ denotes the free flow speed.  The fundamental diagram is assumed to be concave with maximum $M$ attained at $\rho^*$, where $M$ is the flow capacity. 

We introduce the Moskowitz function $N(\cdot\,,\,\cdot)$, also know as the Newell-curve, such that N\_t(t,x) = f((t,x)),N\_x(t,x) = -(t,x) Hereafter, “a.e."  stands for “almost everywhere".  $N(t,\,x)$ measures the cumulative number of vehicles that have passed location $x$ by time $t$. It has been shown in a number of circumstances that if $\rho(t,\,x)$ is the weak entropy solution to (\[LWRE\]), then the corresponding Moskowitz function is the viscosity solution to the following Hamilton-Jacobi equation N\_t(t,x)-f(- N\_x(t,x)) = 0

Note that viscosity solution to (\[HJE\]) must be Lipschitz continuous, but not necessarily continuously differentiable due to the presence of shock waves in $\rho(t,\,x)$. There exists, however, more general solution classes such as the viability episolution [@ABSP], which is lower semi-continuous. 

The LWR model in Lagrangian coordinates  {#LCLagrangian}
----------------------------------------

In Lagrangian coordinate system, a free variable $n$ is used to identify a particular vehicle.  Note that in a continuum model, $n$ is treated as a real number.  The coordinate transformation from $(t,\,x)$ to $(t,\,n)$ is made by inverting the following Moskowitz function n = N(t,x) Throughout this article, we assume that the vehicle density is uniformly positive, i.e. there exists $\delta>0$ such that $$\label{reveqn1}
\rho(t,\,x)~\geq~\delta\qquad\forall~(t,\,x)\in[0,\,+\infty)\times[0,\,L]$$ This assumption is not restrictive given the argument that if the density vanishes in certain road segments, then the domain of study can be separated into several subdomains, with each one satisfying (\[reveqn1\]). 

For each $t$ fixed, (\[reveqn1\]) implies that $N(t,\,\cdot)$ is a strictly decreasing function of $x$, whose inverse is denoted by $X(t,\,\cdot)$. We have x = X(t,n) where $X(t,\,n)$ represents the location of vehicle labeled $n$ at time $t$. Identities (\[N\]) and (\[X\]) define the coordinate transformation.  We have the following X\_t(t,n) = v(t,n),X\_n(t,n) = -s(t,n) where $v(t,\,n)$ and $s(t,\,n)$ denote the average speed and spacing around vehicle $n$ at time $t$, respectively.  Introducing the spacing-velocity relationship v = (s)  f([1s]{})sswe present the Hamilton-Jacobi equation in Lagrangian coordinate X\_t(t,n)-(- X\_n(t,n)) = 0

Equivalence between (\[HJE\]) and (\[HJnt\]) {#LCequivalence}
--------------------------------------------

In this section, we provide rigorous mathematical analysis on the relationship between the two H-J equations in EC and in LC.  Our strategy is to show that if $N(t,\,x)$ is the viscosity solution to (\[HJE\]), then its partial inverse as defined by (\[N\]) and (\[X\]), is the viscosity to (\[HJnt\]).  The converse will hold similarly.  We begin with the definition of viscosity solution to Hamilton-Jacobi equation of the form u\_t+H(u) = 0 where the unknown $u(t,\,x)\in\R^m$; $\nabla u$ is the gradient of u with respect to $x$. In what follows, $C$, $C^1$ denotes the set of continuous and continuously differentiable functions, respectively. 

\[visdef\] A function $u\in C(\Omega)$ is a viscosity subsolution of (\[HJgeneral\]) if, for every $C^1$ function $\varphi=\varphi(t,\,x)$ such that $u-\varphi$ has a local maximum at $(t,\,x)$, there holds \_t(t,x)+H()  0 Similarly, $u\in C(\Omega)$ is a viscosity supersolution of (\[HJgeneral\]) if, for every $C^1$ function $\varphi=\varphi(t,\,x)$ such that $u-\varphi$ has a local minimum at $(t,\,x)$, there holds \_t(t,x)+H()  0 We say that $u$ is a viscosity solution of (\[HJgeneral\]) if it is both a supersolution and a subsolution in the viscosity sense. 

If $u$ is a $C^1(\Omega)$ function and satisfies (\[HJgeneral\]) at every $x\in\Omega$, then $u$ is also a solution in the viscosity sense.  Conversely, if $u$ is a viscosity solution, then the equality must hold at every point $x$ where $u$ is differentiable.  In particular, if $u$ is Lipschitz continuous, then it is almost everywhere differentiable, hence (\[HJgeneral\]) holds almost everywhere in $\Omega$.

The next theorem establishes the equivalence between viscosity solutions to (\[eqn1\]) and (\[eqn2\]), where $f(\cdot)$ and $\psi(\cdot)$ satisfy (\[psidef\]).  N\_t(t,x)-f(-N\_x(t,x)) = 0 X\_t(t,n)-(-X\_n(t,n)) = 0

\[viscositythm\] Assume that $N(t,\,x), \, (t,\,x)\in\Omega\subset (-\infty,\,+\infty)\times\R^n$, is a viscosity solution to (\[eqn1\]), furthermore, assume that the density is uniformly positive, i.e. $\rho(t,\,x)\geq \delta>0,\,\forall (t,\,x)\in\Omega$. Then function $X(t,\,\cdot)$ obtained by inverting $N(t,\,\cdot)$ is a viscosity solution to (\[eqn2\]). 

By assumption, $N(t,\,\cdot)$ is strictly decreasing with $$\delta\,|x_1-x_2|~\leq~|N(t,\,x_1)-N(t,\,x_2)|~\leq~\rho_{max}\,|x_1-x_2|\qquad\forall ~x_1,\,x_2$$ then $X(t,\,\cdot)$ is also strictly decreasing with 1/\_[max]{}|n\_1-n\_2|  |X(t,n\_1)-X(t,n\_2)|  1/|n\_1-n\_2| n\_1,n\_2 We start by showing that $X(\cdot,\,\cdot)$ is a subsolution.  Indeed, given any $C^1$ function $Y=Y(t,\,x)$ such that $X-Y$ has a local maximum at $(t_0,\,n_0)$, without loss of generality, we assume $X(t_0,\,n_0)-Y(t_0,\,n_0)=0$, take the plane $t=t_0$ (see Figure \[mathproof\]). 

![ Graphs of $X(t_0,\,\cdot)$ and $Y(t_0,\,\cdot)$[]{data-label="mathproof"}](viscosity.pdf){width="45.00000%"}

Since $X-Y$ attains a local maximum at $(t_0,\,n_0)$, by (\[twoside\]) there must hold $Y_n(t_0,\,n_0) <0$. By continuity, there exists a neighborhood $\Omega_1$ of $(t_0,\,n_0)$ such that $ Y_n(t,\,n)<0,~~\forall (t,\,n)\in\Omega_1$. Then, we may define $M(t,\,\cdot)$ to be the inverse of $Y(t,\,\cdot)$ in $\Omega_1$. Obviously, $M(t,\,n)\in C^1(\Omega_1)$, and $N-M$ attains a local maximum at $\big(t_0,\,X(t_0,\,n_0)\big)$. Using the fact that $N(t,\,x)$ is a viscosity solution and applying (\[subsol\]), we deduce M\_t(t,x)  f(-M\_x(t,x)) Differentiating with respect to $t$ the identity $Y\big(t,\, M(t,\,x)\big)=x$, and using (\[a\]), we have 0 = Y\_t + Y\_nM\_t  Y\_t+Y\_nf(-M\_x) = Y\_t+Y\_nf(-[1Y\_n]{})  = Y\_t-(-Y\_n) In the above deduction, we have used the fact that $M(t,\,\cdot)$ and $Y(t,\,\cdot)$ are both $C^1$, and are inverse of each other.  Therefore, differentiating $n=M\big(t,\,Y(t,\,n)\big)$ w.r.t.  $n$ yields $1=M_x\cdot Y_n$.

Since $Y$ is arbitrary, (\[b\]) implies that $X(t,\,n)$ is a subsolution.  The case for supersolution is completely similar. 

Similar proof can be used to show the converse: given a viscosity solution $X(\cdot,\,\cdot)$ to (\[eqn2\]), $N(t,\,\cdot)$ obtained by inverting $X(t,\,\cdot)$ is a viscosity solution to (\[eqn1\]). 

Numerical algorithm and value conditions {#BJF}
========================================

In this section, we focus on the numerical scheme for the Hamilton-Jacobi equation \_t X(t,n)-(-\_n X(t,n)) = 0 in the presence of initial, boundary and internal boundary conditions.  In order to avoid the issue of non-existence of solution, we adapt the notion of viability episolution [@ABSP], and proceed with a variational method known as the Lax-Hopf formula [@ABSP; @CC1; @CC2]. 

Viability episolution to the Hamilton-Jacobi equation (\[HJeqn\]) {#LCviability}
-----------------------------------------------------------------

We consider a domain $[0,\,T]\times[N_1,\,N_2]$ for equation (\[HJeqn\]), where $T>0$ and $N_2> N_1> 0$. In the following definition, we make precise what we mean by value conditions, concerning (\[HJeqn\]). 

A value condition $\C(\cdot,\,\cdot): \Omega\subset [0,\,T]\times[N_1,\,N_2]\rightarrow \mathbb{R}$ is a lower-semicontinuous function. 

One may extend a value condition $\mathcal{C}(\cdot,\,\cdot)$ to the entire domain by assigning $\mathcal{C}(t,\,n)=+\infty$ whenever $(t,\,n)\notin \Omega$. Such a convention allows one to compare and manipulate value conditions with different domains.  In order to articulate the Lax-Hopf formula, we introduce the concave transformation $\psi^*(\cdot)$ of the Hamiltonian $\psi(\cdot)$ $$\psi^*(p)~\doteq~\sup_{s\in[1/\rho_{max},\,+\infty)}\Big\{\psi(s)-p\,s\Big\}$$ The following Lax-Hopf formula provides semi-analytical representation of viability solution, given a value condition. 

The viability episolution to (\[HJeqn\]) associated with value condition $\mathcal{C}(\cdot,\,\cdot)$ is given by X\_(t,n) = \_[(u,T)(\^\*)\_+]{}((t-T,x+Tu)+T\^\*(u))

See [@ABSP]

We indicate, by a subscript, dependence of the viability solution on its value condition.  So that the solution to (\[HJeqn\]) reads $X_{\mathcal{C}}(t,\,n)$. As a consequence of formula (\[Lax\]) the following property of [*inf-morphism*]{} holds. 

\[infmorphism\][**(inf-morphism property)**]{} Let $\mathcal{C}(\cdot,\,\cdot)$ be the point wise minimum of finitely many value conditions, $$\mathcal{C}(t,\,n)~\doteq~\min_{i=1,\ldots,m}\mathcal{C}_i(t,\,n)\qquad \forall~~ (t,\,n)\in[0,\,T]\times[N_1,\,N_2]$$ Then X\_(t,n) = \_[i=1,…, m]{}X\_[\_i]{}(t,n)

The inf-morphism property enables the H-J equation to incorporate one or more value conditions; it can also decompose a complex problem involving multiple value conditions into smaller subproblems, each one with a single condition. 

Value conditions for continuous solutions {#conditions}
-----------------------------------------

The value conditions described in the previous section can be viewed as the mathematical abstraction of real-world measurements, obtained from Eulerian and Lagrangian sensing. [ @CC1; @CC2] have utilized the H-J equation in Eulerian coordinates to incorporate sensing data.  In the rest of this paper, we not only extend their framework to Lagrangian coordinates, but also establish sufficient condition that guarantees the equivalence between these two systems, in the presence of a single value condition. 

Consider again the two H-J equations (\[eqn1\]) and (\[eqn2\]) in EC and LC.  We make two assumptions on the value condition $\mathcal{C}$, as follows

[**(A1)**]{} The domain of $\mathcal{C}$ is a continuous curve parametrized by $\tau\in[\tau_{min},\,\tau_{max}]$: $$\begin{aligned}
\hbox{Dom}(\mathcal{C})\subset [0,\,T]\times[N_1,\,N_2]\qquad &\Big(\hbox{respectively}~~  [0,\,T]\times[X_1,\,X_2]\Big)
\\
\hbox{Dom}(\mathcal{C})~=~\big(t(\tau),\,n(\tau)\big)\qquad &\Big(\hbox{respectively} ~~\big(t(\tau),\, x(\tau)\big)\Big)
\\
&\tau\in[\tau_{min},\,\tau_{max}]\end{aligned}$$

[**(A2)**]{} $\mathcal{C}\big(t(\cdot),\,n(\cdot)\big)$ is a continuous function on $[\tau_{min},\,\tau_{max}]$.

Given an arbitrary continuous value condition $\mathcal{C}(\cdot,\,\cdot)$ in the Eulerian domain (e.g. measurement of a loop detector), we need to determine how to fuse such datum into the Lagrangian based PDE.  The next proposition provides an answer. 

\[sufficient\] [**(Sufficient condition for equivalence of value conditions)**]{}

Let $\mathcal{C}^E\big(t(\tau),\,x(\tau)\big)$ and $\mathcal{C}^L(t(\tau),\,n(\tau)),\,\tau\in[\tau_{min},\,\tau_{max}]$ be two value conditions for (\[eqn1\]) and (\[eqn2\]), respectively.  Then the solutions to (\[eqn1\]) and (\[eqn2\]) satisfying each value condition in the equality sense are equivalent if $$n(\tau)~=~\mathcal{C}^E\big(t(\tau),\,x(\tau)\big),\qquad x(\tau)~=~\mathcal{C}^L\big(t(\tau),\,n(\tau)\big)$$

Let $N_{\mathcal{C}^E}(t,\,x)$ be the solution to (\[eqn1\]) satisfying condition $\mathcal{C}^E$, let $\,X_{\mathcal{C}^L}(t,\,n)$ be the solution to (\[eqn2\]) satisfying condition $\mathcal{C}^L$. For each $t$, since $N_{\mathcal{C}^E}(t,\,\cdot)$ is strictly increasing, we denote its inverse by $N^{-1}_{\mathcal{C}^E}(t,\,\cdot)$. Then by Theorem \[viscositythm\], $N^{-1}_{\mathcal{C}^E}(\cdot,\,\cdot)$ is a valid solution to the HJ equation (\[eqn2\]). 

On the other hand, for every $\tau\in[\tau_{min},\,\tau_{max}]$ N\^[-1]{}\_[\^E]{}(t(),n()) = N\^[-1]{}\_[\^E]{}(t(),\^E(t(),x())) = N\^[-1]{}\_[\^E]{}(t(), N\_[\^E]{}(t(),x())) = x() (\[123\]) implies that $N^{-1}_{\mathcal{C}^E}(\cdot,\,\cdot)$ satisfies value condition $C^L\big(t(\tau),\,n(\tau)\big)$ and thus is the unique solution to (\[eqn2\]) associated with value condition $\mathcal{C}^L$. We conclude $N^{-1}_{\mathcal{C}^E}(t,\,n)=X_{\mathcal{C}^L}(t,\,n)$.

Proposition \[sufficient\] suggests that, by simply invert the Eulerian (Lagrangian) value condition $\mathcal{C}(t(\tau),\,\cdot)$, one can obtain its dual version in LC (EC).  The dual value condition yields solution that is equivalent to the original solution. 

Explicit solution with piecewise affine value conditions {#simplesol}
========================================================

In this section we apply the Lax-Hopf formula (\[Lax\]) to for an explicit solution in the Lagrangian coordinates.  To that end, we assume that the value conditions are [*piecewise affine*]{} (PWA).  This assumption is justified on the ground of (1) an easily constructible explicit solution representation, with PWA conditions; and (2) standard result on PWA approximation of any piecewise continuous functions or curves. 

Piecewise affine value conditions {#PWAdef}
---------------------------------

We start with articulating piecewise affine value conditions, which includes initial/intermediate, upstream, downstream and internal conditions. 

\[initial\] [**(PWA initial/intermediate condition)**]{}

Set $t=t_0\geq 0$, given real numbers $s_i\geq0,\,n_i,\, i\in\{1,\ldots, m_{ini}\}$, the $j^{th}$ affine component of initial/intermediate condition is \_[ini]{}(t,n) = -s\_jn+d\_j,(t,n){t\_0}To ensure continuity, we require $$d_j~=~s_j\,n_j-\sum_{l=1}^{j-1}(n_{l+1}-n_l),\qquad j~=~2,\ldots, m_{ini}$$

\[upstream\] [**(PWA upstream boundary condition)**]{}

Fix $n=N_1$, given real numbers $v^i\geq 0,\, t^i,\,i\in\{1,\,\ldots,\,m_{up}\}$, the $j^{th}$ affine component of upstream boundary condition is defined as \_[up]{}\^j(t,n) = v\^jt+b\^j,(t,n){N\_1} To ensure continuity of upstream boundary condition, we set $$b^j~=~-v^j\,t^j+\sum_{l=1}^{j-1}(t^{l+1}-t^l)v^l,\qquad j~=~2,\ldots, m_{up}$$

\[downstream\] [**(PWA downstream boundary condition)**]{}

Fix $n=N_2$, given real numbers $v_i\geq 0$, $t_i,\, i\in\{1,\ldots, m_{down}\}$, the $j^{th}$ affine component of downstream boundary condition is defined as \_[down]{}\^j(t,n) = v\_jt+b\_j,(t,n){N\_2} where $$b_j~=~-v_j\,t_j+\sum_{l=1}^{j-1}(t_{l+1}-t_l)v_l,\qquad j~=~1,\ldots, m_{down}$$

\[internal\] [**(Affine internal boundary condition)**]{}

Given real numbers $\alpha,\,\beta, t_{min},\,t_{max},\,n_{min},\,n_{max}, \, r\geq 0$, the affine internal boundary condition is defined as \_[int]{}(t,n) = +(t-t\_[min]{})t,  n=n\_[min]{}+r(t-t\_[min]{})

Recall that the domain of our consideration is $[0,\,T]\times[N_1,\,N_2]$, thus the upstream/downstream boundary conditions refer to (part of) the trajectories of the first and last car within our scope. 

Explicit formulae for viability episolutions {#LCexplicit}
--------------------------------------------

In the presence of piecewise affine (PWA) data, the solution of Lagrangian equation (\[eqn2\]) with a piecewise affine Hamiltonian can be computed explicitly, as given by the Lax-Hopf formula (\[Lax\]).  We denote $s_{min}\doteq 1/\rho_{max},\,s^*\doteq 1/\rho^*$, let $k>0$, define (s) = 

ks,& s\
v\_[max]{},& s\[s\^\*, +)

Notice that this fundamental diagram corresponds to a triangular density-flow relationship.  Moreover, the concave transformation of $\psi(\cdot)$ reads \^\*(u) = s\^\*(k-u)u

\[explicit2\] Given each affine value condition defined in (\[pwaini\])-(\[affinternal\]), and Hamiltonian (\[pwapsi\]), the solution to the Lagrangian Hamilton-Jacobi equation (\[eqn2\]) are respectively

-   Initial/intermediate value problem

    if $s_j~\leq s^*$, X\_[ini]{}\^j(t,n)=

    -s\_jn+d\_j+(t-t\_0)ks\_j,\
    n\_j+k(t-t\_0)nn\_[j+1]{}+k(t-t\_0);\
    \
    -s\_jn\_j+d\_j+(t-t\_0)s\^\*k-s\^\*(n-n\_j),\
    0n-n\_jk(t-t\_0). 

    if $s_j~>s^*$, X\_[ini]{}\^j(t,n)=

    -s\_jn\_[j+1]{}+d\_j+(t-t\_0)s\^\*k-s\^\*(n-n\_[j+1]{}),\
    0n-n\_[j+1]{}k(t-t\_0);\
    \
    -s\_jn+d\_j+v\_[max]{}(t-t\_0),\
    n\_jnn\_[j+1]{}. 

-   Upstream boundary value problem X\_[up]{}\^j(t,n)=

    v\^jt\^[j+1]{}+b\^j+s\^\*(k(t-t\^[j+1]{})-(n-N\_1)),\
    0n-N\_1k(t-t\^[j+1]{});\
    \
    v\^jt+b\^j-(n-N\_1)[v\^jk]{},\
    {0,k(t-t\^[j+1]{})}n-N\_1k(t-t\^j) . 

-   Downstream boundary value problem

    X\_[down]{}\^j(t,x)=v\_jt\_[j+1]{}+b\_j+(t-t\_[j+1]{})v\_[max]{},(t,x)\[t\_[j+1]{},+){N\_2}

-   Internal boundary value problem X\_[int]{}(t,n)=

    +(-t\_[min]{})\
    n-n\_[min]{}r(t-t\_[min]{}),\
    k(t-t\_[max]{}) &lt; n-n\_[max]{},\
    n-n\_[min]{}k(t-t\_[min]{});\
    \
    +[n-n\_[min]{}r]{}+s\^\*k(t-t\_[min]{}-[n-n\_[min]{}r]{})\
    0 n-n\_[min]{} &lt; r(t-t\_[min]{})   nn\_[max]{};\
    \
    +(t\_[max]{}-t\_[min]{})+(t-t\_[max]{})s\^\*k-s\^\*(n-n\_[max]{}),\
    0 n-n\_[max]{}k(t-t\_[max]{});

(\[intsimple\]) is well defined even if $k=r$ and $r=0$.

The proof of Proposition \[explicit2\] is straightforward.  A simple verification reveals that the formulae for upstream, downstream and internal boundary conditions (\[upstreamsimple\])-(\[intsimple\]) can be merged into one, namely (\[intsimple\]).  In other words, the upstream and downstream conditions can be treated as spacial cases of internal boundary conditions.  This is because the wave propagation speed is always non-negative, and any value condition can only affect the solution at region with a larger $n$. This coincides with the intuition that a car cannot be affected by others behind it. 

In order to compute the PDE solution with more complicated value conditions, for example, the one including multiple data, we invoke the inf-morphism property from Proposition \[infmorphism\], and take the point wise minimum over all solutions obtained from (\[inisimple1\]), (\[inisimple2\]) and (\[intsimple\]). 

The Lax-Hopf formula is a grid-free numerical scheme in the sense that the computational procedure does not rely on a two-dimensional grid, as opposed to finite-difference schemes.  In addition, the solution algorithm is highly parallelizable: the problem of fusing multiple value conditions into one PDE can be decomposed into independent sub-problems.  In each sub-problem, the solution can be solved efficiently with formulae (\[inisimple1\])-(\[intsimple\]). 

Numerical Study {#numerical}
===============

In this section, we conduct a numerical case study using traffic data obtained from the Mobile Century field experiment [@MC].  The dataset includes vehicle trajectory data and cumulative passing vehicles measured at different locations along a highway segment.  We utilize a subset of the Mobile Century dataset and fuse them into the Lagrangian Hamilton-Jacobi equation.  The goal is to perform the estimation of Lagrangian quantities such as vehicle trajectories and velocities. 

The Mobile Century field experiment
-----------------------------------

On February 8, 2008, an experiment in the area of traffic monitoring was launched between 9:30 am to 6:30 pm on freeway I-880 near Union City in the San Francisco Bay Area, California.  This experiment involved 100 vehicles carrying GPS-enabled Nokia N95 phones.  The probe vehicles repeatedly drove loops of 6 to 10 miles in length continuously for 8 hours. 

Carried by each probe vehicle, each on-board smart phone stored its position and velocity every 3 to 4 seconds.  In addition to the cell phone data, the experiment also collected data on cumulative passing vehicles at different locations along the highway.  The reader is referred to [@MC] for more details on experimental design and data description. 

Details of the numerical study
------------------------------

The freeway segment of our study is a 3.45 mile stretch of I-880 North Bound, between postmile 23.36, and postmile 26.82.  We utilize two types of data: (i) the cumulative vehicle count, obtained via loop detector station 400536 (postmile 23.36), which counts the number of passing vehicles every 30 seconds; (ii) vehicle trajectories, recorded by on-board smart phones every 3 to 4 seconds.  Our study spanned one hour, from 11:30 am to 12:30 pm, and involved a total traffic volume of approximately 5000 vehicles.  We utilized data sent from 97 probe vehicles, The vehicle trajectories are plotted in Figure \[mobiledata\].  In order to identify the ‘label’ of those probe vehicles, we processed the data on the cumulative vehicle count obtained from Station 400536. 

We assume that the fundamental diagram $\psi(\cdot)$ in (\[eqn2\]) is piecewise affine.  Such a fundamental diagram is calibrated with data collected form the same experiment (detail of the model calibration is omitted for brevity).  The key parameters are estimated as follows.  $$v_{max}~=~31.5~(meter/second),\quad \rho_{max}~=~0.50~(vehicle/meter),\quad \rho^*~=~0.055~(vehicle/meter)$$ The resulting fundamental diagram reads (s) = 

1.95s&2.00 &lt; s &lt; 18.15\
\
31.5&s  18.15

Numerical results
-----------------

We reconstructed the traffic state between postmile 23.36 and 26.82 for a period of one hour, using the numerical method discussed in Section \[simplesol\].  Among the 97 vehicle trajectories, we used 44 of them as training data.  In other words, the viability episolution to equation (\[eqn2\]) was computed with the Lax-Hopf formula and 44 internal boundary conditions.  Notice that the penetration rate of probe vehicles is around $0.88\%$, given the total traffic volume in this one-hour period.  Recall that the on-board smart phone recorded vehicle location every 3 to 4 seconds.  However, in our actual computation, we sampled the vehicle location at a much lower frequency, namely at every 30 to 90 seconds.  As we show later in this section, the numerical performance of the model remains robust under such crude measurements. 

![ Recorded trajectories of 97 probe vehicles.[]{data-label="mobiledata"}](dataplots.pdf){width="70.00000%"}

Figure \[sol7800\] displays the solution of the H-J equation (\[HJeqn\]) based on 8 vehicle trajectories (internal boundary conditions).  It should be noted that the viability episolution satisfies the value conditions only in an inequality sense [@ABSP], that is $$X_{\mathcal{C}}(t,\,n)~\leq~\mathcal{C}(t,\,n),\qquad (t,\,n)\in \hbox{Dom}(\mathcal{C})$$ If the strict inequality holds, the value conditions and the model are said to be incompatible.  The incompatibility is due to either error in measurements or inaccuracy of the model itself.  A class of problems derived from incompatibility, namely data assimilation and data reconciliation, were discussed in [@Convex]. 

![ Solution to the Hamilton-Jacobi equation (\[HJeqn\]) with 8 (internal) boundary conditions.  The solid lines are plots of vehicle trajectories.[]{data-label="sol7800"}](solution1.pdf){width="85.00000%"}

The obtained solution $X(t,\,n)$ describes the time evolution of the location of vehicle labeled $n$. In other words, it can be used to reconstruct vehicle trajectories.  We fixed several values of $n$, and plotted the curves of $X(\cdot,\,n)$. Two examples are shown in Figure \[trajectory1\] and \[trajectory2\].  For comparison purpose, we also included the actual vehicle trajectory reported by the smart phone in the same figure. 

![ Reconstructed and measured trajectories of vehicle \#11266[]{data-label="trajectory2"}](traj2.pdf){width="110.00000%"}

![ Reconstructed and measured trajectories of vehicle \#11266[]{data-label="trajectory2"}](traj1.pdf){width="110.00000%"}

Recall that \_t X(t,n) = (s(t,n)) = v(t,n) By numerically differentiating $X(t,\,n)$ with respect to $t$, one obtains the velocity field $v(t,\,n)$. Figure \[vel\] shows the velocity field involving vehicle labeled 7650 to 7950.  This result was obtained by differentiating the Moskowitz function displayed in Figure \[sol7800\].  From Figure \[vel\], we clearly observe a time-varying congestion level experienced by the drivers: vehicles experience first free flow traffic, then congested traffic, and finally less congested traffic.  This observation is confirmed in Figure \[mobiledata\], where a similar driving condition is shown for all probe vehicles. 

Finally, we performed the task of travel time estimation using the Lagrangian approach.  The travel times were estimated from the vehicle trajectories, which were again obtained by the viability episolution $X(t,\,n)$. In order to examine the accuracy of our estimation, we compared the actual travel times of the 97 probe vehicles with the aforementioned estimated travel times.  The result is summarized in Figure \[error\]. 

![ Vehicle velocity field (in meter/second) obtained from (\[partialt\])[]{data-label="vel"}](velocity.pdf){width="85.00000%"}

![ Error of travel time estimation[]{data-label="error"}](error1.pdf){width="70.00000%"}

Conclusion
==========

This paper applies the Lagrangian-based first-order hydrodynamic traffic model to perform highway traffic estimation, utilizing both Eulerian and Lagrangian sensing data.  We briefly discuss the Lighithill-Whitham-Richards model in both Eulerian and Lagrangian coordinate systems, and provide rigorous mathematical results on the equivalence of Hamilton-Jacobi equations in these two coordinate systems.  We derive closed-form solutions to the LC-based Hamilton-Jacobi equation, and discuss the issue of fusing traffic data of different sources into the H-J equation via the notion of viability episolution.  A case study of the Mobile Century project demonstrates the unique modeling features and insights offered by the Lagrangian-based PDE. 

Despite several similarities between the EC-based and LC-based approaches such as structure of the PDE and solution method, the LC has the advantage of providing information associated with a given vehicle.  Such a feature needs to be further explored and engineered to facilitate the development of cyber-physical infrastructure, including the [*mobile internet*]{}.  In addition, extension of LC-based PDE to a network setting is also an important aspect of future research. 

[99]{}

Aubin, J.P., 1991.  Viability Theory.  Boston, MA: Systems and Control: Foundations and Applications.  Birkh$\ddot a$user. 

Aubin, J.P., Bayen, A.M., Saint-Pierre, P., 2008.  Dirichlet problems for some Hamilton-Jacobi equations with inequality constraints.  SIAM Journal on Control and Optimization 47 (5), 2348-2380. 

Barron, E.N., Jensen, R., 1990.  Semicontinuous viscosity solutions for Hamilton-Jacobi equations with convex Hamiltonians.  Communications in Partial Differential Equations 15, 1713-1742. 

Bressan, A., 2000.  Hyperbolic Systems of Conservation Laws.  The One Dimensional Cauchy Problem, Oxford University Press. 

Bressan, A., Han, K., 2011a.  Optima and Equilibria for a model of traffic flow.  SIAM Journal on Mathematical Analysis 43 (5), 2384-2417. 

Bressan, A., Han, K., 2011b.  Nash Equilibria for a Model of Traffic Flow with Several Groups of Drivers.  ESAIM: Control, Optimization and Calculus of Variations, doi:10.1051/cocv/2011198. 

Claudel, C.G., Bayen, A.M., 2011.  Convex formulations of data assimilation problems for a class of Hamilton-Jacobi equations.  SIAM Journal on Control and Optimization 49 (2), 383-402. 

Claudel, C.G., Bayen, A.M., 2010.  Lax-Hopf based incorporation of internal boundary conditions into Hamilton-Jacobi equation.  Part I: Theory.  IEEE Transactions on Automatic Control 55 (5), 1142-1157. 

Claudel, C.G., Bayen, A.M., 2010.  Lax-Hopf based incorporation of internal boundary conditions into Hamilton-Jacobi equation.  Part II: Computational methods.  IEEE Transactions on Automatic Control 55 (5), 1158-1174. 

Courant, R., Friedrichs, K.O., 1948.  Supersonic flows and shock waves.  Pure and Applied Mathematics 1. 

Daganzo, C.F., 2005.  A variational formulation of kinematic waves: Basic theory and complex boundary conditions.  Transportation Research Part B 39 (2), 187-196. 

Daganzo, C.F., 2006.  On the variational theory of traffic flow: well-posedness, duality and applications.  Networks and Heterogeneous Media 1 (4), 601-619. 

Evans, L.C., 2010.  Partial Differential Equations.  $2^{nd}$ edition.  American Mathematical Society, Providence, RI. 

Frankowska, H., 1993.  Lower semicontinuous solutions of Hamilton-Jacobi-Bellman equations.  SIAM Journal on Control and Optimization 31 (1), 257-272. 

Friesz, T.L., Han, K., Neto, P.A., Meimand, A., Yao, T., 2012.  Dynamic user equilibrium based on a hydrodynamic model.  Transportation Research Part B, doi:10.1016/j.trb.2012.10.001. 

Godunov, S.K., 1959.  A difference scheme for numerical solution of discontinuous solution of hydrodynamic equations.  Math Sbornik 47 (3), 271-306. 

Herrera, J.C., Work, D.B., Herring, R., Ban, X.J., Jacobson, Q., Bayen, A.M., 2009.  Evaluation of traffic data obtained via GPS-enabled mobile phones: The Mobile Century field experiment, Transportation Research Part C 18 (4), 568-583. 

Leclercq, L., Laval, J., Chevallier, E., 2007.  The Lagrangian coordinate system and what it means for first order traffic flow models.  In Proceedings of the $17^{th}$ International Symposium on Transportation and Traffic Theory, London. 

Le Floch, P., 1988.  Explicit formula for scalar non-linear conservation laws with boundary condition.  Mathematical Models and Applied Sciences 10, 265-287. 

LeVeque, R.J., 1992.  Numerical Methods for Conservation Laws.  Birkhäuser. 

Lighthill, M., Whitham, G., 1955.  On kinematic waves.  II.  A theory of traffic flow on long crowded roads.  In Proceedings of the Royal Society of London.  Series A, Mathematical and Physical Sciences 229 (1178), 317-345. 

Mazare, P.E., Dehwah, A.H., Claudel, C.G., Bayen, A.M., 2011.  Analytical and grid-free solutions to the Lighthill-Whitham-Richards traffic flow model.  Transportation Research Part B 45 (10), 1727-1748. 

Moskowitz, K., 1965.  Discussion of ‘freeway level of service as influenced by volume and capacity characteristics’ by D. R. Drew and C. J. Keese.  Highway Research Record 99, 43-44. 

Newell, G.F., 1993.  A simplified theory of kinematic waves in highway traffic, part I: General theory.  Transportation Research Part B 27 (4), 281-287. 

Richards, P.I., 1956.  Shockwaves on the highway.  Operations Research 4 (1), 42-51. 

Wagner, D. 1987.  Equivalence of the Euler and Lagrangian equations of gas dynamics for weak solutions.  Journal of Differential Equations 68 (1), 118-136. 

Yuan, Y., Van Lint, J.W.C., Hoogendoorn, S.P., Vrancken, J.L.M., Schreiter, T., 2011.  Freeway traffic state estimation using Extended Kalman Filter for first-order traffic model in Lagrangian Coordinates.  2011 International Conference on Networking, Sensing and Control, Netherlands.