Line Haul at DS.jpeg
Amazon Transportation Services' Middle Mile team “has made longstanding contributions to operations research and analytics for decades, and their impact has been widely noted and recognized,” said Erica Klampfl, 2021 INFORMS Prize committee chair.
Credit: AboutAmazon.com

How Amazon's Middle Mile team helps packages make the journey to your doorstep

The Middle Mile team manages complexity and scale in making routing decisions across the company’s expansive transportation network.

Amazon Transportation Services’ Middle Mile team develops routing solutions to move customer orders from its vendors and fulfillment centers to its network of sortation centers, air facilities, and delivery stations in the most efficient way possible.

Watch Amazon's trucks line up outside a facility

Over the past five years, the team has played a critical role in helping Amazon deliver on increasingly ambitious goals — from two-day and one-day deliveries for Prime customers, to one-hour delivery windows for services like Prime Now.

Recently, INFORMS, the leading international association for operations research and analytics professionals, recognized these achievements by awarding Amazon the 2021 INFORMS Prize. The award recognizes the effective integration of operations research and analytics into organizational decision making.

The INFORMS prize logo is shown atop the Amazon logo
The INFORMS prize "is awarded for effective integration of advanced analytics and operations research/management sciences (OR/MS) in an organization."
INFORMS.org

“Amazon has made longstanding contributions to operations research and analytics for decades, and their impact has been widely noted and recognized,” said Erica Klampfl, 2021 INFORMS Prize committee chair. “Amazon is truly deserving of this prestigious prize, and the entire O.R. and analytics community joins INFORMS in thanking them for all they have done and continue to do.”

Over the past five years, the team has doubled down on scientific innovation and operations research to move millions of packages globally through Amazon’s transportation network. The INFORMS award serves as a reminder not just of the work the Middle Mile team has done at Amazon, but also how far they have come.

An extremely complex problem

Given the high number of variables involved in arriving at optimal routing decisions, complexity is a constant for Amazon’s Middle Mile team.

For every customer order, Amazon’s routing algorithms must determine the best path through the network to move the product between suppliers, fulfillment centers, sorting facilities, and delivery stations, to quickly, safely, and cost-effectively reach customers.

They must evaluate the merits of each transportation option — surface, rail, air, or maritime — and determine the most effective route.  The algorithms also determine an optimal or near-optimal route to send the order to a facility where it can be sorted and handed off for delivery. Finally, all schedules have to be designed in a way that optimizes for safety and complies with government regulations such as rest breaks, hours of service, and other requirements.

Our trucking network alone presents us with over ten octovigintillion possible routing solutions.
Tim Jacobs

“To give you an idea of the scale and complexity we’re managing, our trucking network alone presents us with over 1088 or ten octovigintillion — possible routing solutions,” says Tim Jacobs, director of Middle Mile Research Science and Optimization. “This is an especially large number, when you consider that there are 1082 atoms in the visible universe.”

And that’s just for the trucking network.

When a product is ordered on the Amazon Store, there are several ways it can make its way from a fulfillment center to the customer’s residence.

There’s the (relatively) straightforward approach: The product is sent from a fulfillment center to a sortation center and to a delivery station, at which point it is placed on a vehicle for delivery to the customer’s residence.

There are also more involved scenarios, such as when customers place time-sensitive orders for items stored in geographically distant fulfillment centers. In these cases, the products are often delivered using a combination of Amazon’s air cargo network along with the surface network to meet the customer’s delivery timelines.

When Jacobs joined Amazon in 2016, the majority of the company’s loads were carried by a relatively small number of large third-party carriers that managed the truck assignments and routings. Since then, the Middle Mile team has helped to develop new ways to manage its transportation network, including by routing a growing number of medium and small carriers using Amazon’s own technology and algorithms, enabling more efficient management and visibility of the transportation network, which in turn helps Amazon get packages to customers faster and more efficiently.

That effort began, in part, by expanding the team.

In the beginning: Improving Amazon’s surface operations

In 2016, Mauricio Resende was among just a few scientists in Amazon’s Middle Mile team — a number that has since grown significantly.

Prior to Amazon, Resende worked as a scientist at AT&T Labs focused on combinatorial optimization. At its essence, combinatorial optimization involves using mathematical methods to identify the best decisions for a problem from a large set of candidate solutions.

“In 2016, Amazon’s surface routing decisions were made using a basic local search algorithm,” Resende says. “Loads were allocated in advance. The process was largely iterative, and we drove small improvements to the algorithm week over week.”

