OptaPlanner logo
  • Download
  • Learn
    • Documentation
    • Videos

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

Vehicle Routing Problem

Video thumbnail

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 quickstart and customize it 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

Integration with Google Maps or OpenStreetMap is straightforward:

Integration with real maps

Related videos

Video thumbnail
The Vehicle Routing Problem
Geoffrey De Smet 23 Sep 2022
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

  • Scaling Up Vehicle Routing Problem with planning list variable and Nearby Selector
    Thu 27 April 2023
    Anna Dupliak
  • 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 9.44.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 9.44.0.Final
Clone the Quickstarts code.
Latest release
  • 9.44.0.Final released
    Wed 6 September 2023
Upcoming events
    Add event / Archive
Latest blog posts
  • Scaling Up Vehicle Routing Problem with planning list variable and Nearby Selector
    Thu 27 April 2023
    Anna Dupliak
  • OptaPlanner 9 has been released
    Mon 24 April 2023
    Radovan Synek
  • OptaPlanner 9 is coming
    Tue 21 February 2023
    Lukáš Petrovický
  • Farewell - a new lead
    Tue 15 November 2022
    Geoffrey De Smet
  • Run OptaPlanner workloads on OpenShift, part II
    Wed 9 November 2022
    Radovan Synek
  • Bavet - A faster score engine for OptaPlanner
    Tue 6 September 2022
    Geoffrey De Smet
  • Run OptaPlanner workloads on OpenShift, part I.
    Thu 9 June 2022
    Radovan Synek
  • Blog archive
Latest videos
  • The Vehicle Routing Problem
    Fri 23 September 2022
    Geoffrey De Smet
  • Introduction to OptaPlanner AI constraint solver
    Thu 25 August 2022
    Anna Dupliak
  • On schedule: Artificial Intelligence plans that meet expectations
    Sat 23 July 2022
    Geoffrey De Smet
  • Host your OptaPlanner app on OpenShift (Kubernetes)
    Mon 7 February 2022
    Geoffrey De Smet
  • OptaPlanner - A fast, easy-to-use, open source AI constraint solver for software developers
    Mon 31 January 2022
  • Order picking planning with OptaPlanner
    Fri 31 December 2021
    Anna Dupliak
  • AI lesson scheduling on Quarkus with OptaPlanner
    Thu 18 November 2021
    Geoffrey De Smet
  • 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
CC by 3.0 | Privacy Policy
Sponsored by Red Hat