Every day, more than 40 container ships pass through the Panama Canal. They chug over the narrow isthmus separating the Atlantic and Pacific oceans, navigating three sets of multi-chambered locks that carry them uphill to an enormous lake 90 feet above sea level. After crossing that, another network of locks lowers them to the opposite coast.

The trip, which can take a full day depending on traffic, requires the careful choreography of skilled freighter pilots, tugboats, and the immense doors that separate each lock. As with most things these days, software keeps everything moving smoothly, but this most impressive feat of civil engineering relies upon a hodgepodge of systems added piecemeal over the decades. Today, the Panama Canal gets a system upgrade.

New vessel management software will coordinate arrival times, lock and tug availability, and the crew needed to run it all. The goal is to reduce the time ships spend waiting, and increase the efficiency of the 48-mile canal by getting more ships through the locks. “It’ll make a huge difference,” says Arnoldo Cano, the canal’s program manager for renewal of core maritime systems. “We’re replacing all these legacy systems with a single integrated planning and scheduling system.”

A view from inside the Panama Canal’s Marine Traffic Control. The Panama Canal Authority

The canal, which opened in 1914 after three decades of construction, remains one of the world’s great engineering feats. Just think about what's entailed in getting a shipping container across a spit of land that wide. “The Panama Canal is really really a trench through a mountain range, and most of the canal operates by having the vessels navigate through a lake 90 feet above sea level,” says Cano. It saves ships a 3,000 mile journey around the southernmost tip of South America.

For years, the Canal featured three locks on each side of Gatlun Lake, each of them 100 feet wide and 1,000 feet long. Shipbuilders built “Panamax” container ships just small enough to squeeze through the locks. The demands of global trade required larger ships, and so the Panama Canal Authority started construction of two sets of larger locks in 2007. The locks, which opened in June, that measure 180 feet wide and 1,400 feet long—large enough for the new generation of "Neopanamax" freighters.

Aerial shot of the new Agua Clara Locks (left) and the original Gatun Locks (right). The Panama Canal Authority

Planners schedule ships based on a slew of factors include the nature of their cargo, their arrival time, and whether they booked passage ahead of time. Boats with deeper drafts require more water in the locks, increasing transit time. Locks may be down for maintenance. All of these things must be perfectly choreographed. “It’s a very complicated process that has to be orchestrated like clockwork,” says Cano. Humans can manage that process about 48 hours into the future. The new system, developed by Dutch supply chain company Quintiq, can plan weeks ahead using algorithms and modeling to optimize every route for every ship.

Because there is a range of older software in use, most of the infrastructure needed for a smart update is already there. There’s a mission control center in Panama City watching the locks with big screens on the front wall, not unlike NASA’s in Houston. Vessels are tracked with GPS, and there are high speed data cables throughout. In the future the Integrated Operational Planning System (which will get a better name before it’s fully operational), will chew on all that data, and spit out a daily operating plan. And keep the canal traffic moving smoothly for another century.