Tutorial V - vehicle routing & scheduling
ODL Studio uses the excellent jsprit vehicle routing library to provide vehicle routing & scheduling capabilities. Using the jsprit integration, you can plan a set of routes for your delivery fleet to efficiently serve a set of delivery points. You can then edit these routes using our drag-and-drop vehicle route editor, analyse them in various ways, inspect the routes in a map or export detailed reports to give to your drivers.
Configuring and integrating a vehicle routing solution for your own organisation is a complex task and you may wish to consider contacting us for details on our consultancy, support and training packages, to guide you through the process. This tutorial provides an introduction to the routing and scheduling capabilities available within ODL Studio. You are advised to work through the earlier tutorials before this tutorial. Firstly, watch the following tutorial video for an introduction to vehicle routing and scheduling using ODL Studio. Ensure you watch the video in high resolution, or some controls may not be clear.
Now, following the video step-by-step, do the following:
- Create demo data
- Open ODL Studio and create an empty spreadsheet using the new menu item.
- Create a new vehicle routing script with 1 quantity type and save it to your scripts directory.
- Under the Tools option in the new script, click on Create all input tables. This creates the tables Stops, VehicleTypes and Stops-order in your spreadsheet. Stops and VehicleTypes hold your input data and your output routes are held in Stops-order.
- Under the same option, click Demo - create stops and vehicles. This creates an artificial input dataset.
- Save your spreadsheet
- Run the optimiser
- Download the pre-built UK road network graph from our downloads page and unzip to a directory on your computer.
- Edit the vehicle routing script and under settings, change the script to use real road network distances, setting the directory to your unzipped directory. ODL Studio uses the excellent Graphhopper project for road network distance and time calculations. To find out how to build the file for other countries, see our advanced configuration tutorial.
- Click on the optimise icon under the script and wait for the optimisation to finish.
- Analyse the routes in the map
- Under the view solution option in the script, click on view routes in map.
- Navigate around the map to inspect the various routes.
- Use the legend control to zoom on and show / hide routes.
- Hover over the individual stops to bring up the tooltip with stop details.
- Activity breakdown with Gantt chart
- Click on the Gantt chart icon under the view solution option.
- Hover over different parts of the Gantt chart to view details on the activities.
- Editing vehicle routes
- Under view solution in the script, open the map by clicking on the view routes in map icon.
- Open the route editor by clicking on the Edit routes icon.
- As shown in the video, use the route editor control to drag stops off and between routes. You can also change the ordering of stops within a route by dragging them.
- Creating pdf reports of your routes
- Click on the reports icon under your script to generate a report.
- From the reporter viewer control, save the report to pdf (see example file here). If you want to automatically export the report to pdf or another format, or change the report format, see our tutorials on reporting or contact us for support and training. We can build custom route reports for you.
- Viewing and exporting route statistics
- Examine the various detail statistics tables.
- Export them to the spreadsheet using the Export solution tables option.
To use vehicle route planning in a production system, you need to populate your Excel spreadsheet automatically from your customer resource management or enterprise resource planning system. You may also wish to generate the vehicle routes and reports as part of an automated batch process using our ODL Connect product.
If you’d like to use travel times and distances from another map provider (e.g. Google or Navteq / HERE) then see the tutorial on using an external travel distances and times text file matrix.
This tutorial used a relatively simple vehicle routing model - the multi-depot vehicle routing problem with time windows. The jsprit library can model many different sorts of vehicle routing problems and ODL Studio can be customised as needed to support them. Contact us for details if you’d like to model:
- Custom constraints
- Driver and stop skills
- Open or closed routes
- Pickup and delivery problems (also known as collect-deliver problems)
- Vehicle-dependent speeds
- ... and many more!
Optimised vehicle route