Today's article comes from the journal Heliyon. The authors are Adjei et al., from the University of Energy and Natural Resources in Ghana. In this paper the authors use AMPL (an Algebraic Modeling Language) to design a comprehensive solution to a vehicle routing problem.
DOI: 10.1016/j.heliyon.2024.e38528
Sweet Mama’s Tomato Mix is a tomato-paste produced by the Weddi Africa Tomato Processing and Agro Farm. Weddi is a vertically integrated wholesaler: it operates the farm, it runs the processing plant, and it owns the distribution centers. It delivers five products (pastes in various-sized containers) directly to retailers in its own fleet of trucks, driven by its own drivers.
The company operates in Ghana, in or around the city of Kumasi, a metropolitan area that is home to nearly 4 million residents. Weddi's main factory is about a hundred miles outside of the city, but its distribution hubs are closer to the city limits.
Weddi is a mid-sized business, offering commodity products in a competitive market. So naturally, margins are tight. Weddi is looking for efficiency gains, and they've turned their eyes to their transportation costs. Those costs are high, but a solution to bring them down isn’t readily apparent. Here are the factors complicating the situation:
Weddi is aware that there's likely waste and inefficiency somewhere in their system, but creating a route-planner that factors in all of these variables is non-trivial. That's where today's paper comes in. The authors picked Weddi as a case-study, and decided to develop a solution specifically for the company.
They framed the challenge as a Constraint Satisfaction Problem, or more specifically an HC-VRP: a Heterogeneous Capacitated Vehicle Routing Problem. There is a huge amount of literature on vehicle routing problems. So before they did anything new, the authors considered a whole host of out-of-the-box solutions. This included models like North-West Corner, Least Cost, Vogel’s Approximation and more. But after a review they found that the existing options were all missing something. They either omitted:
The authors weren't able to find any pre-built solution that would accommodate all of these parameters, so they decided to create their own model. Specifically, they set their sights on a QC-MINLP, a Quadratically Constrained Mixed Integer Non-Linear Programming model.
Side note: Before we continue, if you’d like a quick refresher on Linear Programming and Mixed-Integer Linear Programming please go back to our episode from September 17th, 2024 titled "the Fog Node Location Problem". In that episode I do a run-down of those concepts. If you don’t have access to that episode just reply to today’s email so I can send it your way.
Unlike solutions we've discussed in other episodes, these authors were developing a model that in addition to being MINLP, has the added quality of being Quadratically Constrained. All that means in a nutshell is that the equations that act as constraints can have exponents on the variables, specifically the number 2. In other words, the constraint equations can have variables that are squared. Remember, quadratic means raised to the power of 2, cubic is 3, quartic is 4 etc. So if this was called a Cubically Constrained problem it would be the same except the exponents on variables in the constraints could be 3 instead of 2.
So anyway, they needed to create a QC-MINLP. But how on earth does one do that? Well, there are a few ways. In their case, they turned to AMPL. AMPL is a programming language that most people (and even most Software Engineers) have never heard of. Its obscurity is due to the fact that it’s not a general-purpose programming language. It’s an AML: an Algebraic Modeling Language. This language exists to solve optimization problems. At a high level, the process of using it goes like this:
The above is an oversimplification, but the broad strokes are true. With AMPL as their chosen tool, the authors now just needed to follow those steps to generate a solution. So that’s what they did:
The solver returned recommended routes, recommended vehicles, departure dates, departure times, vehicle loading procedures, and logic rules for handling traffic congestion. Overall, the results were remarkable: they saw a 27.59% reduction in total transportation costs.
That being said, the authors noted that the solution they generated wasn’t necessarily scalable. The computational complexity of the solution, they believe, will increase disproportionately as the system scales, making it best suited for smaller/mid-sized businesses and not large enterprises.
So, what can we take away from this paper? I’m hoping you’ll remember two things:
This paper included a number of diagrams, route maps, equation lists, variable lists and more. If you’d like to check out any of these materials, I recommend that you download the paper.