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

Solve planning and scheduling problems with OptaPlanner

A fast, easy-to-use, open source AI constraint solver for software developers

Video thumbnail
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.
Need legacy OptaPlanner 8?

What can OptaPlanner do?

OptaPlanner optimizes plans and schedules with hard constraints and soft constraints.
It reduces costs substantially, improves service quality, fulfills employee wishes and lowers carbon emissions.

Vehicle routing (VRP)

Quicker routes for a fleet of vehicles.

Learn more
Employee rostering

Assign shifts to employees by skills and availability.

Learn more
Maintenance scheduling

Timely upkeep of machinery and equipment.

Learn more
Conference scheduling

Schedule speakers and talks by availability and topic.

Learn more
School timetabling

Compacter schedules for teachers and students.

Learn more
Task assignment

Assign tasks by priority, skills and affinity.

Learn more
Cloud optimization

Bin packing and defragmentation of cloud resources.

Learn more
Job shop scheduling

Reduce makespan for assembly lines.

Learn more

Modern mathematical optimization

OptaPlanner is a lightweight, embeddable planning engine. It enables everyday programmers to solve optimization problems efficiently. Constraints apply on plain domain objects and can call existing code. It is Object Oriented Programming (OOP) and Functional Programming (FP) friendly. There’s no need to input constraints as mathematical equations.

OptaPlanner supports
  • Continuous planning to weekly publish the schedule, 3 weeks before execution
  • Non-disruptive replanning for changes to an already published schedule
  • Real-time planning to react on real-time disruptions in the plan within milliseconds
  • Overconstrained planning when there are too few resources to cover all the work
  • Pinning so the user is still in control over the schedule

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 for NP-complete or NP-hard problems.

Compatibility

OptaPlanner works directly from:
  • Java
  • Kotlin
  • Scala
  • Python (experimental)
OptaPlanner integrates seamlessly with:
  • Quarkus
  • Spring Boot
OptaPlanner runs on:
  • Kubernetes and OpenShift
  • All major clouds

OptaPlanner is open source software, released under the Apache License.

Code example

To optimize a problem from Java™ code, add the optaplanner-core jar and call Solver.solve():

SolverFactory<MyRoster> factory = SolverFactory.create(...);

// My domain specific class as input
MyRoster problem = ...;

Solver<MyRoster> solver = factory.buildSolver();
// My domain specific class as output
MyRoster solution = solver.solve(problem);

for (MyShift shift : solution.getShifts()) {
    // Each shift is now assigned to an employee
    assertNotNull(shift.getEmployee());
}

Try the hello world application.

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