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

Release Notes 8

We are happy to announce a 8 Final release of OptaPlanner. OptaPlanner is a lightweight, embeddable planning engine written in Java™ to solve AI constraint optimization problems efficiently. Use cases include Vehicle Routing, Employee Rostering, Maintenance Scheduling, Task Assignment, School Timetabling, Cloud Optimization, Conference Scheduling and many more.

Download
Download
8.20.0.Final
Documentation
Documentation
8.20.0.Final
Status of OptaPlanner
  • Stable: Lots of unit, integration and stress tests
  • Reliable: Used across the world in production
  • Scalable: To billions of constraint matches with minimal RAM and CPU time
  • Documented: Read the detailed reference manual and the many examples
  • Open Source: Apache License 2.0
Note for Red Hat Decision Manager customers

The RHDM version differs from the OptaPlanner version:

RHDM version OptaPlanner version
7.8 7.39
7.9 7.44
7.1 7.48
7.11 8.5 (and 7.52)
7.12 8.11 (and 7.59)

Why OptaPlanner 8?

To empower OptaPlanner on the latest technologies and facilitate new features (see below), OptaPlanner can’t remain 100% backwards compatible. Therefore, following Apache version guidelines, the major version number increments. OptaPlanner 8 removes the deprecated methods from OptaPlanner 7 and makes a few minor backwards incompatible changes. Upgrading your code from 7 to 8 is easy and quick. Just follow the instructions in the upgrade recipe.

As usual, Red Hat offers enterprise support and consulting on OptaPlanner 8, with the Red Hat build of OptaPlanner 8 available and fully supported in the latest release of Red Hat Decision Manager 7.

New and noteworthy: Engine 8.20.0.Final

SolverManager.addProblemChange() now returns CompletableFuture<Void>

SolverManager.addProblemChange() returns CompletableFuture<Void>, which completes when a new best solution containing the problem change has been passed to a user-defined Consumer.

New and noteworthy: Engine 8.17.0.Final

Real-time planning available on the SolverManager

The SolverManager now accepts problem changes via the addProblemChange() method, allowing for real-time planning without much boilerplate code.

Faster Solver creation

SolverFactory newly caches some internal data structures, leading to much faster Solver creation times. You will benefit from this if you instantiate multiple `Solver`s in quick succession.

New and noteworthy: Engine 8.12.0.Final

Documentation website

The latest final OptaPlanner documentation is now available on a new documentation website built using Antora. The single-HTML and PDF documentation will continue to be published in the archive.

Monitoring Support

OptaPlanner now uses Micrometer to monitor key metrics such as active solver count, solve durations, and error count.

New and noteworthy: Engine 8.10.0.Final

Support for Quarkus 2.0

OptaPlanner is now fully compatible with the recently released Quarkus 2.0.

New and noteworthy: Engine 8.7.0.Final

OptaPlanner quickstarts repository

There is a new quarkus-call-center quickstart that shows real-time planning of incoming calls in a call center.

Quarkus Call Center

New and noteworthy: Engine 8.5.0.Final

Mapping in Constraint Streams

The Constraint Streams API received a major new functionality. You can now modify your streams using mapping functions.

Ready for OpenJDK 16

We have made some tweaks under the hood so that your experience with the recently released OpenJDK 16 continues to be smooth.

Inject and Autowire ConstraintVerifier in Quarkus and Spring Boot

You can now inject the Constraint Verifier in Quarkus and autowire the Constraint Verifier in Spring Boot, allowing you to test your constraint streams more easily.

OptaWebs on Quarkus

OptaWeb Vehicle Routing and OptaWeb Employee Rostering have been migrated from Spring Boot to Quarkus.

Other noteworthy changes done during the migration to Quarkus:

  • OptaWeb Vehicle Routing back end has a new RESTful API. Client-server communication, that was previously done using WebSockets, now uses a combination of REST calls and Server-Sent Events.

  • OptaWeb Employee Rostering now uses Constraint Streams instead of DRL for score calculation.

Faster Domain Accessors and Cloning with Gizmo

We have added Gizmo generated domain accessors and solution cloners, which offer better performance than the reflection based domain accessors and solution cloners.

OptaPlanner quickstarts repository

There is a new activemq-quarkus-school-timetabling quickstart that shows how to integrate ActiveMQ with OptaPlanner to horizontally scale when solving multiple data sets.

