1 Introduction

There are many factors to consider when constructing a light rail/tram system in a city. Some of these factors can be scientifically analyzed (as is the case in this paper), but others perhaps not (aspects that are political, sociological, financial,....). These latter aspects are of course important, but are not analyzed here.

Further, amongst considerations that lend themselves to scientific analysis, we restrict to small tram systems (we have in mind initially small cities, though our results will apply in large cities where political, financial or other considerations dictate the construction of a transit system only servicing a small fraction of the city). While we look a little at a two-line system, most of this paper considers a single-line system. To make the model tractable, in this current work we restrict ourselves to circular or rectangular “geometries” (which should nonetheless approximate many real-world city shapes).

Recent work by Barthelemy (2016) and by Aldous and Barthelemy (2019) has considered large cities with non-uniform (though isotropic) population density. They ask (and answer) the problem of determining, as the city increases, how does the optimal tram network change (e.g. radial, circular, grid,...). In our model, we fix a 1- or 2-line system, fix uniform population density, and answer the problem of determining for which city shape will this line (or two lines) give the best service. Thus our work is complementary to that of Aldous and Barthelemy [and indeed overlaps a bit when they consider uniform density in Sect. 4 of Aldous and Barthelemy 2019]. Both models are restricted, theirs by the isotropy assumption, and ours by the uniform populaton distribution assumption. We point out here that rectangular cities (often occuring along the edge of a sea/ocean/lake) cannot fit into their model: At the center of a rectangle, the view “east-west” will be different from looking “north-south”.

Okabe et al. (1992), Okabe and Suzuki (1997) tackle the problem of locational optimization using Voronoi diagrams. Their concept of generalised Voronoi diagrams (specifically line Voronoi diagrams, since the metro/tram line is a line segment) produces tesselations that resemble our concept of “infeasible region” (presented in Sect. 4). But none of the problems P1 to P8 in Okabe and Suzuki 1997 correspond to the problem considered in this paper.

2 City geometries

2.1 Rectangular vs. circular

We analyze here idealized models where the city shape is either rectangular (of dimensions p (km) times lp, where p is the short side of the rectangle and \(l\ge 1\)) or circular (of radius r kilometres). For the rectangle, p defines its “size”, while l defines its “shape” (varying from \(l=1\) (square) to large values of l for a “long”, “skinny” rectangle). As a (very) simplifying assumption, we assume uniform population density inside the city shape—the results of the analysis in this paper only apply in citys that approximate this distribution.Footnote 1

Assuming a uniform population density inside the city, let us suppose a person wants to go from a random location i to a random location j inside the city. One question we may ask is, what is the average length \(\bar{d}\) of such trips? It should be clear that this average distance will be an increasing function of all our parameters rpl. It should also be intuitively clear that, given a “rectangular” city and a “circular” one of equal area (and the aforementioned uniform population density), if \(l\gg 1\) then \(\bar{d}\) will be greater in the rectangular case. These mathematical questions are studied in the discipline of Geometric Probability, see Alagar (1976); Klain and Rota (1997).

The analysis of García-Pelayo (2005) gives for the circular case

$$\begin{aligned} \bar{d}^{\mathrm{circ}} = \frac{128r}{45\pi }, \end{aligned}$$
(1)

while for the rectangular case Mathai et al. (1999) gives

$$\begin{aligned} \bar{d}^{\mathrm{rect}}= & {} \frac{p}{15}\left[ l^3 +\frac{1}{l^2} + \sqrt{l^2+1}\left( 3-l^2-\frac{1}{l^2}\right) + \frac{5}{2l}\ln \left( l+\sqrt{l^2+1}\right) \right. \nonumber \\&\left. + \frac{5l^2}{2}\ln \left( \frac{1+\sqrt{l^2+1}}{l}\right) \right] . \end{aligned}$$
(2)

A natural question to ask is, how does \(\bar{d}^{\mathrm{rect}}\) vary, for a city of fixed area, as the shape varies from square to a long/thin rectangle? For fixed \(A=lp^2\), the l dependence is given by

$$\begin{aligned} \bar{d}^{\mathrm{rect}}= & {} \frac{\sqrt{A}}{15\sqrt{l}}\left[ l^3 +\frac{1}{l^2} + \sqrt{l^2+1}\left( 3-l^2-\frac{1}{l^2}\right) + \frac{5}{2l}\ln \left( l+\sqrt{l^2+1}\right) \right. \nonumber \\&\left. + \frac{5l^2}{2}\ln \left( \frac{1+\sqrt{l^2+1}}{l}\right) \right] \end{aligned}$$
(3)

