The 5 Stages of a System Breakdown on NJ Transit

Pranav Badami
Towards Data Science
8 min readApr 17, 2018

--

This article is part of an ongoing collaboration between Michael Zhang and me analyzing real-time NJ Transit data that we’ve been scraping. You can find the introductory article here and the previous article here.

On Friday, March 2nd, 2018, New York City was on the tail end of the first of four Nor’easters to sweep through the region in March. A wintry mix had been steadily falling from the previous night through the early afternoon, accompanied by gusty winds in the late morning hours.

As I wrapped up my day at work and headed to New York Penn Station for my commute home, I became increasingly worried as texts from friends and family informed me that NJ Transit service was heavily backed up.

An ominous screenshot of Departure Vision for New York Penn at 4:39 pm on 3/2/18. Note the “STATUS” column.

Nothing could have prepared me for my actual arrival at Penn Station, where a literal mass exodus of frustrated commuters flooded out onto 7th Avenue. The NJ Transit system had completely broken down and 9 trains were simultaneously cancelled, followed by several more slightly after, due to weather related complications.

While these sorts of massive, system-wide breakdowns are rare, they leave a dramatic imprint on the memories of thousands of commuters who had their entire day or weekend ruined. Let’s take a look at the impact of this service breakdown: the following plots show how delayed each of the NJ Transit trains scheduled in and out of New York Penn Station was on March 2nd.

Each dot is a train colored by delay severity. Note the symmetry in volume about hour 14 or 15. (Left: Inbound trains into New York Penn, Right: Outbound trains from New York Penn)

The lateness of trains into New York Penn is determined by their cumulative delay up to New York Penn (their last stop), while the lateness of trains out of New York Penn is determined by their delay getting to their first stop. Of the 32 trains scheduled to depart from New York Penn between 5 pm and 7pm, 18 trains were cancelled and several others heavily delayed.

How did the system end up in this state? What happened to cause this and what were the resulting system dynamics that resulted in this breakdown? We can examine the data to visualize how the system reacts to an interruption and identify distinct phases that lead to system breakdowns.

Visualizing the NJ Transit system in action

For the uninitiated, the NJ Transit system is a non-cyclical rail network that services 162 train stations in New Jersey and connects travelers to New York Penn Station. As a reference, here is a zoomed in system rail map, capturing the stations around New York Penn Station, including Newark Penn Station, Secaucus Junction (Upper Level), Newark Broad St, and Hoboken:

Abbreviated NJ Transit system map. Pink inset: The stations we will focus on. Note the overlap at Secaucus Junction, where the lines crossing above stop at Secaucus Upper Level; the lines crossing below stop at Secaucus Lower Level.

As a result of many line intersections and high volume to New York Penn Station, this region of NJ Transit operations has complex system dynamics that affect tens of thousands of people everyday.

We’ll investigate the March 2 system breakdown by focusing on this stretch of track because the catalyzing service interruption (covered later) occurred between Newark Penn Station and Secaucus Junction; also, the high volume of trains will demonstrate system dynamics at play.

Phase 1: The Calm Before (or During) the Storm

Let’s begin our analysis by looking at the state of the system on the morning of March 2, as it dealt with persistent freezing rain starting the night before. The system found some stability immediately following the morning rush hour, after dealing with a handful of minor service interruptions earlier in the morning due to broken down trains and Amtrak track maintenance.

The following animation shows the behavior of the system as scheduled on the left versus the actual observed behavior on the right. Stop-level train data gathered by our scraper is converted into a stateful data structure, from which train positions are then interpolated and animated.

System animation at 10 am. Each dot here corresponds to a train. Left: Scheduled trains, Right: Observed trains. Stations: NWP (Newark Penn), SEC (Secaucus Upper Level), NYP (New York Penn), ND (Newark Broad St), HOB (Hoboken)

Trains are traveling at roughly the same average velocity between stops. Further, we see that trains are departing out of the New York Penn origin very close to their scheduled departure time. For the moment, the system is stable.

Phase 2: Something Breaks

As the day progressed into the early afternoon, precipitation from the storm began to tail off and was replaced by gusty winds. Then, this happened:

An overhead wire between Newark Penn and Secaucus Junction went down in the early afternoon. Overhead power lines that supply electricity to trains along their journey are one of the more vulnerable parts of fixed rail infrastructure, as they are susceptible to damage from high winds and constant wintry precipitation.

In this case, we see that winds really picked up in the region around the time the wire went down. Here’s the wind data for Newark, NJ on March 2:

Wind speed in Newark on 3/2/18 (courtesy of the Time Machine on darksky.net)

Despite the tweet above being timestamped 4:47 pm, several trains were cancelled earlier in the afternoon due to inclement weather; for the purpose of this analysis, we’ll assume that the wire went down between 1 pm to 2 pm. This down wire caused only a single track to be available for a limited stretch between Newark Penn and Secaucus (according to announcements I heard from NJ Transit). Let’s see how the affected part of the system reacted to this service interruption moving forward.

