# Three-detector problem and Newell's method

The Three-detector problem is a problem in traffic flow theory. Given is a homogeneous freeway and the vehicle counts at two detector stations. We seek the vehicle counts at some intermediate location. The method can be applied to incident detection and diagnosis by comparing the observed and predicted data, so a realistic solution to this problem is important. Newell G.F. proposed a simple method to solve this problem. In Newell's method, one gets the cumulative count curve (N-curve) of any intermediate location just by shifting the N-curves of the upstream and downstream detectors. Newell's method was developed before the variational theory of traffic flow was proposed to deal systematically with vehicle counts. This article shows how Newell's method fits in the context of variational theory.

## A special case to demonstrate Newell's method

Assumption. In this special case, we use the Triangular Fundamental Diagram (TFD) with three parameters: free flow speed $v_{f}$, wave velocity -w and maximum density $k_{j}$ (see Figure 1). Additionally, we will consider a long study period where traffic past upstream detector (U) is unrestricted and traffic past downstream detector (D) is restricted so that waves from both boundaries point into the (t,x) solution space (see Figure 2).
The goal of three-detector problem is calculating the vehicle at a generic point (P) on the "world line" of detector M (See Figure 2). Upstream. Since the upstream state is uncongested, there must be a characteristic with slope $v_{f}$ that reaches P from the upstream detector. Such a wave must be emitted $\tau _{1}=L_{U}/v_{f}$ times unit earlier, at point P' on the figure. Since the vehicle number does not change along this characteristic, we see that the vehicle number at the M-detector calculated from conditions upstream is the same as that observed at the upstream detector $\tau _{1}$ time units earlier. Since $\tau _{1}$ is independent of the traffic state (it is a constant), this result is equivalent to shifting the smoothed N-curve of the upstream detector (curve U of Figure 3) to the right by an amount $\tau _{1}$.
Downstream. Likewise, since the state over the downstream detector is queued, there will be a wave reaching P from a location $P_{2}$ with wave velocity $-w<0$. The change in vehicular label along this characteristic can be obtained from the moving observer construction of Figure 4, for an observer moving with the wave. In our particular case, the slanted line corresponding to the observer is parallel to the congested part of TFD. This means that the observer flow is independent of the traffic state and takes on the value: $k_{j}(-w)$. Therefore, in the time that it takes for the wave to reach the middle location, $\tau _{2}=L_{D}/(-w)$, the change in count is $\delta =k_{j}(-w)\tau _{2}=k_{j}L_{D}$; i.e., the change in count equals the number of vehicles that fit between M and D at jam density. This result is equivalent to shifting the D-curve to the right $\tau _{2}$ units and up $\delta$ units.
Actual count at M. In view of the Newell-Luke Minimum Principle, we see that the actual count at M should be the lower envelope of the U'- and D'-curves. This is the dark curves, M(t). The intersections of the U'- and D'- curves denote the shock's passages over the detector; i.e., the times when transitions between queued and unqueued states take place as the queue advances and recedes over the middle detector. The area between the U'- and M-curves is the delay experienced upstream of location M, trip times are the horizontal separation between curves U(t), M(t) and D(t), accumulation is given by vertical separations, etc.
Mathematical expression. In terms of the function N(t,x) and the detector location ($x_{u}$, $x_{m}$, $x_{d}$) as follows:
    $N(t,x_{m})=\min\{\ N(t-L_{U}/v_{f},x_{u})\ ,\ N(t+L_{D}/w,x_{d})+k_{j}L_{D}\ \}\qquad (1)$
where $L_{U}=x_{m}-x_{u}$ and $L_{D}=x_{d}-x_{m}$.

## Basic principles of variational theory (VT)

