Toggle navigation OptaPlanner logo
  • Home
  • Download
  • Learn
    • Documentation
    • Videos
    • Slides
    • Training
    • Use cases
    • Compatibility
    • Testimonials and case studies
  • Get help
  • Source
  • Team
  • Services
  • Star
  • @OptaPlanner
  • Fb
Fork me on GitHub

Vehicle Routing Problem

The Vehicle Routing Problem (VRP) optimizes the routes of delivery trucks, cargo lorries, public transportation (buses, taxi’s 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, taxi’s, 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

Videos

Related blog posts

  • Mechanic scheduling (part 1) - Can OptaPlanner keep up with a keynote audience of thousands?
     Geoffrey De Smet
  • Red Hat Mobile Portfolio Truck dodges storms while keeping Sales happy with OptaPlanner
     Sudheer Chekka
  • How good are human planners?
     Geoffrey De Smet
  • OptaPlanner on Android
     Tomáš David
  • 3 Bugs in The Ultimate American Road Trip of The Washington Post
     Geoffrey De Smet
  • Visualizing Vehicle Routing with Leaflet and Google Maps
     Geoffrey De Smet
  • Scaling Vehicle Routing with Nearby Selection
     Geoffrey De Smet
  • Vehicle routing with real road distances
     Geoffrey De Smet
  • False assumptions for the Vehicle Routing Problem
     Geoffrey De Smet
Download
Download OptaPlanner
8.3.0.Final

Try the examples now:

  1. Download the zip and unzip it
  2. On Linux/macOS, run examples/runExamples.sh
    On Windows, run examples/runExamples.bat
Requires Java™ to run.
Documentation
Read documentation
8.3.0.Final

Read a Quick Start guide
or git clone optaplanner-quickstarts.

Latest release
  • 8.3.0.Final released
    Fri 5 March 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
  • KIE Live
    Worldwide - Tue 9 March 2021
    • Testing your constraints with OptaPlanner by Lukáš Petrovický, Karina Varela, Alex Porcelli
  • Javaland
    Worldwide - Tue 16 March 2021
    • AI on Quarkus: I love it when an OptaPlan comes together by Geoffrey De Smet
  • Red Hat Webinar
    Worldwide - Wed 24 March 2021
    • AI planning: Top 3 use cases and benefits by Ronald Meuwsen, Geoffrey De Smet
  • SouJava MOTU
    Worldwide - Thu 15 April 2021
    • Planejamento de Recursos com OptaPlanner by Karina Varela, Otávio Santana
Add event / Archive
Latest blog posts
  • Optimizing COVID-19 vaccination appointment scheduling
    Thu 4 March 2021
     Paul Brown
  • How much faster is Java 15?
    Tue 26 January 2021
     Michal Tomčo
  • Solve the facility location problem
    Fri 9 October 2020
     Jiří Locker
  • OptaPlanner Week 2020 recordings
    Mon 7 September 2020
     Geoffrey De Smet
  • Let’s OptaPlan your jBPM tasks (part 1) - Integrating the two worlds
    Fri 3 July 2020
     Walter Medvedeo
  • AI versus Covid-19: How Java helps nurses and doctors in this fight
    Fri 8 May 2020
     Christopher Chianelli
  • Workflow processes with AI scheduling
    Tue 5 May 2020
     Christopher Chianelli
Blog archive
Latest videos
  • YT Maintenance scheduling
    Wed 24 February 2021
     Julian Cui
  • YT Vaccination appointment scheduling
    Wed 3 February 2021
     Geoffrey De Smet
  • YT Shadow variables
    Tue 19 January 2021
     Geoffrey De Smet
  • YT Domain modeling and design patterns
    Tue 17 November 2020
     Geoffrey De Smet
  • YT Quarkus insights: AI constraint solving
    Tue 20 October 2020
     Geoffrey De Smet
  • YT AI in kotlin
    Wed 23 September 2020
     Geoffrey De Smet
  • YT Planning agility: continuous planning, real-time planning and more
    Thu 3 September 2020
     Geoffrey De Smet
Video archive

KIE projects

  • Drools rule engine
  • OptaPlanner constraint solver
  • jBPM workflow engine

Community

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

Code

  • Build from source
  • Submit a bug
  • License (Apache-2.0)
  • Release notes
  • Upgrade recipes
Sponsored by
Red Hat
More coder content at
Red Hat Developers
© Copyright 2006-2021, Red Hat, Inc. or third-party contributors - Privacy statement - Terms of use - Website info