Phase 3: Queueing

The early afternoon is generally a relatively slow period of the NJ Transit service cycle but, as the late afternoon approaches, the number of trains both into and out of New York Penn starts growing rapidly. As a simplifying assumption, we can state that enough trains need to arrive at New York Penn in the late afternoon such that they can be reused to service the evening commute out of New York Penn. The exact configuration of these trains is unclear, but we see that the schedule aims to maintain an equal number of trains going into and out of the terminal.

On March 2, however, due to the downed wire between Newark and Secaucus, trains in either direction between these stations had to share a single track. Trains slow to a crawl heading towards New York Penn as they are held in a queue, while earlier trains use the single track.

System animation at 4 pm. Note the queueing trains heading towards NWP at 4:00 pm.

Phase 4: Cancellations

Let’s examine the effect of prior service interruptions and queueing on the number of trains that have arrived at New York Penn. To do this, we’ll look at the difference in cumulative number of trains arrived into New York Penn versus the cumulative number of trains that were scheduled to depart out of New York Penn up to any given point. In effect, this is the number of trains available at New York Penn to service the scheduled outgoing demand at any given point. Again, this may be a simplifying assumption of how the system works, but it captures its general behavior.

The cumulative difference between how many trains have arrived to New York Penn, versus how many have been scheduled to go out. The “actual” line incorporates observed delays and cancellations on 3/2/18.

In the graph above, when the “scheduled” (blue) line diverges from the “actual” (orange) line and recovers later in the day, this indicates delays caused by queueing. The “actual” line shows us that, at 6:30 pm on March 2, the number of trains scheduled to depart from New York Penn eclipsed the number of trains that had arrived at New York Penn. Also, cancellations earlier in the day are reflected by a sharp dip in the number of reserve trains around 2 pm.

If all had gone according to schedule, 9 trains would have been available at New York Penn at 6:30 pm to service the tail end of the commute. Instead, earlier cancellations and queuing between 4pm and 6pm made the system fall severely behind. At precisely 6:29 pm, our scraped data shows that NJ Transit simultaneously cancelled, you guessed it, 9 trains out of New York Penn. The system appears to depend on having enough trains in “reserve” at a terminal to meet outgoing demand.

Phase 5: Resolution

This bulk cancellation at 6:30 pm was precisely when I found myself entering Penn Station on March 2. While I can empathize with how frustrated commuters were with the cancellations, I see now that NJ Transit physically might not have had enough trains in the yard at Penn Station to service the complete evening schedule. The bulk cancellations at 6:30 pm essentially served as a mechanism for the system to catch-up to outgoing demand.

Later in the evening, queueing is still present and there’s a lot of residual train traffic in the affected stretch of track, but trains are going both into and out of New York Penn again. We can visualize the system around 8:30 pm to see the sluggish recovery:

System animation around 8:30 pm.

Takeaways

This major service interruption impacted the performance of the system from roughly 12 pm to 9 pm on March 2. Thousands of commuters were stranded and had to find alternate ways to get home after the bulk cancellations.

Analyzing the system response after the downed wire between Newark and Secaucus reveals perhaps why there was a lack of available trains at New York Penn Station. Based on incoming supply and outgoing demand, it was apparent that there simply weren’t enough trains at least an hour or so before the bulk cancellations were officially announced.

I have lots of sympathy for NJ Transit in these situations. They are under tremendous pressure from factors not in their control, namely the weather, Amtrak infrastructure, and a lack of funding. As a starting point, here are a couple things I think NJ Transit could do to mitigate the frustrations of commuters when it comes to large scale delays:

  • Severe weather scheduling: While the Nor’easter was forecasted to reduce in precipitation intensity on March 2, perhaps NJ Transit could have opted to use their Severe Weather Level 1 alternate schedule due to forecasted high winds.
  • Warn commuters of a looming breakdown: The NJ Transit Twitter sends automated tweets when trains are cancelled or delayed heavily. In a case such as March 2, the Twitter page could warn customers of degrading conditions system-wide and encourage travelers to make different plans. It’s not clear that bulk cancellations are about to happen from tweets about individual trains.
  • Provide commuters a way to look at the state of the system as a whole (similar to the animations in this article): Commuters would be aware of the magnitude of the problem and have a realistic sense of how long it will take to resolve.

In any case, it’s clear that infrastructure improvements are much needed, especially in crucial, high-volume stretches of track. Without funding and more resilient infrastructure, we can expect these 5 phases to repeat themselves time and again.

If you enjoyed this bit of analysis, please 👏 this article below. Also, follow my Medium profile, as well as Michael Zhang, to get access to this data (soon!) and read more NJ Transit analysis in the coming months! Thank you!

--

--