which is presented as a curve with a reasonably uniform slope close to \(\sqrt{A}/15\) (see Fig. 1). Note further that for the case of a square (\(l=1\)), Eq. (3) gives

$$\begin{aligned} \bar{d}^{\mathrm{square}} = \left( \frac{2+\sqrt{2}+5\ln (1+\sqrt{2})}{15}\right) p \approx 0.52p \end{aligned}$$
(4)

which is slightly larger than (1) (setting \(p=2r\)), as expected.

Fig. 1
figure 1

The average distance (\(\bar{d}^{\mathrm{rect}}\)) between two randomly chosen points in a rectangle of dimensions \((p)\times (lp)\), and fixed area \(A=lp^2\). The curve in blue (triangles) is a plot of Eq. (3). The intercept on the y axis (\(l=1\)) corresponds to a square (see Eq. (4)) (color figure online)

Observation 1

For rectangular cities, the average distance travelled by inhabitants is larger the more rectangular the city is. Therefore, the need for a rail/tram system is larger.

2.2 Where to put the rail/tram line?

In what follows, we will just use the word “tram”, instead of mentioning rail/tram each time.

2.2.1 Rectangular city

Suppose we put a single line tram in our “rectangular” city. Assume that residents will consider using the tram if they live within \(d_0\) kilometres of it [later we will set \(d_0\) to 0.5km, to agree with Eq. (8) in Louf et al. (2014)]. In our idealized model, we put the tram along the centre of the rectangle, running along the longer side, stopping at each end \(d_0\) from the end. To explain it using the cartesian plane, if our rectangular city is placed with the shorter side going from (0, 0) to (0, p), and the longer side from (0, 0) to (lp, 0), then the tram line will run from \((d_0,p/2)\) to \((lp-d_0,p/2)\). We assume the tram has n stops along the line (including the ends), and an average of \(\tau\) minutes to go between stops (so one full run along the line takes \(\tau (n-1)\) minutes).

The average speed of the journey between any two tram stations for the rectangular city is simply

$$\begin{aligned} \bar{s}^{\mathrm{rect}} = \frac{lp-2d_0}{(n-1)\tau } \end{aligned}$$
(5)

2.2.2 Circular city

In what follows, we assume a circular city of equal area to the rectangular one (and of equal population, hence of equal population density). We have that \(lp^2 = A = \pi r^2\), where r is the radius (in kilometres) of the city. Since we assumed \(l \ge 1\), p must be less than the diameter of the circle (\(p < 2r\)).

1 line:

Starting at \(l=1\), our rectangular city is a square. Since \(lp^2 = A = \pi r^2 = p^2\), we have that \(p=r\sqrt{\pi } \approx 1.77 r\), so the sides of the square are less than the circle diameter. As we increase l, keeping areas constant, our line of length \(lp-2d_0\) becomes longer until its length equals that of the longest straight line (tram) we put in the circle, of length \(2r-2d_0\), so we get

$$\begin{aligned} lp = 2r = 2p\sqrt{\frac{l}{\pi }} \implies \sqrt{l} = \frac{2}{\sqrt{\pi }} \implies l = \frac{4}{\pi } \approx 1.27 \end{aligned}$$
(6)
2 lines:

Increasing l further above \(4/\pi\), we match this (one) line in the rectangle with two intersecting lines in the circle, whose lengths sum to \(lp-2d_0\). In our idealized model, we run the two lines at right angles to one another, intersecting at the centre of the circle. As l increases, eventually the sum of the maximum lengths of the two lines in the circle (\(4r-4d_0\)) must match \(lp-2d_0\), so we get

$$\begin{aligned}& 4r-2d_0 = lp = lr\sqrt{\frac{\pi }{l}} =r\sqrt{\pi l} \implies \sqrt{l} = \frac{2}{\sqrt{\pi }} \left( 2 - \frac{d_0}{r}\right)\\& \implies l \approx \frac{16}{\pi } \left( 1 - \frac{d_0}{r} \right) \end{aligned}$$
(7)

where we ignore the terms quadratic in \(d_0/r\). We anticipate (later) that \(d_0/r\) will be approximately 0.1, and we may ignore this in later approximations.

Observation 2

Obviously, the circular city with 2 lines also demands other infrastructure - an intersection tram station at the center, where the two lines meet, to allow passengers to swap lines. This junction may imply further cost and/or restrictions:

  1. 1.

    CostBuild a full overpass/underpass system (bridge) so trams pass freely.

  2. 2.

    RestrictionIn the absence of a bridge, there may be a restriction on schedules (2 trams can not pass the junction at the same time), perhaps causing inferior service.