Goal. Suppose we know the number of vehicles (N) along a boundary in a time-space region and we are looking for the number of vehicles at a generic point P (denoted as $N_{p}$) beyond that boundary in the direction of increasing time(see Figure 5).
Suppose, again, that an observer starts moving from the boundary to point P along path L. We know the vehicle number the observer sees, $N_{L}$. We then break the path of the observer into small sections (such as the one show between A and B) and note that we also know the maximum number of vehicles that can pass the observer along that small section is, $C_{AB}$. The relative capacity formula tells us that it is: $C_{AB}=r(v^{0})\Delta {t}$. For TFD and using $v_{AB}$ for the slope of segment AB, $C_{AB}$ can be written as:
    $C_{AB}=r(v_{AB})\Delta {t}=q_{0}\Delta {t}-k_{0}\Delta {x}=q_{0}(t_{B}-t_{A})-k_{0}(x_{B}-x_{A});for\ v_{AB}\in [-w,v_{f}]\qquad (2)$
So, if we now add the vehicle number on the boundary to the sum of all $C_{AB}$ along path L we get an upper bound for $N_{p}$. This upper bound applies to any observer that moves with speeds in the range $[-w,v_{f}]$. Thus we can write:
    $N_{P}\leq N_{L}+\sum _{L}(C_{AB}),\ v_{AB}\in [-w,v_{f}]\qquad (3)$
Equations (1) and (2) are based on the relative capacity constraint which itself follows from the conservation law.
Maximum principle. It states that $N_{P}$ is the largest possible value, subject to the capacity constraints. Thus the VT recipe is:
    $N_{P}=\min _{L}\{N_{L}+\sum _{L}(C_{AB})\}\qquad (4)$
Equation (4) is a shortest path(i.e., calculus of variations) problem with $C_{AB}=r(v_{AB})$ as the cost function. It turns out that it produces the same solution as Kinematic wave theory.

## Generalized solution
### Step 1

All possible observer straight lines between the upstream boundary and point P have to be constructed with observer speeds smaller than free flow speed:
    $C_{QP}=q_{0}\Delta {t}-k_{0}\Delta {x}=q_{0}(t_{P}-t_{Q})-k_{0}(x_{P}-x_{Q})\qquad (5)$
where $\Delta {t}=t_{P}-t_{Q}={\frac {(x_{M}-x_{U})}{v_{QP}}}$ for $v_{QP}\in [0,v_{f}]$ and $\Delta {x}=x_{M}-x_{U}$
Thus we need to minimize ${N_{Q}+q_{0}(t_{P}-t_{Q})-k_{0}(x_{M}-x_{U})}$; i.e.,
    $N_{U}=\min _{t_{Q}}\{N_{Q}+q_{0}(t_{P}-t_{Q})-k_{0}(x_{M}-x_{U})\}\qquad (6)$
Since $dN_{Q}/dt\leq q_{0}$, we see that the objective function is non-increasing and therefore $t_{Q}^{*}=t_{P_{1}}$. So Q should be placed at $P_{1}$ and we have:
    $C_{QP}=C_{P_{1}P}=q_{0}\left({\frac {x_{M}-x_{U}}{v_{f}}}\right)-k_{0}(x_{M}-x_{U})=0\qquad (7)$
Thus, $N_{U}=N_{P_{1}}$

### Step 2

We have:$N_{D}=\min _{Q^{'}}\{N_{Q^{'}}+C_{Q^{'}P}\}=\min _{Q^{'}}\{N_{Q^{'}}+q_{0}\Delta {t}-k_{0}\Delta {x}\}$ So repeat the same steps we find that $N_{D}$ is minimized when $Q^{'}=P_{2}$. And at point $P_{2}$ we get:
    $N_{D}=N_{P_{2}}+q_{0}({\frac {x_{D}-x_{M}}{w}})-k_{0}(x_{D}-x_{M})\qquad (8)$
Since the FD is triangular, ${\frac {q_{0}}{w}}+k_{0}=k_{j}$. Therefore, (8) reduces to:
    $N_{D}=N_{P_{2}}+(x_{D}-x_{M})k_{j}\qquad (9)$

### Step 3

To get the solution we now choose the lower of $N_{U}$ and $N_{D}$.
    $N_{P}=\min\{N_{U}\ ,\ N_{D}\}=\min\{N_{P_{1}}\ ,\ N_{P_{2}}+(x_{D}-x_{M})k_{j}\}\qquad (10)$
This is Newell's the recipe for the 3-detector problem.