It’s 5:30 on a Saturday evening. You’re getting ready to host a dinner party, and as you prepare the main course, you realize you forgot to grab tomato sauce at the store. You’re also short on wine, and you haven’t even thought about dessert. Your guests will be here in one hour. But not to worry—you pick up your phone, open your Instacart app, and with just a few taps, your grocery order is scheduled for delivery within 45 minutes.
You continue with your preparations, knowing that everything will soon be back on track. But behind the scenes, there’s a lot going on to make sure you get the items you need by 6:15—a lot of mathematical optimization, to be precise.
To provide a seamless and satisfying shopping experience for its customers, Instacart relies on sophisticated algorithms and optimization models that can handle the complex logistics of its four-sided marketplace—from matching customers with the best available shoppers, to routing those shoppers to the most efficient store locations.
As a four-sided marketplace with customers, shoppers, retailers, and advertisers, there are many factors that Instacart must account for in order to provide an optimal experience for all.
Different objectives and constraints from these various parties pose additional challenges as Instacart strives to:
Initially, as a smaller company, Instacart utilized open-source software to work toward these goals. However, as the business grew, those solutions were no longer sufficient.
“At some point, we realized a need for more commercial-grade tools that could solve the problems of our size, and do so very quickly to ensure the best experience possible for both customers and shoppers,” shares Asif Haque, Director of Engineering at Instacart.
With that in mind, Instacart began to shop for a commercial solver that could handle their increasingly complex objectives.
Since many of the professionals on Instacart’s logistics team have backgrounds in operations research, they were already familiar with the most popular commercial and open-source solvers.
“Because of our team’s prior experiences, I think we had some ideas about which solver we would pick,” says Reza Faturechi, Operations Research and Machine Learning Engineer at Instacart. “But we did extensive benchmarking for the same problem, and while most of the commercial solvers were good, what really stood out to us was how quickly Gurobi could find feasible, real-time solutions.”
After several months of comprehensive testing, the team was fully onboarded with Gurobi.
“The onboarding process was quite seamless, because everything was already set up in one place during our evaluation period—so there wasn’t much of a learning curve or additional time needed to jump in,” Haque shares.
With their multiple objectives translated into a single problem, Instacart can use Gurobi to effectively group orders, assign shoppers, and ensure fair compensation.
“Our problems are very large, and we have them broken down to a certain level of granularity,” explains Haque. “But I feel that Gurobi allows us to think about the problem more holistically again and get to that global optimum very quickly.”
Since the company started utilizing Gurobi’s solver, Instacart has seen an improvement in the reliability of their systems—a significant benefit, given the thousands of orders that are typically pending at any given moment.
“Before, even for the smaller-sized problems, there would be occasional timeouts or alerts from the system. But those are largely gone now,” says Haque.
And in addition to helping Instacart achieve its primary goals of efficient order fulfillment, Gurobi has also introduced new opportunities for growth and innovation.
“Given that our operations research team is pretty skilled, I believe [Gurobi] is bringing new opportunities for folks to utilize their knowledge, because we didn’t have the tools to apply that before,” says Haque. “But now, for example, we’re gradually discovering new ways of modeling things. There are also particular use cases where we otherwise would need to come up with heuristics, but with Gurobi, we can easily get those high-quality solutions.”
As Faturechi notes, now the team can spend more time innovating, knowing they have a solver that can handle complex problems: “We have less concern for how the problem will be solved, knowing we have the right tools. Now we can focus on formulating the problems that will help us solve our marketplace challenges more efficiently, because we get feasible solutions, fast—which is why I’d highly recommend Gurobi.”
GUROBI NEWSLETTER
Latest news and releases
Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.
Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.