3 “Quality of service”

We cannot “guesstimate” scientifically how many people may use a tram service (though, see Louf et al. 2014 for a nice empirical analysis of the dependence of ridership on population density and number of stations). Nonetheless, two main factors (amongst others) that affect quality of service are

  1. 1.

    Frequency of service

  2. 2.

    Time to get “from A to B”

These considerations may not be independent: In the rectangluar model, the travel time does not depend on the service frequency, but in the circular model, it may, in trips where one has to transfer lines. In this section we analyze the average time required to get “from A to B” in our “circular” and “rectangular” cities. Let \(\lambda\) be the average distance between neighboring stops on the line, so, the average speed is

$$\begin{aligned} \bar{s} = \lambda /\tau \end{aligned}$$
(8)

If there is a tram every \(t_f\) minutes (frequency of service), the average waiting time for a tram is \(t_f/2\): It will be convenient in what follows to write this time in terms of \(\tau\),

$$\begin{aligned} t_f/2 = q\tau \end{aligned}$$
(9)

and we will consider situations where \(q=1, 2, 3,\dots\).

We will call the region of service of the tram the set of all points (xy) that are within distance \(d_0\) of the tram line [this is closely related to the transit coverage indicator \(\sigma\) defined by Derrible and Kennedy (2009)]. Within this region of service, we now compare the average speed of a journey between two tram stations, for the case defined by Eq. (7), for our circular and rectangular cities. (Note that for the case of Eq. (6), this average speed will be identical in both cases, and equal to \(\lambda /\tau\).)

Rectangular city::

The average speed is \(\lambda /\tau\).

Circular city::

For journeys using only one single line (i.e. from stations on the blue line to other stations on the blue line, or from stations on the red line to other stations on the red line), the average speed is \(\lambda /\tau\) as before. However, if we make a journey between two randomly chosen stations, half of these journeys involve changing line [see the directness indicator \(\tau\) of Derrible and Kennedy (2009)], and we will show this results in considerably reduced speed.

Fig. 2
figure 2

Two tram lines (red and blue) intersecting at the centre: the shaded region is the region of service (color figure online)

Letting the origin be at the usual position of the intersection of the x (red) and y (blue) lines, we label the stations with integers i (along x) and j (along y), so that the average distance between station i and j is \(\lambda \sqrt{i^2 + j^2}\). There is a certain amount of waiting time at the junction at (0, 0), which we write in terms of \(\tau\) as described in Eq. (9). Then the total transit time from i to j is \((i+j+q)\tau\). This results in an average speed from i to j of

$$\begin{aligned} s_{ij} = \frac{\lambda \sqrt{i^2 + j^2}}{(i+j+q)\tau } \end{aligned}$$
(10)

Since the numerator is less than \((i+j)\lambda\), and the denominator is greater than \((i+j)\tau\), this speed can be considerably less than \(\lambda /\tau\). Averaging over all \(i, j \le m\) gives an average speed of

$$\begin{aligned} \bar{s} = \frac{1}{m^2}\left( \frac{\lambda }{\tau }\right) \sum _{i,j = 1}^m \frac{\sqrt{i^2 + j^2}}{(i+j+q)} \end{aligned}$$
(11)

We plot \(\bar{s}\) as a function of m and q in Fig. 3.

Observation 3

Note that for a substantial range of the parametersmandq, the average speed falls to\(50\%\).

Observation 4

For fixedm, the larger the value ofq (i.e. the larger the wait at the junction), the smaller the overall point-to-point speed.

Observation 5

For fixed values ofq, as we increasem,we reduce the impact ofqon the overall speed.

Fig. 3
figure 3

The average speed between randomly chosen stations on different tram lines (see Fig. 2). All parameters are dimensionless. The average speed is written as a percentage of \(\bar{s} = \lambda /\tau\) (see Eq. 8). m is the total number of stations (counting from the origin/junction point of the two lines) while q is the average waiting time at the junction as a multiple of \(\tau\) (see Eq. 9) (color figure online)

4 Infeasible regions

For all choices of the departure point \((x_1, y_1)\) and the arrival point \((x_2, y_2)\), we now compare travelling with or without the tram. If we fix a particular departure point \((x_1, y_1)\) and consider all possible arrival points \((x_2, y_2)\), it is intuitively clear that for some arrival points, using the tram would serve no purpose (we say the journey is infeasible via the tram). In this section we define this notion precisely, and calculate what proportion of trips are infeasible. We show that the infeasible region for a circular city is larger than that for a rectangular city.