Tim Jacobs, director of Middle Mile Research Science and Optimization; Mauricio Resende, principal research scientist; and Nilay Noyan, principal research scientist
Named among others in Amazon's 2021 INFORMS Prize were (from left) Tim Jacobs, director of Middle Mile Research Science and Optimization, Mauricio Resende, principal research scientist, and Nilay Noyan, principal research scientist.

Crucially, in order to automate routing decisions, the algorithms and systems needed to account for differing constraints and inputs that have a profound impact on routing decisions, such as the nuances of different regulatory agencies in each country.

The system also needed to understand the storage and throughput constraints of each facility by considering factors like operating hours or whether parking slips might be required. So, the team worked to model and eliminate those system blind spots.

“We developed more advanced data structures and algorithmic techniques to account for these constraints as we designed routing schedules,” says Resende.

Resende provides the example of a sequence evaluator designed by Amazon’s Middle Mile research team. The evaluator was designed to help find the most effective routing solution for a pre-determined objective function, such as cost, or number of trips with empty loads.

The evaluator computed the cost for a presented route. It kept working through possible changes to the route until a near-optimal route was found. This solution was then perturbed — routes were deliberately eliminated and new deliveries were fed into the algorithm. The task was then repeated. In this manner, the algorithm progressed toward an iteratively better solution.

Through methods such as these, Resende and his fellow researchers drove a significant reduction in surface transportation costs.

When you are working with such a large universe of possibilities, you have to be incredibly efficient in how you formulate the problem.
Mauricio Resende

“When you are working with such a large universe of possibilities, you have to be incredibly efficient in how you formulate the problem,” says Resende. “You then have to be efficient in designing algorithms to solve that formulation of the problem.”

The Middle Mile team also faced situations where it had to route goods that hadn’t been accounted for in the demand forecasts that are an input to its routing plans. While future demand can be predicted, there are still many unknowns at the planning stage. A good example is spikes in demand for new products, or products that become unexpectedly popular.

To cope with demand variability, the Middle Mile team developed a truckload supply load board with dynamic pricing. The load board, powered by a number of machine learning algorithms coupled with mathematical optimization models, allowed Amazon to expand its delivery network by accessing the available capacity of pre-screened carriers operating in a geographical area or lane.

The load board dynamically sets prices for loads that are currently available. Carriers can review available loads simultaneously. Interested carriers can then accept the load at the offered price in real-time. This arrangement also helps carriers optimize the efficiency of their drivers’ schedules.

As Amazon drove improvements to its surface network, the Middle Mile team also leveraged scientific innovation to design routing solutions for its air cargo service, which has expanded rapidly since launching in 2016.

Developing algorithms to manage Amazon’s fleet of contracted airline partners

Nilay Noyan joined the company as a principal research scientist in September 2019. Prior to Amazon, Noyan was a professor of industrial engineering at Sabanci University in Istanbul.

Broadly speaking, the air routing problems are similar to those for surface networks. However, there are completely different constraints associated with airlines.
Nilay Noyan

“Broadly speaking, the air routing problems are similar to those for surface networks,” says Noyan. “However, there are completely different constraints associated with airlines.”

These include regulatory constraints, lead times for procuring aircraft, the impact of fluctuating fuel prices, and resources required to manage airline contracts. Flight schedule designs also need to ensure that there is sufficient time for routine line maintenance, airplane refueling, and the loading and unloading of packages.

Arrival and departure times must be aligned with available capacity and resources to ensure packages are processed on time. To further complicate matters, airline schedules have to be aligned with those of the surface network so there are trucks waiting on the ground to carry packages to the next destination.

Over the past four years, the Middle Mile Planning Research and Optimization Science team has developed and implemented more than a dozen optimization and machine learning models to build and operate the air transport network. These tools help the team arrive at the most optimal decisions in areas such as flight schedule design, fuel management, package flow planning, maintenance planning, and disruption recovery.

Noyan says machine learning also plays an important role in helping the Middle Mile team solve for problems that are inherently stochastic or unpredictable in nature.

Amazon Prime Air Boeing 767
Over the past four years, the Middle Mile Planning Research and Optimization Science team has developed and implemented more than a dozen optimization and machine learning models to build and operate the air transport network.
Chad Slattery

“Deviations from the execution plans are unavoidable in case of unexpected disruption events due to weather, unscheduled maintenance, and crew-related delays,” says Noyan. “Machine-learning-based prediction methods help us react to these unexpected situations, and adapt quickly so that we can meet our delivery promises to customers.”

In addition to helping Amazon adapt to unpredictable events, Jacobs sees machine learning playing an increasingly important role in helping Amazon more effectively unify the worlds of surface, air, rail and maritime networks for both network design and day of operations.  

