An introduction to fleet routing on Nextmv Cloud

March 25, 2021

At any given time on planet Earth, the following problem is unfolding: several vehicles need to visit multiple locations to pick up and/or drop off any number of things. This scenario applies to delivering food, transporting people, plowing snow off streets, transferring goods from distribution centers to retail outlets, moving milk from farms to processing facilities, and more.

These are all routing problems. Solving them in real time can be challenging, but it doesn’t have to be. We believe that finding good routes should be automated, seamless, fast, and even a bit fun. And we’d like to demonstrate this to you with a high-level overview of our Dispatch app for fleet vehicle routing on Nextmv Cloud. By the end of this post, you should feel empowered to click, run, and modify some basic elements in our cloud offering.

To follow along, you'll need a Nextmv Cloud account. Create one by visiting our website and clicking the “Get started” button. You can then sign into

Input data and run

Logging into Nextmv Cloud will drop you straight into the fleet routing experience. You’ll see a section at the top of input data, results, and an empty map.


Let’s start with the input data module. At the top of the file, you’ll see fields and values that identify default settings for the vehicles in our fleet. This includes vehicle start and end geo coordinates (a TopGolf parking lot in Allen, Texas), shift start, and speed (in meters per second). If you keep scrolling, you’ll see an itemized list of each vehicle in our fleet (currently just two) and the 10 stops the vehicles need to make. Each vehicle has a defined capacity. Each stop has a defined pickup quantity that will update the vehicle capacity after each visit. (In this instance, “pickup” is denoted with a negative value that represents a reduction in vehicle capacity.)

If it helps, you can imagine that our two trucks are sourcing TopGolf equipment like golf balls and clubs. Both trucks have to visit 10 vendor locations in the outskirts of Dallas, Texas and return to their TopGolf home base. We want to find the most efficient way to route our two vehicles to these 10 locations. In this demo, this means minimizing the total time both vehicles are on the road (in seconds).

With this in mind, let’s get right to the good stuff: click the teal “Run” button. Wait a few seconds and you’ll see two colorful routes appear on the map. Congratulations, you’ve successfully solved a fleet routing problem. Now, let’s have a closer look at what just happened.

Routes on a map

Your map has two colored routed representing — one for each vehicle. You can isolate a given route by clicking on the vehicle switches that appeared in the Results tab. Go ahead and turn them on and off to watch the routes appear and disappear. Just below those switches, you’ll also see a few radio buttons where you can change the route display from road (routing on top of streets)to (straight lines between two points using a Haversine measure).


Output data basics

Now, let’s have a quick look at the Output Data section just below the input and map panes. This section of the console gives you details about all the goodness that happened right after you clicked “Run.”

As you scroll through the output, you’ll see items that let you see the software version, the options configured around the solve, the state for the selected solution, and statistics about the run. Let’s have a closer look at the third item in that list: state. Here you can see information about your two vehicles: the stops they were assigned, the value of the solution for that vehicle, travel distance (in meters), travel time (in seconds), and the order in which each vehicle visited each stop.

If you move down to statistics and expand search, you can see at the bottom that one solution was found. Under time, you’ll see that single and best solution was found in 558 microseconds. No better solutions were found between the 558 microseconds to the first solution and the 3 seconds we gave the app to run.


In more complex scenarios, you’ll typically see many feasible solutions get returned. This number often varies depending on your runtime as well. There is more to explore in terms of how long to run a model to find operationally good solutions — but that’s a deep dive we’ll reserve for future blog post. For now, we want you to continue to explore the ins and outs of the Dispatch app.

Play, tinker, and explore

At this point, you’ve successfully solved two routing problems for a fleet of two vehicles — one where you provided Nextmv with 3 seconds to search for solutions and another where you provided it with 1 second to solve. There are several other ways to modify our app to reflect real-world variations of routing problems. Here are a few to get you started.

Change capacity for your vehicles

All of the JSON input files are editable. Try changing the capacities for each. What happens if Vehicle 1 has a capacity of 500? Or 100? See how the map changes and the output data changes. You can even change the pickup quantity at each location.

Add a third vehicle to your fleet

Copy lines 3 through 14 in the input file. Paste them into line 15 and change the vehicle ID to something new. How does your map change? How does your output data change?

Run the other input files

As you’ve been customizing your input data, you may have noticed that the Select Input dropdown changed to "Custom." You can continue to customize this input file or change to a new one and customize it.

We provide a few other starting points for exploration. We began this walkthrough with a tiny fleet input consisting of 2 vehicles visiting 10 locations. As a next step, try scaling up your operations by running a base fleet input of 15 vehicles and 63 locations. (Get ready: it gets really colorful really fast.)


It’s common for our customers to have specifications such as pickup and delivery precedence (e.g., a vehicle must visit location 4 before location 6) and time windows (e.g., a vehicle must visit a location within a given time frame). Run each of these and customize them as you go along.

You can even customize the file with geocoordinates of your choosing. We had a bit of fun around the holiday season with this.

You’ve reached the end of this beginning

What we covered in this post only scratches the surface of what Nextmv is capable of and what our customers are achieving with our products. If you’d like to learn more about how to customize a value function, account for compatibility attributes, and more, reach out to our team and we’d be happy to chat. Until then, keep playing, tinkering, and exploring with Nextmv!

Editor’s Note (May 4, 2021): This post was updated to reflect updates to the input and output schemas in Nextmv Cloud.

Featured posts