usyed3/TransportBench huggingface dataset:
Problem: Given a small island $A$ with $P$ family units, each unit $j$ derives $a_j$ daily in economic benefit by sending a commuter to a city $B$ on the mainland. Island $A$ is connected to city $B$ via both a ferry (with round trip ferry fare $F$) and also a toll bridge (with round trip toll $\delta$ plus other out-of-pocket round trip driving cost $c$). The ferry trip lasts $t_F$ hours (for each way) and the car trip $t_c$ hours (for each way). This commuter values driving time at a rate of $\alpha_j$ \$/hr and riding time at $\beta_j$ \$/hr.

Every family is required to send a commuter to $B$ every day, using one and only one of the two modes.
\begin{enumerate}
    \item[a.] Write the utility functions of a round trip for family unit $j$, for both modes.
    \item[b.] Derive an expression for the demand function for ferry service as a function of $F$; assume that: (i) daily economic benefit $a_j$ and driving time value $\alpha_j$ are the same for every family/commuter ($a_j = a$ and $\alpha_j = \alpha$); and (ii) commuters value ferry riding time $\beta_j$ differently, and for any positive value $\gamma$, the commuters with $\beta_j > \gamma$ form a fraction $e^{-\gamma/4}$ (note that $0 < e^{-\gamma/4} < 1$) of the total population.
    \item[c.] Estimate approximately the percentage change in demand when the fare is reduced 1\%, from \$2 to \$1.98. Try to do this as simple as possible.
\end{enumerate}
Solution: 
\begin{enumerate}
    \item [a.]     \begin{align*}
        U_{ferry} &= a_j – 2 t_f \beta_j – F, \,\,
        U_{drive} = a_j – 2 t_c \alpha_j – \delta – c
    \end{align*}

    \item [b.] 
    \begin{align*}
        \text{Pr} \left(U_{ferry}>U_{drive} \right) &= \text{Pr}\left( \beta_j < [2 t_c \alpha_j + \delta + c – F] / (2 t_f)  \right)                          =1 – e^{– \frac{(2 t_c \alpha_j + \delta + c – F) }{8 t_f} }.
    \end{align*} 
    Therefore the demand is given by $P-Pe^{– \frac{(2 t_c \alpha_j + \delta + c – F) }{8 t_f} }$.
    \item[c.] Take the derivative of demand w.r.t. $F$, and let\(\gamma = \frac{2t_c \alpha_j + \delta + c - F}{2t_f}\), we have
    \begin{align*}
        \frac{dD}{dF} &= -\frac{P}{8t_f}e^{\frac{-\gamma}{4}}.
    \end{align*}
    \begin{align*}
        \text{Change in demand} \approx \frac{dD}{dF} \cdot -0.02
    \end{align*}
    
    \begin{align*}
        \text{\% change in demand} &= \frac{\frac{dD}{dF} \cdot -0.02}{P-Pe^{\frac{-\gamma}{4}}} \times 100
    = \frac{0.02\frac{P}{8t_f}e^{\frac{-\gamma}{4}}}{P-Pe^{\frac{-\gamma}{4}}} \times 100
    = \frac{\frac{1}{400t_f}e^{\frac{-\gamma}{4}}}{1-e^{\frac{-\gamma}{4}}} \times 100
    \end{align*}.
    
    
\end{enumerate}
Problem: Briefly state Wardrop’s Principle.
Solution: This principle is the basis of user equilibrium: each user will take the route which minimizes their own time resulting in all USED routes eventually having the same travel time – unused routes may have a higher cost.
Problem: When Nash Equilibrium is reached in a transportation network, no traveler can reduce its travel cost by unilaterally changing its route choice.  Use your own words, briefly explain why the Wardrop’s Principle describes Nash Equilibrium in transportation networks.
Solution: \begin{itemize}
    \item All used routes (given an origin-destination pair) have equal cost $\rightarrow$ there is no benefit from changing to a used route.
    \item All unused routes (given an origin-destination pair) have higher or equal cost $\rightarrow$ there is no benefit from changing to an unused route.
