OptaPlanner logo
  • Download
  • Learn
    • Documentation
    • Videos
    • Slides
    • Training

    • Use cases
    • Compatibility
    • Testimonials and case studies
  • Get help
  • Blog
  • Source
  • Team
  • Services
  • KIE
    • Drools
    • OptaPlanner
    • jBPM
    • Kogito
  • Star
  • T
  • L
  • F
  • YT
Fork me on GitHub

Vehicle Routing Problem

Video thumbnail
Build and run from source

The Vehicle Routing Problem (VRP) optimizes the routes of delivery trucks, cargo lorries, public transportation (buses, taxis and airplanes) or technicians on the road, by improving the order of the visits. This routing optimization heavily reduces driving time and fuel consumption compared to manual planning:

Vehicle routing value proposition

OptaPlanner is flexible enough to handle any VRP variant. It includes examples of CVRP (Capacitated Vehicle Routing Problem) and VRPTW (Vehicle Routing Problem with Time Windows).

Fork our Vehicle Routing application and customize that template to your needs.

What is OptaPlanner?

OptaPlanner is the leading Open Source Java™ AI constraint solver to optimize the Vehicle Routing Problem, the Traveling Salesman Problem and similar use cases. It covers any type of fleet scheduling, such as routing of airplanes, trucks, buses, taxis, bicycles and ships, regardless if the vehicles are transporting products or passengers or if the drivers are delivering services.

OptaPlanner is a lightweight, embeddable planning engine. It enables everyday Java™ programmers to solve optimization problems efficiently. It is also compatible with other JVM languages (such as Kotlin and Scala). Constraints apply on plain domain objects and can call existing code. There’s no need to input constraints as mathematical equations. Under the hood, OptaPlanner combines sophisticated Artificial Intelligence optimization algorithms (such as Tabu Search, Simulated Annealing, Late Acceptance and other metaheuristics) with very efficient score calculation and other state-of-the-art constraint solving techniques.

OptaPlanner is open source software, released under the Apache License. It is written in 100% pure Java™, runs on any JVM and is available in the Maven Central repository too.

What is the Vehicle Routing Problem?

Many enterprises face a vehicle routing problem daily: determine the optimal order to deliver a number of items to number of locations with a fleet of vehicles. They face this problem to restock their shops, to deliver products/services to customers, to fulfill maintenance on their devices, …​ For example, truck routing with Google Maps:

Vehicle routing with Google Maps

Scaling out

OptaPlanner scales out on the Vehicle Routing Problem thanks to incremental score calculation, nearby selection, shadow variables and - of course - advanced construction heuristics and metaheuristics.

Integration with real maps

As demonstrated in OptaWeb Vehicle Routing, integration with Google Maps or OpenStreetMap is straightforward:

Integration with real maps

Related videos

Video thumbnail
Business use cases and the impact of OptaPlanner
Satish Kale 3 Sep 2020
Video thumbnail
Vehicle routing with OptaPlanner
Jiří Locker 1 Sep 2020
Video thumbnail
OptaWeb Vehicle Routing run script
Jiří Locker 19 May 2020
Video thumbnail
OptaWeb Vehicle Routing before Red Hat Summit 2019
Jiří Locker 7 May 2019
Video thumbnail
OptaWeb VRP - Belgium
Jiří Locker 21 Nov 2018
Video thumbnail
Vehicle Routing with Time Windows in OptaPlanner
Geoffrey De Smet 23 Sep 2013
Video thumbnail
Vehicle routing demo to show score flexibility in OptaPlanner
Geoffrey De Smet 13 Dec 2012

