OptaPlanner Changelog

What's new in OptaPlanner 9.37.0

May 4, 2023
  • PlanningListVariable supports nearby selection:
  • Nearby selection is now available for planning domains using a planning list variable.
  • AbstractScoreHibernateType and its subtypes become deprecated:
  • The AbstractScoreHibernateType as well as all its subtypes have been deprecated. The parallel OptaPlanner 9 releases are going to introduce Hibernate 6, which unfortunately breaks backward compatibility of the CompositeUserType that the AbstractScoreHibernateType depends on.
  • The AbstractScoreHibernateType and its subtypes remain available in the OptaPlanner 8 releases to provide integration with Hibernate 5 but have been removed from the equivalent OptaPlanner 9.x release.
  • To integrate the PlanningScore of your choice with Hibernate 6, either use the score converters available in the org.optaplanner.persistence.jpa.api.score.buildin package or implement the CompositeUserType yourself.

New in OptaPlanner 8.36.0 (Mar 29, 2023)

  • OptaWeb Vehicle Routing demo application abandoned:
  • The codebase for OptaWeb Vehicle Routing demo application has been frozen and will no longer receive any updates.
  • We encourage users to check out the OptaPlanner Vehicle Routing Quickstart for a simple and straight-forward way of integrating OptaPlanner in your application.

New in OptaPlanner 8.35.0 (Mar 3, 2023)

  • This chapter lists new and noteworthy updates in OptaPlanner releases. OptaPlanner follows a 3-week release cycle. Bug fixes and minor improvements are generally not announced, which is why some of the minor releases are not mentioned here.

New in OptaPlanner 8.34.0 (Feb 17, 2023)

  • OptaPlanner can now auto-detect situations where multiple pillar move selectors can share a pre-computed pillar cache and reuse it instead of recomputing it for each move selector. Users who combine different pillar moves (such as PillarChangeMove and PillarSwapMove) should see significant benefits.

New in OptaPlanner 8.33.0 (Jan 24, 2023)

  • Value range auto-detection:
  • In most cases, links between planning variables and value ranges can now be auto-detected. Therefore, @ValueRangeProvider no longer needs to provide an id property. Likewise, planning variables no longer need to reference value range providers via valueRangeProviderRefs property.
  • No code changes or configuration changes are required. Users who prefer clarity over brevity may continue to explicitly reference their value range providers.

New in OptaPlanner 8.32.0 (Dec 20, 2022)

  • XStream support deprecated:
  • Given that XStream has multiple CVEs against it and no recent releases, we have decided to deprecate OptaPlanner’s support for serializing into XML using XStream. To continue serializing into XML, please switch to the optaplanner-persistence-jaxb module.
  • All classes in the optaplanner-persistence-xstream, as well as the module itself, are now deprecated and will be removed in a future major version of OptaPlanner.
  • All examples in the optaplanner-examples module have been refactored to JSON using the optaplanner-persistance-jackson module. Quickstarts were not affected by these changes, as they already were serializing into JSON.

New in OptaPlanner 8.31.1 (Dec 13, 2022)

  • Several OptaPlanner examples removed from the distribution:
  • In an ongoing effort to clean up code and reduce technical debt, the following examples were removed the optaplanner-examples module:
  • Batch Scheduling,
  • Cheap Time,
  • Coach Shuttle Gathering,
  • Investment
  • and Rock Tour.
  • We believe these examples were rarely used if ever, and they did not showcase any unique feature of OptaPlanner that would not be showcased already in any of the 16 remaining examples and many quickstarts.
  • No OptaPlanner feature was removed or deprecated in the process.
  • Multiple entity classes with chained planning variables:
  • Fixed a bug that prevented using two or more chained planning variables, each defined on a different planning entity class.

New in OptaPlanner 8.31.0 (Nov 29, 2022)

  • An an ongoing effort to clean up code and reduce technical debt, the following examples were removed the optaplanner-examples module:
  • Batch Scheduling,
  • Cheap Time,
  • Coach Shuttle Gathering,
  • Investment
  • and Rock Tour.
  • We believe these examples were rarely used if ever, and they did not showcase any unique feature of OptaPlanner that would not be showcased already in any of the 16 remaining examples and many quickstarts.
  • No OptaPlanner feature was removed or deprecated in the process.
  • Multiple entity classes with chained planning variables
  • Fixed a bug that prevented using two or more chained planning variables, each defined on a different planning entity class.

New in OptaPlanner 8.30.0 (Nov 8, 2022)

  • OptaPlanner operator (experimental) is available in the distribution

New in OptaPlanner 8.29.0 (Oct 17, 2022)

  • Custom justifications and indictments in Constraint Streams

