This story was originally published in October 2016, in the days leading up to Hurricane Matthew’s near-landfall in North Carolina. We’ve updated it with new details on Hurricane Florence.

All along the mid-Atlantic coastline, state officials are working to prepare for Hurricane Florence, which is set to make landfall in the region on Thursday evening or Friday morning. Soon, most of the roads will lead away from ocean, in a turn traffic engineers call “contraflow,” the volte-face of normal traffic. This means that both sides of the roads, vehicles will only run one way—away from the hurricane.

As the Category 4 storm strengthens over the Atlantic Ocean, with winds now topping 130 mph, local and state officials urged over 1.25 million Americans to leave their homes before it hits the coast and, possibly, makes its way inland, dumping colossal amounts of rain as it goes.

“We are in a very deadly and important game of chess with Hurricane Florence, and what Team South Carolina is doing is trying to stay one step ahead,” South Carolina's governor, Henry McMaster, said during a press conference. “It takes 36 to 48 hours to evacuate the coast.”

Local governments are directing the exodus via TV, radio, and social media. They have set up online tools and printed multi-language leaflets.

These evacuation plans aren't random, nor hastily cobbled together. People are moving mostly without panic, with efficiency—thanks to years of inter-agency cooperation, modeling and simulating, decades of flood mapping and highway data, and a heavy dose of psychology.

The Big Plan

No single federal agency wrangles evacuations, so it’s generally up to local governments to set out their own contingency plans. But they're hardly on their own. That means the bureaucrats have to do something they kind of loathe: collaborate.

The list of possible planning frenemies is long: federal agencies like the Federal Highway Administration, FEMA, Centers for Disease Control and Prevention, and the FBI; state departments of transportation; public utilities; private towing operators; trucking organizations and paratransit operators; and the organizations that know locals best, like food banks, animal shelters, and homeless advocates. Together, they create evacuation plans to fit the needs and peculiarities of each community.

To select the exit routes months or even years before hurricane season, transportation planners turn to flood maps and atmospheric modeling. They predict hazards: wind, storm surge, freshwater flooding. They rely on traffic counts and experience to predict if and when residents will decide to finally leave their homes, and how.

Evacuees are fairly predictable, says Brian Wolshon, a transportation engineer with Louisiana State University who studies evacuation. There's the cautious minority that gets out quick. And there's the rabble scurrying about town picking up the necessaries—cash, food, water—snarling traffic before the mandatory evacuation begins. After a day or so, this majority takes to the roads in a rush.

The planners build computer simulations of their predictions, and tinker with the variables—down to the traffic signals at specific intersections—to speed up the process. With a few days’ notice, some regions choose to evacuate in waves, asking those living at low elevations to depart hours or even days before inland residents.

Options breed confusion, so officials sacrifice free will (and comfort) to keep traffic moving, Wolshon says. "It’s kind of like moving cattle—you don’t want people thinking."

Rural regions often direct their residents toward one major highway, physically blocking off smaller roads. This undoubtedly results in jams, but some officials would rather have their populations—with their attendant gas, medical, and food needs—bunched together than spread throughout the hinterlands. Metropolitan areas are more likely to shut down entire stretches of interstate, forcing cars onto side roads until they converge on bumper-to-bumper congestion miles from a flood zone.

A hurricane above Category 3 hasn’t made landfall in the Carolinas since Fran hit in 1996. So, yes, populations have changed, new subdivisions have sprung up, and infrastructure has aged. But evacuation plans haven't gone untested. Transportation experts sometimes run experiments during more frequent and less high-stakes occasions, like after sporting events. They test theories about traffic signals, contraflow, and generally getting tons of people out of one place.

Getting Everybody Out

But stragglers always remain. Some have trouble finding any transportation all, though since Katrina devastated the Gulf Coast in 2005, hurricane-prone states have done a better job of identifying and helping these populations. But some people just don't want to leave.

Researchers know residents' decisions to depart correlate with officials' warnings and with what their neighbors do. That's why planners look for buy-in from trusted community leaders, and why governments tend to fire up their rhetoric. A mayor of a coastal Texas city once gave die-hard stay-ers permanent markers to write their Social Security numbers and next of kin on their arms or stomachs—so those retrieving their bodies after the storm could identify them.

When There’s No Big Plan

It's true that not every town has a solid evacuation plan. No federal rules require communities to come up with them, and sometimes small municipalities can't muster the funding to create a robust evacuation framework. (The Department of Homeland Security's National Hurricane Program does provide some technical assistance.) And evacuation planning never ends, because regions evolve. If more immigrants move in, a town might need more interpreters on hand; if a population ages, it might need more buses to get those who can't drive out ahead of the storm.

Meanwhile, storms are getting worse. "We recognize the climate is changing. We’re having more devastating storms," says John Renne, a transportation planner with Florida Atlantic University. "How do we beef up our infrastructure so we’re not caught with our guard down?"

Fortunately, the states in Fran’s bullseye—particularly the Carolinas—are used to hurricane threats. They already have good plans in place, and this week's storm will make them even smarter. "I haven’t sent any of my students into a hurricane on purpose, but we do get sensor data about the number of vehicles on the road," says Pamela Murray-Tuite, a Virginia Tech civil engineer who works on evacuation modeling. Because Florence won't be the last of its kind to threaten these places.

More Great WIRED Stories