4.1 Metrics

We denote by \(d_{\mathrm{euc}}\) the standard Euclidean metric on the plane \({\mathbb {R}}^2\), with the distance between two points \(p_1, p_2 \in {\mathbb {R}}^2\) given by

$$\begin{aligned} d_{\mathrm{euc}}(p_1, p_2) = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} \end{aligned}$$
(12)

where \(p_1 = (x_1, y_1)\) and \(p_2 = (x_2, y_2)\).

We now define a metric for measuring the (effective) distance for the journey between \(p_1\) and \(p_2\) using the tram (see Burago et al. 2001 for general information on metrics). This is comprised of three parts:

  1. 1.

    The journey (not using tram) from \(p_1\) to the nearest tram station

  2. 2.

    The journey on the tram to the station nearest the destination

  3. 3.

    The journey (not using tram) from that station to the destination (\(p_2\))

To calculate this we need to determine the nearest point on the tram line to an arbitrary point \(p = (x,y)\). Let our tram line run between points \((-a,0)\) and (a, 0), so it is represented by a horizontal line segment centered at the origin (0, 0). Let us define

$$\begin{aligned} x^t = {\left\{ \begin{array}{ll} -a, &{} x < -a\\ x, &{} -a \le x \le a\\ a, &{} x > a\\ \end{array}\right. } \end{aligned}$$
(13)

or equivalently

$$\begin{aligned} x^t = {\left\{ \begin{array}{ll} \max (x,-a), &{} x < 0\\ \min (x,a), &{} x > 0\\ \end{array}\right. } \end{aligned}$$
(14)

The nearest point on the tram line to any point \(p = (x,y)\) is \(Proj(p) = (x^t,0)\). Our tram metric \(d_{\mathrm{tr}}\) is

$$\begin{aligned} d_{\mathrm{tr}} (p_1,p_2) = d_{\mathrm{euc}} (p_1, Proj(p_1)) + |x_1^t - x_2^t|(\bar{s}_{\mathrm{nt}}/\bar{s}_{\mathrm{t}}) + d_{\mathrm{euc}} (Proj(p_2), p_2) \end{aligned}$$
(15)

where \(\bar{s}_{\mathrm{t}}\) is the average speed along the tram line, while \(\bar{s}_{\mathrm{nt}}\) is the average speed on the other two (non-tram) segments of the journey. Note here that the physical distance \(|x_1^t - x_2^t|\) along the tram line is reduced by a factor of \(\bar{s}_{\mathrm{nt}}/\bar{s}_{\mathrm{t}}\) because of the superior speed of the tram \(\bar{s}_{\mathrm{t}}\) (compared to \(\bar{s}_{\mathrm{nt}}\))Footnote 2.

4.2 Infeasible journeys

To compare \(d_{\mathrm{euc}} (p_1, p_2)\) with \(d_{\mathrm{tr}} (p_1, p_2)\) we have to consider one further term: Travelling via the tram, when one arrives at the point \(Proj(p_1)\) one must wait on average time \(t_f/2\) for a tram. In this time, if the traveller had not taken the tram, they could have travelled a distance of \(\bar{s}_{\mathrm{nt}}t_f/2\) km. Thus, we should compare \(d_{\mathrm{euc}} (p_1, p_2)\) with \(d_{\mathrm{tr}} (p_1, p_2) + \bar{s}_{\mathrm{nt}}t_f/2\).

Definition 1

We say a journey between points \(p_1\) and \(p_2\) is (\(\alpha\),\(\beta\))–infeasible if and only if

$$\begin{aligned} d_{\mathrm{euc}} (p_1, p_2) - d_{\mathrm{tr}} (p_1, p_2) < \bar{s}_{\mathrm{nt}}t_f/2 \end{aligned}$$
(16)

where \(\alpha = \bar{s}_{\mathrm{t}}/\bar{s}_{\mathrm{nt}}\) is the tram speed relative to the non-tram speed, and \(\beta = t_f/2\) is the average waiting time.

Definition 2

We say a journey is infeasible if and only if it is (\(\infty\),0)–infeasible.

Definition (2) corresponds to an ideal world of zero waiting time for the tram, and infinite tram speed!

Definition 3

The infeasible region corresponding to a point p is the set of all points q such that the journey from p to q is an infeasible journey. We denote this using the function

$$\begin{aligned} I: {\mathbb {R}}^2 \rightarrow 2^{{\mathbb {R}}^2}, \ I(p) = \{ q \in {\mathbb {R}}^2 | d_{\mathrm{euc}} (p,q) < d_{\mathrm{tr}} (p,q) \} \end{aligned}$$
(17)

For a city whose area is A (we will soon denote by R the area of a rectangular city, and by C the area of a circular city), we further define

Definition 4

The Infeasibility Factor (IF(p)), corresponding to a particular departure point p within the area of the city, is the area of I(p) relative to the overall city area, expressed as a percentage, i.e.

$$\begin{aligned} IF(p) = (100) \frac{\iint _{I(p)} \,dx\,dy}{\iint _{A} \,dx\,dy} \end{aligned}$$
(18)

Definition 5

The Infeasibility Factor (IF) for the city as a whole is the average over all points of the Infeasibility Factors for each point,

$$\begin{aligned} IF = \frac{\iint _{A} IF((x,y)) \,dx\,dy}{\iint _{A} \,dx\,dy}, \end{aligned}$$
(19)

where we write p as (xy).

Note that the IF of the city as a whole is only a function of the population distribution and of the shape and positioning of the tram line(s). It should also be clear that, as l increases, the IF is asymptotically equal to 0.5 (for fixed tram line length). This is because (1) for points to the right of the tram line, the infeasible region becomes closer and closer to the region to the right and (2) for points to the left of the tram line, the infeasible region becomes closer and closer to the region to the left. Each of these regions go asymptotically to half of the overall city area, while the central region along the tram line goes asymptotically to zero.

In Fig. 4 we show examples of infeasible regions for a number of points, superimposed on a circular city and two different rectangular cities. In Appendix A we present further plots showing infeasible regions for various values of \(\alpha\) and \(\beta\).

Fig. 4
figure 4

Infeasible regions for four different (departure) points. In each image, the point is a bold black dot and the tram line is a solid (red) line centered at (0, 0). Three different city shapes, of equal area (about 300 square kilometres), are indicated: (i) circular (blue), (ii) rectangular with \(l=3\) (grey) and (iii) rectangular with \(l=4\) (yellow). The infeasible region is shaded in (red) x signs. Because of symmetries, our examples are all of points in the upper right quadrant (color figure online)

4.3 The shape of infeasible regions

The boundary between the infeasible and feasible regions is defined by the set of points p satisfying \(d_{\mathrm{euc}}(p,p_1) = d_{\mathrm{tr}}(p,p_1)\), where \(p_1\) is the departure point. We suppose again our departure point \(p_1 = (x_1,y_1)\) is in the positive quadrant (i.e. \(x_1>0\) and \(y_1>0\)). We distinguish two cases.

4.3.1 Departure points “along” the tram line

Here, \(0\le x_1\le a\). We set \(p_1=(x_1,y_1), p = (x,y)\). Since \(0\le x_1\le a\), \(x_1^t = x_1\). Since \(\alpha = \infty\), the second term in Eq. (15) is zero, so we have

$$\begin{aligned} d_{\mathrm{tr}} (p_1,p) = d_{\mathrm{euc}} ((x_1,y_1), (x_1,0)) + d_{\mathrm{euc}} (Proj(p), p) = y_1 + d_{\mathrm{euc}} (Proj(p), p). \end{aligned}$$
(20)

This leads us to three further cases:

\(\mathbf{x} < -\mathbf{a}\)::

In this region, \(Proj(p) = (-a,0)\) (i.e. \((-a,0)\) is the point on the tram line closest to (xy)), so we have

$$\begin{aligned} d_{\mathrm{tr}} (p_1,p) = y_1 + d_{\mathrm{euc}} ((-a,0), (x,y)) = y_1 + \sqrt{(x+a)^2 + y^2}. \end{aligned}$$
(21)

The infeasible region is thus bounded by the curve

$$\begin{aligned} d_{\mathrm{euc}}(p,p_1) = d_{\mathrm{tr}}(p,p_1) \implies \sqrt{(x-x_1)^2 + (y-y_1)^2} = y_1 + \sqrt{(x+a)^2 + y^2} \end{aligned}$$
(22)

which can be re-written as

$$\begin{aligned}&4[(x_1+a)^2-y_1^2]x^2 +8y_1(x_1+a)xy +4[(a+x_1)^2(a-x_1)-2ay_1^2]x\nonumber \\&\quad +4y_1(a^2-x_1^2)y +(x_1^2-a^2)^2-4y_1^2a^2 =0. \end{aligned}$$
(23)

This equation is of the form \(Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0\) with \(C=0\). Since \(B^2-4AC = B^2 \ge 0\), it is hyperbolic unless \(y_1 = 0\), in which case it is parabolic.

\(-\mathbf{a} \le \mathbf{x} < \mathbf{a:}\):

\(Proj(p) = (x,0),\ d_{\mathrm{tr}} (p_1,p) = y_1 + d_{\mathrm{euc}} (Proj(p), p) = y_1 + |y|\) which means we have the curve

$$\begin{aligned} d_{\mathrm{euc}}(p,p_1) = d_{\mathrm{tr}}(p,p_1) \implies \sqrt{(x-x_1)^2 + (y-y_1)^2} = y_1 + |y|. \end{aligned}$$
(24)

For negative y, this is the straight line \(x=x_1\) (visible in Fig. 4a, b), while for positive y it gives \(y = (x-x_1)^2/(4y_1)\), which is a parabola with focus \((x_1,y_1)\) and directrix \(y=-y_1\).

\(\mathbf{a} \le \mathbf{x :}\):

\(Proj(p) = (a,0)\) (i.e. (a, 0) is the point on the tram line closest to (xy)), so we have

$$\begin{aligned} d_{\mathrm{tr}} (p_1,p) = y_1 + d_{\mathrm{euc}} ((a,0), (x,y)) = y_1 + \sqrt{(a-x)^2 + y^2}. \end{aligned}$$
(25)

The infeasible region is thus bounded by the curve

$$\begin{aligned} d_{\mathrm{euc}}(p,p_1) = d_{\mathrm{tr}}(p,p_1) \implies \sqrt{(x-x_1)^2 + (y-y_1)^2} = y_1 + \sqrt{(a-x)^2 + y^2} \end{aligned}$$
(26)

which can be re-written as

$$\begin{aligned}&4[(a-x_1)^2-y_1^2]x^2 -8y_1(a-x_1)xy -4[(a-x_1)^2(a+x_1)-2ay_1^2]x\nonumber \\&\quad +4y_1(a^2-x_1^2)y +(a^2-x_1^2)^2-4y_1^2a^2 =0. \end{aligned}$$
(27)

This is hyperbolic unless either \(y_1=0\) or \(x_1=a\), in which case it is parabolic.

These three curves intersect at the two points \((-a,(a+x_1)^2/(4y_1))\) and \((a,(a-x_1)^2/(4y_1))\). The asymptotic behaviour “to the left” (as \(x\rightarrow -\infty\)) and “to the right” (as \(x\rightarrow \infty\)) is as follows (see Fig. 5):

Fig. 5
figure 5

Boundary of the Infeasible Region for departure point \((x_1,y_1) = (2,2)\) (see also Fig. 4a). The parabola joins with the hyperbola to the left at \((-5,6.125)\) and with the hyperbola to the right at (5, 1.125). Asymptotically, the hyperbolas to the left/right are straight lines with slopes \(-45/28\) and 5 / 12, respectively

As\(\mathbf{x}\rightarrow -\infty\)::

The hyperbola to the left has asymptotic slope \((\phi ^+ - 1/\phi ^+)/2\), where \(\phi ^+ = y_1/(x_1+a)\). This means

$$\begin{aligned} \text{ the } \text{ asymptotic } \text{ slope } \text{ as } x\rightarrow -\infty \text{ is } {\left\{ \begin{array}{ll} \text{ positive } &{} \text{ when } y_1 > x_1 + a\\ \text{ zero } &{} \text{ when } y_1 = x_1 + a \\ \text{ negative } &{} \text{ when } y_1 < x_1 + a.\\ \end{array}\right. } \end{aligned}$$
(28)
As\(\mathbf{x} \rightarrow \infty\)::

The hyperbola to the right has asymptotic slope \((\phi ^- - 1/\phi ^-)/2\), where \(\phi ^- = y_1/(x_1-a)\). This means

$$\begin{aligned} \text{ the } \text{ asymptotic } \text{ slope } \text{ as } x\rightarrow \infty \text{ is } {\left\{ \begin{array}{ll} \text{ positive } &{} \text{ when } y_1 < a - x_1 \\ \text{ zero } &{} \text{ when } y_1 = a - x_1 \\ \text{ negative } &{} \text{ when } y_1 > a - x_1 .\\ \end{array}\right. } \end{aligned}$$
(29)

4.3.2 Departure points “beyond” the tram line

Here, \(x_1 > a\). We have that \(x_1^t = a\), so \(Proj(p_1) = (a,0)\). Equation (15) gives us

$$\begin{aligned} d_{\mathrm{tr}} (p_1,p)& = d_{\mathrm{euc}} ((x_1,y_1), (a,0)) + d_{\mathrm{euc}} (Proj(p), p) = \sqrt{(x_1-a)^2 + y_1^2} \nonumber \\&+ d_{\mathrm{euc}} (Proj(p), p). \end{aligned}$$
(30)

This leads us to three further cases:

\(\mathbf{x} < -\mathbf{a}:\):

\(Proj(p) = (-a,0)\ \implies\)

$$\begin{aligned} d_{\mathrm{tr}} (p_1,p) & = \sqrt{(x_1-a)^2 + y_1^2} + d_{\mathrm{euc}} ((a,0), (x,y)) = \sqrt{(x_1-a)^2 + y_1^2} \nonumber \\&+ \sqrt{(x+a)^2 + y^2}. \end{aligned}$$
(31)

The infeasible region is bounded by the curve

$$\begin{aligned} d_{\mathrm{euc}}(p,p_1)= &\, {} d_{\mathrm{tr}}(p,p_1) \implies \sqrt{(x-x_1)^2 + (y-y_1)^2} = \sqrt{(x_1-a)^2 + y_1^2} \nonumber \\&+ \sqrt{(x+a)^2 + y^2}. \end{aligned}$$
(32)

After repeated squaring, this can be re-written as \(Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0\) where

$$\begin{aligned} A&= 4ax_1-y_1^2&B&= 2y_1(x_1+a)&C&= -(x_1-a)^2\nonumber \\ D&= 2a(2ax_1-2x_1^2-y_1^2)&E&= -2ay_1(x_1-a)&F&= -a^2y_1^2 \end{aligned}$$
(33)

Since \(B^2-4AC = 16ax_1(y_1^2 + (x_1-a)^2) > 0\) (except for the particular point \(p_1=(a,0)\)), this is a hyperbola.

\(-\mathbf{a} \le \mathbf{x} < \mathbf{a:}\):

\(Proj(p) = (x,0)\ \implies\)

$$\begin{aligned} d_{\mathrm{tr}} (p_1,p)& = \sqrt{(x_1-a)^2 + y_1^2} + d_{\mathrm{euc}} ((x,0), (x,y)) = |y| \nonumber \\&+ \sqrt{(x_1-a)^2 + y_1^2}. \end{aligned}$$
(34)

The infeasible region is bounded by the curve

$$\begin{aligned} d_{\mathrm{euc}}(p,p_1)= & {} d_{\mathrm{tr}}(p,p_1) \implies \sqrt{(x-x_1)^2 + (y-y_1)^2} = |y| \nonumber \\&+ \sqrt{(x_1-a)^2 + y_1^2}. \end{aligned}$$
(35)

This gives us

$$\begin{aligned} x^2 -2x_1x -2\left( y_1\pm \sqrt{(x_1-a)^2 + y_1^2}\right) y +a(2x_1-a) = 0. \end{aligned}$$
(36)

Since \(B=C=0\), this is a parabola.

\(\mathbf{a} \le \mathbf{x:}\):

\(Proj(p) = (a,0)\) so the equation \(d_{\mathrm{euc}}(p,p_1) = d_{\mathrm{tr}}(p,p_1)\) reads

$$\begin{aligned} d_{\mathrm{euc}}(p,p_1) = d_{\mathrm{euc}}(p,(a,0)) + d_{\mathrm{euc}}((a,0), p_1). \end{aligned}$$
(37)

Because of the triangle inequality, this equation has no solution except for the single point \(p=(a,0)\).

4.4 Infeasibility factor for a square city

As before, we let our line run between points \((-a,0)\) and (a, 0) through the center of a square city. The square city (of area \(4a^2\)) is bounded by the four vertices \((a,a), (a,-a), (-a,a)\) and \((-a,-a)\). (In terms of our original parameters in Sect. 2.1, \(l=1\) and \(p=a\).) We prove that this setup has an Infeasibility Factor of

$$\begin{aligned} \text{ IF } = \frac{7}{72} + \frac{\ln {2}}{3} \approx 0.328 \end{aligned}$$

(just under one third). For the technical details of this exact calculation, see Appendix B.

4.5 Asymptotic infeasibility for a rectangular city

For comparison with the square city case, it is easy to show the IF for a rectangular city that grows arbitrarily long (and narrow), with constant area, is 0.5. The length of the city is lp, its area is \(A = 4a^2\), and the tram is of length 2a centered at the center of the city. We divide the city in to three regions:

R1:

Points (xy) with \(x < -a\)

R2:

Points (xy) with \(-a \le x \le a\)

R3:

Points (xy) with \(x > a\)

We consider the following lower and upper bounds on IF:

Lower bound:

A lower bound on the infeasible trips is the set of trips from R1 to R1 and from R3 to R3 (which are clearly infeasible). R1 and R3 have equal area \((A-2ap)/2\) while R2 has area 2ap. This means the proportion of trips from R1 to R1 is \((A-2ap)^2/4A^2\), and likewise for trips from R3 to R3. So, our lower bound is \((1 - 2ap/A)^2/2\)

Upper bound:

Since trips from R1 to R3, or from R3 to R1 are clearly feasible, an upper bound is the set of all trips excluding these. This gives us an upper bound of \(2ap/A + 2[(A-2ap)/2A][(A+2ap)/2A] = 1/2 +2ap/A - 2a^2p^2/A^2\)

We take the limit as \(p\rightarrow 0\) of both bounds (a and A are constants) to get an IF of 0.5.

4.6 Infeasibility in circular and rectangular cases

We carried out the calculations for Fig. 4 by discretizing a grid of \(40 \times 40\) nodes, and writing code in PYTHON, using Eq. (16), to determine infeasible journeys.

For each city shape, we calculate the Infeasibility Factor for each departure point \(p = (x,y)\). From Fig. 4, this corresponds to the area marked by (red) x signs within the city, divided by the total city area. In Fig. 6 we show the dependence of IF(p) on the position \(p = (x,y)\) for a rectangular city with \(l=3\). Fig. 7 presents the corresponding results for a circular city.

Fig. 6
figure 6

Infeasibility Factors for a rectangular city with \(a=5, l=3\) (color figure online)

Fig. 7
figure 7

Infeasibility Factors for a circular city with \(a=5\) (color figure online)

The Infeasibilty Factors, for a range of realistic values of \(\alpha\) and \(\beta\), in the circular and rectangular cases, are presented in Appendix C. From Figs. 10 and 11 we note:

Observation 6

The infeasibility factors for the circular case are higher in all cases (except for Figs.10f and11f, where they are identical) than for the rectangular case. The difference is particularly noticeable comparing Figs. 10b–e with11b–e, where it is over\(20\%\).

We discretize Eq. 16 to calculate a single number (percentage) for each city shape, representing an average over p of all IF(p). This number still depends on

  • \(\alpha\)

  • \(\beta\)

  • a (fixed by the length of the tram line)

  • the city shape

We fix \(a=r/2\) and present in Fig. 8 results for the Infeasibility Factor (IF) as it depends on \(\alpha\) and \(\beta\) for the rectangular and circular cases.

Fig. 8
figure 8

Overall Infeasibility Factors for the circular case (a) and rectangular case (b) as they depend on the tram speed (fixed by \(\alpha\)) and frequency of service (fixed by \(\beta\)) (color figure online)

Observation 7

Note from Fig. 8the lower overall Infeasibility Factors for the rectangular case: much of the graph is around\(55\%\) (yellow), while for the circular case, much of the graph is around\(85\%\) (blue).

This plot should allow a designer/transport engineer, who will have an estimate for values of \(\alpha\) and \(\beta\), to see which IF corresponds to their system, given the city geometry.

5 Case study: Galway city

We present in Appendix D a case study for Galway City (Ireland), a rectangular city whose “length” is about 3 times its “width” (\(l=3\)).

6 Conclusions

We have presented a model that enables mathematical calculation of the utility of a light rail/tram line in a city of a certain shape. We have presented in detail the calculations for a single line tram in rectangular and circular cities, showing the lower infeasibility factors for such a tram in the rectangular case: We therefore argue that building such a tram in a rectangular city is more feasible than in a circular city. This is illustrated in the case study for Galway City.

For further work we envisage the following:

  • We will investigate the dependence of the infeasibility factors, not just on the tram speeds and tram frequencies, but also on the length of the tram line (relative to the city size).

  • We will construct a more elaborate model, using the metrics presented here, for more elaborate tram networks with multiple (intersecting) lines. This should model larger real-world city transit systems.

  • In our calculations, we assume all journeys are equally probable. This assumption could be relaxed, building a model which calculates infeasibility factors that are weighted averages of different journeys. In real-world scenarios, the probability of going from point i to j depends not just on population densities (which in any case will not be uniform), but on other features. For example, one or the other of i, j may correspond to a place of work, a hospital, a university, a transport hub, a shopping centre: Journeys to/from these locations may have higher weightings, even though the population densities at these locations may be lower.