\end{itemize}
As such, every user is stuck with the current route choice being the best option.
Problem: Travel from $O$ to $D$ during the middle of the day can be done by highway (car, drive alone) or transit line. The transit fare and the out-of-pocket driving costs (parking, gas…) are $F$ (\$) and $P$ (\$), respectively. The travel times by transit and car are $T$ (hr) and $C$ (hr), respectively. The latter increases with flow, $x$ (cars/hr), as a known function, $C(x)$. The mid-day travel demand (desired flow) from $O$ to $D$ is steady at $q$ (people/hr). We assume that all people value time equally at a rate of $v$ (\$/hr), and they are rational.
\begin{enumerate}
    \item[a.] Define a network equilibrium problem that will identify the equilibrium modal split: (draw the network and label its links and nodes; identify the O/D flow, link flows, and link cost function for each traveler (in terms of \$).
    \item[b.] Write Wardrop’s equilibrium conditions in this context.
    \item[c.] Suppose 50\% of the travelers stay at home if the generalized cost of their trip is greater than $M$ (\$). Define a revised network (links, nodes, link costs and origin/destination table) that will jointly identify the equilibrium trip choices.
\end{enumerate}
Solution: 
\begin{enumerate}
    \item [a.] 

    
    \begin{tikzpicture}
    % Nodes
    \node[circle, draw, minimum size=1.2cm] (O) at (0,0) {O};
    \node[circle, draw, minimum size=1.2cm] (D) at (10,0) {D};
    
    % Edges
    \draw[-, thick, bend left] (O) to node[midway, above] {Transit Cost: $C_T = Tv + F$} (D);
    \draw[-, thick, bend right] (O) to node[midway, below] {Highway Cost: $C_c= C(x)v + P$} (D);
\end{tikzpicture}

\item[b.] 

\begin{align*}
    C(x)v + P &= Tv + F \quad \text{if} \quad 0 < x < q 
    C(0)v + P &> Tv + F \quad \text{if} \quad x = 0 
    C(q)v + P &< Tv + F \quad \text{if} \quad x = q
\end{align*}

\item[c.]  
\begin{figure}
    \centering
    \includegraphics[width=0.5\linewidth]{img/P9_3.png}
    \caption{Updated network}
    \label{fig:P9_13}
\end{figure}
\end{enumerate}
Problem: In designing a simple bus corridor using the standards approach, the optimal stop spacing is the same regardless of whether the door-to-door travel time is minimized for the average or worst-case passenger. True or False?
Solution: False. 

As an example, assume $v_w$ is the walking speed, $s$ is the stop spacing, $l$ is an average travel distance, and $t_d$ is the average vehicle dwell/lost time at each stop.

The worst-case passenger travel time is \( \frac{s}{v_w} + \frac{lt_d}{s}\), and the optimal spacing is
\( s^\ast = \left( l t_dv_w \right)^\frac{1}{2} \),

The average-case passenger travel time is \( \frac{s}{2 v_w} + \frac{lt_d}{s} \), and the optimal spacing \( s^\ast = \left(2 l t_d v_w \right)^\frac{1}{2}
\).

So the optimal spacing varies by a factor of \(\sqrt{2}\).
Problem: While plotting Vickery diagram for individual transportation shuttle system with $0<e<1\le L<\infty$, it is possible that arrival curve $V(t)$, departure curve $D(t)$, and wish curve $W(t)$ all overlap. True or False?
Solution: True – when demand is sufficiently low.
Problem: Suppose there is a two-point shuttle bus system serving passengers with a non-constant arrival rate. All the buses have large enough capacity. To minimize the average waiting time of passengers, the headway between consecutive dispatched should always be equal. True or False?
Solution: False. Normally the optimal headway is inversely proportional to the square root of the demand arrival rate.
Problem: Consider a city served by a fleet of identical taxis, and all customer trip origins/destinations are uniformly distributed across the city. If the operator decides to add more vehicles into the fleet, the average in-vehicle travel time per passenger is always to decrease. True or False?
Solution: False. The average in-vehicle travel time will either remain the same or increase (due to more vehicles/traffic) – as the average in-vehicle travel distance remains the same.
Problem: For a ride-hailing company serving a service region, additional investment that increases the number of operating taxis will always reduce the average passenger waiting time. True or False?
Solution: False. Despite a large number of vehicles, the system can be stuck in an inefficient equilibrium known as the ``wild goose chase" in which the average passenger waiting time increases with the number of fleet (as a larger number of vehicles are in the deadheading state).
Problem: When we use the standards approach to design a simple bus corridor, the optimal stop spacing would be doubled if the door-to-door travel time in the design standards is based on an average passenger instead of the worst-case passenger (while everything else remain the same). True or False?
Solution: False. The optimal stop spacing would increase by a factor of $\sqrt{2}$.
Problem: You are going to design bus networks for two cities of similar size and shape, under the same investment budget. The ideal type of network (Loop, Hub-and-spoke or Grid) for both cities must be similar. True or False?
Solution: False. There are other factors which might affect the ideal network such as demand density, population's value of time.
Problem: Suppose there is a shuttle bus system serving passengers with a constant arrival rate. All the buses have large enough capacity. If we want to minimize the average waiting time of the passengers, the headway between consecutive dispatches should always be equal. True or False?
Solution: True. Total waiting time increases with the square of the headway, so the total waiting time for two unequal headways will be larger than the total waiting time if the two headways instead both take the average value.
Problem: In a dial-a-ride system, if each vehicle alternates between pickups and deliveries while have a target occupancy level of 7 passengers, then on average each passenger experiences 7 pickup-and-delivery cycles until his/her own drop-off. True or False?
Solution: True. Expectation of a geometric distribution, with the probability of success (drop-off) being 1/7.
Problem: A smooth differentiable univariate function $f(x)$ may not reach a local optimum at point $x_0$ even if the first order condition holds at $x_0$, i.e. $f' (x_0) =0$. True or False?
Solution: True. The point may be a saddle point.
Problem: Sufficiently large buses (infinite capacity) are used to provide shuttle service, and we always optimize dispatch frequency based on the demand. As the temporal demand distribution becomes more uneven (i.e., heterogeneous over time, but no change in total number of passengers), the total (agency + user) cost increases. True or False?
Solution: False. With a fixed total demand, time-dependent demand variations actually reduces the total cost, because such demand is easier to aggregate into shared vehicles.
Problem: The agency is trying to decide whether to design a hub-and-spoke network or a grid network to serve a city with uniformly distributed passenger O/D demand. As agency investment (total service route length per unit area) approaches infinity, these two types of networks eventually yield the same expected door-to-door passenger travel time. True or False?
Solution: False. A grid network will yield a lower asymptotic door-to-door passenger travel time.
Problem: If the daily cost for a transportation system to serve a steady demand of rate $\lambda$ [passengers/day] is $ Z= C\lambda^{1.05}$ [\$/day], where $C$ is a constant, then we say this system has ``economies of scale". True or False?
Solution: False. The exponent of $\lambda$ would need to be less than 1, so that increase in $\lambda$ would lead to decrease in cost per unit demand, $Z/\lambda$.
Problem: For all types of transit networks, the average passenger travel time decreases as the total route length per unit area increases. True or False?
Solution: False. For a loop type of network, the longer the route, possibly there could be more passenger in-vehicle riding time due to circuitous routes.
Problem: Under the “Vickrey equilibrium”, the driver who last arrives at the bottleneck always experiences the smallest in-vehicle delay time (at the bottleneck). True or False?
Solution: False. For example, in case the lateness penalty is infinity, and all traveler have the same wished arrival time, then the last driver actually experience the largest in-vehicle delay (but arrives on time).
Problem: The worst-case waiting time of passengers traveling in a two-level hierarchical corridor transit system (with common headway $H$), when they have an appointment at the destination and know the schedule, is $3H$. True or False?
Solution: False. Worst-case waiting at the destination shall be $H$ due to the appointment. The waiting at the transfer is at most $H$ because synchronization is difficult.
Problem: Sufficiently large buses (infinite capacity) are used to provide shuttle services, and we always optimize the dispatch headway based on the demand rate. As the temporal demand distribution becomes more uneven over time (but the total number of passengers remains the same), the total (agency + user) cost increases. True or False?
Solution: False. With a shuttle system, time-dependent demand actually reduces the total cost.
Problem: In a congested point-to-point shuttle system with two competing modes (transit and automobile), when we have passengers using both modes, slightly increasing the transit headway intensifies the competition and decreases an automobile user’s cost. True or False?
Solution: False. Increasing the headway would push more users to drive, and hence increase the automobile driving cost.
Problem: If the daily cost for a transportation system to serve a steady demand of rate $\lambda$ [pax/day] is $ Z= C\lambda^{0.5}$ [\$/day], where $C$ is a constant, then we say this system has ``economies of scale". True or False?
Solution: True. As the demand $\lambda$ increases, the average cost per unit demand $ Z/\lambda$ decreases.
Problem: Consider designing a realistic corridor system without hierarchy to minimize agency cost, subject to a maximum travel time guarantee $T_0$. As the value of $T_0$ increases, the optimal stop spacing should increase as well. True or False?
Solution: True. As guarantee $T_0$ (in the right hand side of a constraint) increases, the design problem has a larger feasible region for stop spacing, while the objective function (agency cost) is a decreasing function.
Problem: In the context of morning commute, under user equilibrium (Vickrey), the virtual arrival curve and departure curve at the bottleneck will be parallel, both with a slope equal to the bottleneck capacity $\mu$. True or False?
Solution: False. The slope of the virtual arrival curve may take other values (depending on the earliness and lateness penalty).
Problem: In a taxi system, assume taxis are uniformly distributed over space. If the number of idling taxis is doubled, the expected distance from a request location to its closest idle taxi will be approximately half of the distance of the original system. True or False?
Solution: False. The expected distance will decrease by a factor of $\sqrt{2}$, not 2.
Problem: It is found that travel demand fluctuations over time in shuttle bus systems do not have a significant impact on the optimal system costs. This is under the assumption that vehicles are large enough to accommodate all commuters. True or False?
Solution: True. That is a key assumption for the above description to hold.
Problem: The average-case in-vehicle travel distance for a passenger in a hub-and-spoke system is the same as the one in a grid system. True or False?
Solution: False. The relative distance ratio is 1 vs. 2/3.
Problem: The piece-wise linearity of the virtual arrival curve $V(t)$ in the Vickrey equilibrium is dependent on the assumption that commuters’ generalized cost is a linear function of congestion delay, earliness, and lateness. True or False?
Solution: True. That is a basic assumption that must hold for the piece-wise linear property.
Problem: When designing a non-hierarchical corridor, transit agencies should decrease their headway by  50\% if the passenger value of time increases by 100\%. True or False?
Solution: False. Headway should decrease by a factor of $\sqrt{2}$, not 2.
Problem: One distinct feature of bus transit in the U.S. is the high operating cost per passenger-mile due to low ridership. True or False?
Solution: True.
Problem: Assume a taxi system operates in a linear city of length L [mile], with passengers’ origins and destinations both uniformly distributed along the line. All vehicles travel at a constant speed v. Passengers arrive according to a Poisson process with rate $\lambda$ [\#/mile-hour], and the dispatcher always immediately assigns a passenger to his/her nearest idle taxi upon arrival. Suppose there are $n$ idle taxis in the system when a passenger arrives, then what is the probability of the passenger waiting more than $a$ units of time (for some $a \ll L/v$ ) until pickup?
Solution: The probability of the passenger waiting more than $a$ units of time (for some $a \ll L/v $) until pickup is  \( P(T > a) = (L-2av)^n \).
Problem: For a sufficiently long bus corridor with fixed demand, does adding new stops in between the current bus stops guarantee improvement to passengers’ average door-to-door travel speed?
Solution: No, adding adding new stops may increase passengers' in-vehicle riding time.
Problem: One shuttle ferry with a maximum capacity of 40 passengers travels back and forth between islands A and B, with a round trip time of 0.5 hour, to serve demand in both directions. During the morning peak, travel demand is constant at 2 passengers per minute from A to B, and 1 passenger per minute from B to A. What is the average occupancy of the ferry from A to B and the average occupancy of the ferry from B to A?
Solution: The average occupancy of the ferry from A to B is 100\% (based on capacity) and from B to A is 75\% (based on demand).
Problem: Suppose you encounter a mathematical problem while designing a bus corridor. The expected total cost is a function of spacing $z\left(s\right)=f\left(s\right)+e(s)$, where $f\left(s\right)=a s^2+\frac{b}{s}$ and $e\left(s\right)=0.05\sin^2{(s)}$, where spacing $s>0$, and parameters $a>100$ and $b>50$. Provide a reasonable estimate of the optimal real total cost $z(s^*)$?
Solution: Based on Daganzo and Ouyang (2019), one such estimate could be:
\[
z(s^*) \approx 	3\ \sqrt[3]{\frac{1}{4}}\ a^\frac{1}{3}b^\frac{2}{3}+0.05\sin^2{\left(\sqrt[3]{\frac{b}{2a}}\right)}.
\]
Problem: In planning a sufficiently long bus corridor with fixed demand, consider the optimal spacing(s) with and without hierarchy. Let $s$ be the optimal spacing without hierarchy, while $s_0$ and $s_1$ be the spacing's of local feeder bus and mainline bus, respectively, within hierarchy. Transfer time/inconvenience is negligible. What is the relation of $s$ to $s_0$ and $s_1$?
Solution: The relation of $s$ to $s_0$ and $s_1$ is as follows:
\[
s_0 <s \,\ \text{and} \,\ s<s_1.
\]
Problem: One shuttle bus (with a capacity of carrying 30 passengers) travels back and forth between a suburban location and the CBD to serve demand in both directions. The travel time each way is 0.15 hour. During the morning, travel demand is constant at 1 passenger per minute from CBD to suburban, and 2 passengers per minute from suburban to CBD. What is the average occupancy of the bus from the CBD to the suburb and what is the flow of passengers served from the CBD to the suburb?
Solution: The average occupancy of the bus from the CBD to the suburb is 60\% and the flow of passengers served from the CBD to the suburb is 60 passengers/hour.
Problem: The off-ramp of a freeway is congested during 7 – 9 am due to the presence of 2N identical commuters. The wish curve $W(t)$ and the observed departure curve $D(t)$, with respect to this ramp, are given by the following functions:
\begin{align*}
W\left(t\right)&=\frac{N}{2}{(t-7)}^2 \quad t\in[7,\ 9] 
 D\left(t\right)&=N\left(t-7\right) \quad t\in[7,\ 9]
\end{align*}

Under Vickery equilibrium (with $0 < e=0.5 < 1\leq L$), what is the maximum commuter queuing time?
Solution: This is a case where the lateness penalty must be infinity. The answer is 60 min. \\
Problem: A transit agency is trying to minimize the total service miles subject to a given budget. Find the optimal spacing $s$ of the following problem. Use $A=10, \,\ B=40, \,\  C=9,\,\ D=1 \text{ and } M=6$.

\begin{equation*}
\begin{aligned}
\min_{s} \quad & \frac{A}{s} + \frac{B}{s^2}
 \textrm{s.t.} \quad &  Cs +\frac{D}{s} \leq M
   & s \geq 0    
 \end{aligned}
\end{equation*}
Solution: Note that the first constraint, based on Cauchy Inequality, has to take equality sign. This forces that s=1/3 as the only feasible solution. 
The optimal spacing is $s^*=\frac{1}{3}$.\\
Problem: A linear city of length 3L is equally bisected by a wide river of length L. Put along the positive direction of an x-axis, its two halves $[0, L]$ and $[2L, 3L]$ are connected through a bridge $[L, 2L]$. Passengers' origins are uniformly distributed (both spatially and temporally) in the residential area ($x\in[0,L]$), and their destinations are uniformly distributed in the CBD area ($x\in[2L,3L]$). An on-call van starts from a depot at the left end of the city ($x=0$) and travels back and forth in the residential area to pick up $n$ customers before heading to the CBD. Upon delivery, the vehicle heads back to the depot to refuel. Ignore the stopping time needed for passenger pick-ups and drop-offs. Suppose that the simple-minded van driver picks up and drops off passengers strictly on the First-Call-First-Served (FCFS) basis, what is the van’s expected travel distance per round trip?
Solution: Track the sequence of travel legs, each with expected length of $L/2$ or $L/3$ or $2L$ depending on the origin/destination pair.
The van’s expected total travel distance per round trip is $\left( \frac{2n+13}{3}\right)L$.\\
Problem: A taxi driver has just decided to serve one last passenger before heading home. At the moment, this driver is inside a linear residential area of length W. In this area, there are N randomly distributed passengers. The driver will pick up the nearest one passenger. Find the Pr(the distance to pick-up the nearest one passenger $> a$) for some $a\ll W$?
Solution: Note independence across passenger locations. Each passenger is at least $a$ distance away from the taxi with a probability of approximately $1- \frac{2a}{W}$. Then,
Pr(the distance to pick-up the nearest one passenger $> a$) \(  \approx \left( 1- \frac{2a}{W}\right)^N\).
Problem: A realistic homogeneous transit corridor (e.g., finite speed limit, non-zero stopping penalty, non-zero headway) was optimally designed to minimize agency cost under a single standard. A few years later (now), the passengers’ value of time (e.g., the shadow price of the standard) is about 20\% higher than the original value, while the demand density has increased by 20\% as well. Nothing else changes. If we optimize the system design again under the same standard, by what percentage would the optimal headway approximately change?
Solution: If we optimize the system design again under the same standards, the optimal headway approximately changes by $\sqrt{2}-1=44$\%.
Problem: Considering the “Vickery Equilibrium”, how many and which of the following statements are false?
\begin{enumerate}
    \item The wish curve directly shows the travelers’ wished times to arrive at their final destinations.
    \item The equilibrium condition postulates that no driver is better off by unilaterally changing its arrival time at the bottleneck.
    \item The driver who arrives last at the bottleneck always experiences the smallest in-vehicle delay.
    \item As the wish curve becomes highly non-linear, there may be more than one critical driver (one who arrives at its destination as wished).
    \item If the penalty for lateness and that for earliness are equal, then the slope of the virtual arrival curve for early and late drivers will be equal as well.
\end{enumerate}
Solution: Three of these statements (the 1st, 3rd, and 5th) are false.