New and noteworthy: Engine 8.3.0.Final

Major performance improvements for Constraint Streams

The default implementation of the Constraint Streams API has seen major performance improvements. Use cases with tri and quad streams may experience order of magnitude speedups. Use cases with grouping are likely to experience some speedups too, albeit comparatively smaller.

Kudos to the Drools team for helping make this possible!

Constraint Streams groupBy() overloads for multiple collectors

The Constraint Streams API has been extended to allow using more than 2 collectors in a single grouping. The following is now possible:

return constraintFactory.from(ProductPrice.class)
    .groupBy(min(), max(), sum())
    .penalize(..., SimpleScore.ONE, (minPrice, maxPrice, sumPrices) -> ...);

New and noteworthy: Engine 8.0.0.Final

OptaPlanner quickstarts repository

The new OptaPlanner Quickstarts repository contains pretty web demos for several use cases. It also shows you how to integrate OptaPlanner with different technologies:

  • School timetabling: Assign lessons to timeslots and rooms to produce a better schedule for teachers and students.

    This application connects to a relational database and exposes a REST API, rendered by a pretty JavaScript UI.

    • quarkus-school-timetabling: Java, Maven or Gradle, Quarkus, H2

    • spring-boot-school-timetabling: Java, Maven or Gradle, Spring Boot, H2

    • kotlin-quarkus-school-timetabling: Kotlin, Maven, Quarkus, H2

  • Facility location problem (FLP): Pick the best geographical locations for new stores, distribution centers, COVID-19 test centers or telco masts.

    • quarkus-facility-location: Java, Maven, Quarkus

  • Factorio layout: Assign machines to assembly line locations to design the best factory layout.

    • quarkus-factorio-layout: Java, Maven, Quarkus

  • Maintenance scheduling: Coming soon

Clone the quickstarts repo now!

Future Java compatibility

The OptaPlanner 8 API has been groomed to maximize compatibility with the latest OpenJDK and GraalVM releases and game-changing platforms such as Quarkus. Meanwhile, we still fully support OpenJDK 11 and platforms such as Spring Boot or plain Java.

For example, when running OptaPlanner in Java 11 or higher with a classpath, OptaPlanner no longer triggers WARNING: An illegal reflective access operation has occurred for XStream.

Code completion for solverConfig.xml and benchmarkConfig.xml through XSD

To validate XML configuration during development, add the new XML Schema Definition (XSD) on the solver or benchmark configuration:

<?xml version="1.0" encoding="UTF-8"?>
<solver xmlns="https://www.optaplanner.org/xsd/solver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.optaplanner.org/xsd/solver https://www.optaplanner.org/xsd/solver/solver.xsd">
  ...
</solver>

This enables code completion for XML in most IDEs:

SolverConfigCodeCompletion

Improved Quarkus extension

The OptaPlanner Quarkus extension is now stable and displays no warnings when compiling Java to a native executable.

ScoreManager now supports score explanation

The ScoreManager can now also explain why a solution has a certain score:

ScoreManager<TimeTable, HardSoftScore> scoreManager = ScoreManager.create(solverFactory);
...
ScoreExplanation<TimeTable, HardSoftScore> scoreExplanation = scoreManager.explain(timeTable);
System.out.println(scoreExplanation.getSummary());
...

Additionally, use scoreExplanation.getConstraintMatchTotalMap() and scoreExplanation.getIndictmentMap() to extract the ConstraintMatchTotal<HardSoftScore> and Indictment<HardSoftScore> information without triggering a new score calculation.

Various improvements

  • The ConstraintStreams API is now richer, more stable with better error messages and faster.

  • The SolverManager API now supports to listen to both best solution events and the solving ended event.

  • OptaPlanner no longer depends on Guava or Reflections.

Upgrade your code to 8

The best and easiest way to upgrade to this new version of OptaPlanner is by following the upgrade recipe.

New features in older releases

Read the previous release notes to learn about the new and noteworthy in previous releases.

Latest release
  • 8.20.0.Final released
    Thu 14 April 2022
Upcoming events
    Add event / Archive
Latest blog posts
  • Real-time planning meets SolverManager
    Mon 7 March 2022
    Radovan Synek
  • 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ý
  • Blog archive
Latest videos
  • 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
  • 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
  • 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