New in OptaPlanner 8.27.0 (Sep 27, 2022)

  • The alternative constraint streams implementation Bavet is feature complete. You can now use it as an alternative to Drools (which is still the default).
  • Bavet will not be supported in Red Hat’s support offering. Drools intends to catch up performance wise.

New in OptaPlanner 8.23.0 (Jul 13, 2022)

  • Support for Score DRL has been deprecated and users are encouraged to migrate to Constraint Streams at their earliest convenience. To help with migration, here’s the score DRL migration guide. Score DRL is not going away in OptaPlanner 8.

New in OptaPlanner 8.20.0 (Apr 14, 2022)

  • 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 in OptaPlanner 8.17.0 (Feb 21, 2022)

  • 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 in OptaPlanner 8.12.0 (Jan 13, 2022)

  • 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 in OptaPlanner 8.5.0 (May 5, 2021)

  • Mapping in Constraint Streams
  • Ready for OpenJDK 16
  • Inject and Autowire ConstraintVerifier in Quarkus and Spring Boot
  • OptaWebs on Quarkus
  • Faster Domain Accessors and Cloning with Gizmo

New in OptaPlanner 8.4.0 (Mar 18, 2021)

  • 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.
  • 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.
  • 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.
  • Facility location problem (FLP): Pick the best geographical locations for new stores, distribution centers, covid test centers or telco masts.
  • Factorio layout: Assign machines to assembly line locations to design the best factory layout.
  • Maintenance scheduling: Coming soon
  • 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.
  • 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.

New in OptaPlanner 8.1.0 (Jan 15, 2021)

  • 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 in an upcoming release of Red Hat Decision Manager 7 in the first half of 2021.
  • 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
  • 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.
  • 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.
  • 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.

New in OptaPlanner 8.0.0 Beta 1 (Nov 3, 2020)

  • New and noteworthy: Engine 8.0.0.Beta1:
  • 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 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
  • 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.

New in OptaPlanner 7.44.0 (Oct 26, 2020)

  • More deprecations:
  • In this release, we continue deprecating some rarely used methods for which there are now better alternatives. We encourage everyone to check out our updated upgrade recipe to adapt accordingly.
  • Deprecation effort:
  • With this release, we are deprecating some rarely used methods for which there are now better alternatives. We encourage everyone to check out our updated upgrade recipe to adapt accordingly.
  • That said, we remain committed to our existing API compatibility guarantees and we will not remove any of the deprecated APIs on the 7.x stream of OptaPlanner.
  • New and noteworthy: Engine 7.37.0.Final
  • Run script for OptaWeb Vehicle Routing:
  • The run script automates setup steps that would otherwise have to be carried out manually and simplifies the run command.

New in OptaPlanner 7.39.0 (Jul 1, 2020)

  • More deprecations:
  • In this release, we continue deprecating some rarely used methods for which there are now better alternatives. We encourage everyone to check out our updated upgrade recipe to adapt accordingly.

New in OptaPlanner 7.38.0 (Jul 1, 2020)

  • Deprecation effort:
  • With this release, we are deprecating some rarely used methods for which there are now better alternatives. We encourage everyone to check out our updated upgrade recipe to adapt accordingly.
  • That said, we remain committed to our existing API compatibility guarantees and we will not remove any of the deprecated APIs on the 7.x stream of OptaPlanner.

New in OptaPlanner 7.37.0 (May 12, 2020)

  • Constraint Verifier allows for unit testing Constraint Streams

New in OptaPlanner 7.36.0 (Apr 20, 2020)

  • Constraint Verifier allows for unit testing Constraint Streams:
  • We have introduced the Constraint Verifier API, allowing you to easily test constraints developed using the Constraint Streams API. Consider the following constraint:

New in OptaPlanner 7.34.0 (Mar 10, 2020)

  • Various improvements to constraint streams:
  • We have added several new constraint collectors: toList(), toSet(), toSortedSet(), toMap() and toSortedMap(). Also, the min() and max() collectors have been extended to BiConstraintStream, TriConstraintStream` and QuadConstraintStream as well. To use these collectors, look for the ConstraintCollectors class.
  • More examples now support constraint streams:
  • With recent improvements to the constraint streams API, we have been able to add ConstraintProvider implementations to more and more examples. This release brings constraint stream support to the following examples: investment, machinereassignment and scrabble.

New in OptaPlanner 7.33.0 (Feb 18, 2020)

  • Conditional propagation in constraint streams:
  • The constraint streams API continued to evolve, gaining support for conditional propagation.

New in OptaPlanner 7.32.0 (Jan 27, 2020)

  • groupBy() support for constraint streams of all cardinalities
  • The constraint streams API improved further. You can now modify your streams using the groupBy() building block.
  • OptaWeb distribution and documentation
  • Two new tabs for OptaWeb Employee Rostering and OptaWeb Vehicle Routing have been added to Download and Documentation pages.
  • Go to Download and switch to Employee Rostering or Vehicle Routing tab to download a full distribution.
  • Go to Documentation and switch to Employee Rostering or Vehicle Routing tab to access documentation.

New in OptaPlanner 7.28.0 (Dec 17, 2019)

  • OptaPlanner Web Examples are no more:
  • The optaplanner-webexamples module was removed from distribution and the Git repository. It has been superseded by OptaWeb Vehicle Routing.

New in OptaPlanner 7.27.0 (Sep 25, 2019)

  • Pillar moves are faster:
  • PillarSwapMove and PillarChangeMove improved under the hood and are now faster. We observed increases in throughput of around 5 %. Your mileage may vary.
  • Sequential sub pillars:
  • PillarSwapMove and PillarChangeMove now support sequential sub pillars, bringing better scores on examples with clear entity succession, such as employee shift rostering. The simplest configuration of sequential sub pillars looks like this:

New in OptaPlanner 7.15.0 (Dec 4, 2018)

  • The KIE Workbench (which includes OptaPlanner support) has been renamed to Business Central

New in OptaPlanner 7.9.0 (Jul 27, 2018)

  • Multithreaded incremental solving:
  • OptaPlanner can now solve one dataset (without partitioning) with multiple threads to take advantage of multiple CPU cores.
  • Even with just a few CPU cores, it triples the score calculation speed:

New in OptaPlanner 7.8.0 (Jul 7, 2018)

  • Solver.explainBestScore()
  • To make it easier to understand why a solution is infeasible during development (before the UI makes use of the ConstraintMatch API), use explainBestScore() after solving:

New in OptaPlanner 7.7.0 (Apr 6, 2018)

  • @PlanningPin to pin down planning entities:
  • To pin down an assignment and force OptaPlanner to leave it untouched, simply add the @PlanningPin annotation on a planning entity’s boolean property and make it true for those that are immovable
  • This is syntactic sugar for the more flexible and more verbose movableEntitySelectionFilter.

New in OptaPlanner 7.3.0 (Sep 14, 2017)

  • New and noteworthy: Engine
  • Benchmark a solver configuration quickly
  • There isn’t a valid excuse any more to not use the benchmarker. You can now run it in just a few lines of java code (no XML code)
  • This builds and runs a vanilla benchmark that gives insight in the performance and scalability of your implementation. To get more insight, switch to the XML configuration.
  • New and noteworthy: Workbench
  • Guided decision tables integration
  • OptaPlanner now integrates with the Guided decision table editor. Modify the score with a build-in OptaPlanner actions that can be accessed in the Action BRL fragment column type.
  • New and noteworthy: Execution Server

New in OptaPlanner 6.5.0 / 7.0.0 Beta (Mar 10, 2017)

  • NEW:
  • Java 8 or higher:
  • OptaPlanner 7.x now requires Java 8 or higher to run. The 6.x releases remain compatible with Java 6 or higher.
  • The API and implementation now make use of Java 7 and Java 8 features (such as lamdba’s).
  • Multi-threaded partitioned search:
  • OptaPlanner now has out of the box support for solving a single dataset by partitioning across multiple threads. So it makes use of multiple CPU cores for a single problem.
  • Partitioned Search can implement geo-fencing for Vehicle Routing use cases. For example, we can split up Great Britain into 4 parts and solve those parts separately. This can potentially reduce solution quality, but for big datasets (usually above 5000 entities) the performance gains normally outweighs the long-term quality loss, because when a result is needed within hours or less, the solution quality is still higher.
  • No longer needed to implement the Solution interface:
  • Your solution class no longer needs both have the @PlanningSolution annotation and implement the Solution interface. No need to repeat yourself any more. The Solution interface is now deprecated (but still works for backwards compatibility): only the @PlanningSolution annotation suffices.
  • Instead of implementing the old interface methods, annotate your Score getter with @PlanningScore. If you’re using Drools score calculation, annotate all problem fact getters (or fields) with @ProblemFactCollectionProperty or @ProblemFactProperty.
  • No longer needed to define the score type in the solver configuration
  • New JAXB and Jackson support and improved XStream support
  • New module optaplanner-test with JUnit testing support
  • Other improvements:
  • Booleans are now supported by ValueRangeFactory too: createBooleanValueRange()
  • Dates and time are now supported by ValueRangeFactory too: createTemporalValueRange(). Contributed by Kevin Wallis.
  • @ValueRangeProvider now supports methods that return an array too.
  • The log now outputs the score calculation speed for each solver phase too.
  • The documentation is now in AsciiDoc, which improves output quality and makes it easier to contribute.
  • HardMediumSoftBigDecimalScore: 3 score levels of BigDecimal scores. Contributed by Brad Hards.