“At Amazon, we work back backwards from the customer,” he says. “We don’t think of each mode of transport separately, as is common in the industry. Instead, we are continually working to combine these areas effectively, so that the way we plan and the way we operate the network are consistent.”

View from space of a connected network around planet Earth representing the Internet of Things.
Sign up for our newsletter

Related content

US, Virtual
The Amazon Economics Team is hiring Interns in Economics. We are looking for detail-oriented, organized, and responsible individuals who are eager to learn how to work with large and complicated data sets. Some knowledge of econometrics, as well as basic familiarity with Stata, R, or Python is necessary. Experience with SQL, UNIX, Sawtooth, and Spark would be a plus. These are full-time positions at 40 hours per week, with compensation being awarded on an hourly basis. You will learn how to build data sets and perform applied econometric analysis at Internet speed collaborating with economists, data scientists and MBAʼs. These skills will translate well into writing applied chapters in your dissertation and provide you with work experience that may help you with placement. Roughly 85% of interns from previous cohorts have converted to full time economics employment at Amazon. If you are interested, please send your CV to our mailing list at econ-internship@amazon.com.
US, WA, Seattle
Amazon internships are full-time (40 hours/week) for 12 consecutive weeks with start dates in May - July 2023. Our internship program provides hands-on learning and building experiences for students who are interested in a career in hardware engineering. This role will be based in Seattle, and candidates must be willing to work in-person. Corporate Projects (CPT) is a team that sits within the broader Corporate Development organization at Amazon. We seek to bring net-new, strategic projects to life by working together with customers and evolving projects from ZERO-to-ONE. To do so, we deploy our resources towards proofs-of-concept (POCs) and pilot programs and develop them from high-level ideas (the ZERO) to tangible short-term results that provide validating signal and a path to scale (the ONE). We work with our customers to develop and create net-new opportunities by relentlessly scouring all of Amazon and finding new and innovative ways to strengthen and/or accelerate the Amazon Flywheel. CPT seeks an Applied Science intern to work with a diverse, cross-functional team to build new, innovative customer experiences. Within CPT, you will apply both traditional and novel scientific approaches to solve and scale problems and solutions. We are a team where science meets application. A successful candidate will be a self-starter comfortable with ambiguity, strong attention to detail, and the ability to work in a fast-paced, ever-changing environment. As an Applied Science Intern, you will own the design and development of end-to-end systems. You’ll have the opportunity to create technical roadmaps, and drive production level projects that will support Amazon Science. You will work closely with Amazon scientists, and other science interns to develop solutions and deploy them into production. The ideal scientist must have the ability to work with diverse groups of people and cross-functional teams to solve complex business problems.
US, WA, Seattle
Amazon internships are full-time (40 hours/week) for 12 consecutive weeks with start dates in May - July 2023. Our internship program provides hands-on learning and building experiences for students who are interested in a career in hardware engineering. This role will be based in Seattle, and candidates must be willing to work in-person. Corporate Projects (CPT) is a team that sits within the broader Corporate Development organization at Amazon. We seek to bring net-new, strategic projects to life by working together with customers and evolving projects from ZERO-to-ONE. To do so, we deploy our resources towards proofs-of-concept (POCs) and pilot programs and develop them from high-level ideas (the ZERO) to tangible short-term results that provide validating signal and a path to scale (the ONE). We work with our customers to develop and create net-new opportunities by relentlessly scouring all of Amazon and finding new and innovative ways to strengthen and/or accelerate the Amazon Flywheel. CPT seeks an Applied Science intern to work with a diverse, cross-functional team to build new, innovative customer experiences. Within CPT, you will apply both traditional and novel scientific approaches to solve and scale problems and solutions. We are a team where science meets application. A successful candidate will be a self-starter comfortable with ambiguity, strong attention to detail, and the ability to work in a fast-paced, ever-changing environment. As an Applied Science Intern, you will own the design and development of end-to-end systems. You’ll have the opportunity to create technical roadmaps, and drive production level projects that will support Amazon Science. You will work closely with Amazon scientists, and other science interns to develop solutions and deploy them into production. The ideal scientist must have the ability to work with diverse groups of people and cross-functional teams to solve complex business problems.
US, MA, Westborough
Are you inspired by invention? Is problem solving through teamwork in your DNA? Do you like the idea of seeing how your work impacts the bigger picture? Answer yes to any of these and you’ll fit right in here at Amazon Robotics. We are a smart team of doers that work passionately to apply cutting edge advances in robotics and software to solve real-world challenges that will transform our customers’ experiences in ways we can’t even imagine yet. We invent new improvements every day. We are Amazon Robotics and we will give you the tools and support you need to invent with us in ways that are rewarding, fulfilling and fun. Amazon Robotics is seeking interns and co-ops with a passion for robotic research to work on cutting edge algorithms for robotics. Our team works on challenging and high-impact projects, including allocating resources to complete a million orders a day, coordinating the motion of thousands of robots, autonomous navigation in warehouses, identifying objects and damage, and learning how to grasp all the products Amazon sells. We are seeking internship candidates with backgrounds in computer vision, machine learning, resource allocation, discrete optimization, search, and planning/scheduling. You will be challenged intellectually and have a good time while you are at it! Key job responsibilities • Identifying creative solutions for challenging research problems in robotics and computer vision • Developing software solutions to test hypotheses and demonstrate new functionality • Prototyping concepts to collect data and measure performance • Writing code and unit tests and integrating code with other software and hardware components • Utilizing Amazon Robotics and Amazon engineering tools, processes and technologies • Delivering a final presentation to managers and engineers on the successes and challenges of their internship and the business value they have contributed
US, CA, Palo Alto
The Amazon Search team creates powerful, customer-focused search solutions and technologies. Whenever a customer visits an Amazon site worldwide and types in a query or browses through product categories, Amazon Search services go to work. We design, develop, and deploy high performance, fault-tolerant distributed search systems used by millions of Amazon customers every day. We’re seeking a Principal Scientist with a deep expertise in Search Science. Your responsibilities will include everything from developing and prototyping innovative machine learning, and deep learning algorithms to implementing, testing, and supporting full solutions in a production environment. We are looking for innovators who can contribute to advancing search technology on what’s scientifically possible while remaining committed to creating world-class products. Joining this team, you’ll experience the benefits of working in a dynamic, entrepreneurial environment, while leveraging the resources of Amazon.com (AMZN), Earth's most customer-centric company one of the world's leading internet companies. We provide a highly customer-centric, team-oriented environment in our offices located in Palo Alto, California. Key job responsibilities As a hands-on leader of this team, you’ll be responsible for defining key research questions, identifying relevant data, adopting or proposing innovative machine learning solutions conducting rigorous experiments, publishing results and working with the engineering team to deploy these solutions. As a strategic leader, you will identify investment opportunities, develop long term strategies, and propose, prioritize and deliver on goals. You’ll also participate in organizational planning, hiring, mentorship and leadership development. You will be technically fearless and with a passion for building scalable science and engineering solutions. You will serve as a key scientific resource in full-cycle development (conception, design, implementation, testing to documentation, delivery, and maintenance). About the team Starting in 2009, the Visual Search & Augmented Reality team has thus far launched many visual search solutions on the Amazon App that use computer vision and machine learning/deep learning to help customers complete their shopping missions more easily; multiple internal teams at Amazon (devices, Kindle, Seller services, etc.) also use our libraries and APIs to deliver solutions to their own customers. We are a full stack shop, and our team capabilities cover the whole solution spectrum, ranging across applied science, large scale engineering services, product management, UX design, and mobile app development for iOS and Android.
US, MN, Minneapolis
AWS Central Economics is an interdisciplinary team on the cutting edge of economics, statistical analysis, and machine learning whose mission is to solve problems that have high risk with abnormally high returns. Our team leverages the strengths of our scientists to build solutions for some of the toughest business problems here at Amazon AWS. We are looking for an exceptionally talented, seasoned, and motivated Economist to manage a team of economists and data scientists to drive the science for AWS. Key job responsibilities Manage a team of economists and data scientists to deliver actionable economic analyses to business leaders, provide leadership on the economics and science used in the analyses, and engage with business leaders to identify challenges AWS faces that call for in-depth economic analyses and to ensure the analyses have their intended impact.
LU, Luxembourg
&ltHire Relocation Requisition - not for posting> Provides insights to leadership on improving Supply Chain cost and Speed by using Data Science and Analytics techniques. Build Dashboards and models to industrialize these findings at scale.
US, VA, Arlington
The People eXperience and Technology Central Science Team (PXTCS) uses economics, behavioral science, statistics, and machine learning to proactively identify mechanisms and process improvements which simultaneously improve Amazon and the lives, wellbeing, and the value of work to Amazonians. We are an interdisciplinary team that combines the talents of science and engineering to develop and deliver solutions that measurably achieve this goal. We are looking for economists who are able to work with business partners to hone complex problems into specific, scientific questions, and test those questions to generate insights. The ideal candidate will work with engineers and computer scientists to estimate models and algorithms on large scale data, design pilots and measure their impact, and transform successful prototypes into improved policies and programs at scale. We are looking for creative thinkers who can combine a strong technical economic toolbox with a desire to learn from other disciplines, and who know how to execute and deliver on big ideas as part of an interdisciplinary technical team. Ideal candidates will work closely with business partners to develop science that solves the most important business challenges. They will work in a team setting with individuals from diverse disciplines and backgrounds. They will serve as an ambassador for science and a scientific resource for business teams, so that scientific processes permeate throughout the HR organization to the benefit of Amazonians and Amazon. Ideal candidates will own the data analysis, modeling, and experimentation that is necessary for estimating and validating models. They will work closely with engineering teams to develop scalable data resources to support rapid insights, and take successful models and findings into production as new products and services. They will be customer-centric and will communicate scientific approaches and findings to business leaders, listening to and incorporate their feedback, and delivering successful scientific solutions. Key job responsibilities Use causal inference methods to evaluate the impact of policies on employee outcomes. Examine how external labor market and economic conditions impact Amazon's ability to hire and retain talent. Use scientifically rigorous methods to develop and recommend career paths for employees. A day in the life Work with teammates to apply economic methods to business problems. This might include identifying the appropriate research questions, writing code to implement a DID analysis or estimate a structural model, or writing and presenting a document with findings to business leaders. Our economists also collaborate with partner teams throughout the process, from understanding their challenges, to developing a research agenda that will address those challenges, to help them implement solutions. About the team We are a multidisciplinary team that combines the talents of science and engineering to develop innovative solutions to make Amazon Earth's Best Employer.
US, WA, Seattle
The People eXperience and Technology Central Science Team (PXTCS) uses economics, behavioral science, statistics, and machine learning to proactively identify mechanisms and process improvements which simultaneously improve Amazon and the lives, wellbeing, and the value of work to Amazonians. We are an interdisciplinary team that combines the talents of science and engineering to develop and deliver solutions that measurably achieve this goal. We are looking for economists who are able to apply economic methods to address business problems. The ideal candidate will work with engineers and computer scientists to estimate models and algorithms on large scale data, design pilots and measure their impact, and transform successful prototypes into improved policies and programs at scale. We are looking for creative thinkers who can combine a strong technical economic toolbox with a desire to learn from other disciplines, and who know how to execute and deliver on big ideas as part of an interdisciplinary technical team. Ideal candidates will work in a team setting with individuals from diverse disciplines and backgrounds. They will work with teammates to develop scientific models and conduct the data analysis, modeling, and experimentation that is necessary for estimating and validating models. They will work closely with engineering teams to develop scalable data resources to support rapid insights, and take successful models and findings into production as new products and services. They will be customer-centric and will communicate scientific approaches and findings to business leaders, listening to and incorporate their feedback, and delivering successful scientific solutions. Key job responsibilities Use causal inference methods to evaluate the impact of policies on employee outcomes. Examine how external labor market and economic conditions impact Amazon's ability to hire and retain talent. Use scientifically rigorous methods to develop and recommend career paths for employees. A day in the life Work with teammates to apply economic methods to business problems. This might include identifying the appropriate research questions, writing code to implement a DID analysis or estimate a structural model, or writing and presenting a document with findings to business leaders. Our economists also collaborate with partner teams throughout the process, from understanding their challenges, to developing a research agenda that will address those challenges, to help them implement solutions. About the team We are a multidisciplinary team that combines the talents of science and engineering to develop innovative solutions to make Amazon Earth's Best Employer.
US, WA, Seattle
Amazon is looking for talented Postdoctoral Scientists to join our global Science teams for a one-year, full-time research position. Postdoctoral Scientists will innovate as members of Amazon’s key global Science teams, including: AWS, Alexa AI, Alexa Shopping, Amazon Style, CoreAI, Last Mile, and Supply Chain Optimization Technologies. Postdoctoral Scientists will join one of may central, global science teams focused on solving research-intense business problems by leveraging Machine Learning, Econometrics, Statistics, and Data Science. Postdoctoral Scientists will work at the intersection of ML and systems to solve practical data driven optimization problems at Amazon scale. Postdocs will raise the scientific bar across Amazon by diving deep into exploratory areas of research to enhance the customer experience and improve efficiencies. Please note: This posting is one of several Amazon Postdoctoral Scientist postings. Please only apply to a maximum of 2 Amazon Postdoctoral Scientist postings that are relevant to your technical field and subject matter expertise. Key job responsibilities * Work closely with a senior science advisor, collaborate with other scientists and engineers, and be part of Amazon’s vibrant and diverse global science community. * Publish your innovation in top-tier academic venues and hone your presentation skills. * Be inspired by challenges and opportunities to invent cutting-edge techniques in your area(s) of expertise.