Related blog posts

  • Mechanic scheduling (part 1) - Can OptaPlanner keep up with a keynote audience of thousands?
    Thu 9 May 2019
    Geoffrey De Smet
  • Red Hat Mobile Portfolio Truck dodges storms while keeping Sales happy with OptaPlanner
    Mon 19 November 2018
    Sudheer Chekka
  • How good are human planners?
    Wed 3 June 2015
    Geoffrey De Smet
  • OptaPlanner on Android
    Tue 19 May 2015
    Tomáš David
  • 3 Bugs in The Ultimate American Road Trip of The Washington Post
    Fri 20 March 2015
    Geoffrey De Smet
  • Visualizing Vehicle Routing with Leaflet and Google Maps
    Tue 10 March 2015
    Geoffrey De Smet
  • Scaling Vehicle Routing with Nearby Selection
    Tue 27 January 2015
    Geoffrey De Smet
  • Vehicle routing with real road distances
    Tue 2 September 2014
    Geoffrey De Smet
  • False assumptions for the Vehicle Routing Problem
    Tue 6 August 2013
    Geoffrey De Smet
Download
Try OptaPlanner
Download 8.14.0.Final
  1. Download and unzip.
  2. Run runQuickstarts.sh (Linux/macOS)
    or runQuickstarts.bat (Windows).
Requires JDK 11 or higher to run.
Documentation
Get started
User guide 8.14.0.Final
Clone the Quickstarts code.
Latest release
  • 8.14.0.Final released
    Wed 8 December 2021
Paid support and consulting

Want to talk to the experts? Red Hat offers certified binaries with enterprise consulting. Contact optaplanner-info for more information.

Upcoming events
  • DevConf.CZ
    Brno, Czech Republic (virtual) - Fri 28 January 2022
    • Artificial Intelligence on Quarkus: I love it when an OptaPlan comes together by Geoffrey De Smet
  • JFokus
    Stockholm, Sweden - Mon 7 February 2022
    • AI maintenance scheduling with OptaPlanner on Quarkus by Geoffrey De Smet
  • Add event / Archive
Latest blog posts
  • OptaPlanner documentation turns over a new leaf
    Tue 26 October 2021
    Radovan Synek
  • Order picking optimization in warehouses and supermarkets with OptaPlanner
    Thu 14 October 2021
    Walter Medvedeo
  • Monitor OptaPlanner solvers through Micrometer
    Tue 12 October 2021
    Christopher Chianelli
  • A new AI constraint solver for Python: OptaPy
    Tue 5 October 2021
    Christopher Chianelli
  • How much faster is Java 17?
    Wed 15 September 2021
    Geoffrey De Smet
  • Constraint Streams get some more love
    Thu 19 August 2021
    Lukáš Petrovický
  • Let’s OptaPlan your jBPM tasks (part 2) - BPM Task assigning in the cloud
    Mon 26 July 2021
    Walter Medvedeo
  • Blog archive
Latest videos
  • AI lesson scheduling on Quarkus with OptaPlanner
    Thu 18 November 2021
    Geoffrey De Smet
  • Maintenance scheduling
    Fri 12 November 2021
    Geoffrey De Smet
  • Optimized order picking in warehouses and supermarkets
    Tue 26 October 2021
    Walter Medvedeo
  • A modern OO/FP constraint solver
    Tue 14 September 2021
    Geoffrey De Smet
  • Business processes task optimization in Kogito
    Tue 7 September 2021
    Walter Medvedeo
  • School timetable optimization
    Mon 6 September 2021
    Geoffrey De Smet
  • Schedule incoming calls real-time
    Mon 23 August 2021
    Radovan Synek
  • Video archive

OptaPlanner is open. All dependencies of this project are available under the Apache Software License 2.0 or a compatible license. OptaPlanner is trademarked.

This website was built with JBake and is open source.

Community

  • Blog
  • Get Help
  • Team
  • Governance
  • Academic research

Code

  • Build from source
  • Issue tracker
  • Release notes
  • Upgrade recipes
  • Logo and branding

KIE projects

  • Drools rule engine
  • OptaPlanner constraint solver
  • jBPM workflow engine
  • Kogito Business Automation platform
CC by 3.0 | Privacy Policy
Sponsored by Red Hat