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

Release Notes 6.0

We are happy to announce a 6.0 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
9.44.0.Final
Documentation
Documentation
9.44.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)
7.13 8.13 (and 7.67)

New and noteworthy

Drools Planner renamed to OptaPlanner

OptaPlanner is the new name for Drools Planner. For more information, see the full announcement.

Faster and easier scoreDRL

The new constraint match system is:

  • Faster: The average calculate count per seconds increases between 7% and 40% on average per use case.

  • Easier to read and write

  • Less error-prone: It’s much harder to cause score corruption in your DRL.

Before:

    rule "conflictingLecturesSameCourseInSamePeriod"
        when
            ...
        then
            insertLogical(new IntConstraintOccurrence("conflictingLecturesSameCourseInSamePeriod", ConstraintType.HARD,
                    -1,
                    $leftLecture, $rightLecture));
    end

After:

    rule "conflictingLecturesSameCourseInSamePeriod"
        when
            ...
        then
            scoreHolder.addHardConstraintMatch(kcontext, -1);
    end

Notice that you don’t need to repeat the rule name or the causes (the lectures) no more. OptaPlanner figures out it itself through the kcontext variable. Drools automatically exposes the kcontext variable in the RHS, so you don’t need any extra code for it.

You also no longer need to hack the APIs to get a list of all ConstraintOccurrences: the ConstraintMatch objects (and their totals per constraint) are available directly on the ScoreDirector API.

For more information, see this blog post and the reference manual.

Construction heuristics now use selectors

The construction heuristics now use the selector architecture so they support selection filtering, etc. Sorting can be overwritten at a configuration level (very handy for benchmarking).

In use cases with multiple planning variables (for example period, room and teacher), you can now switch to a far more scalable configuration.

Automatic solution cloning

Implementing the Solution’s planning clone method is now optional. This means there’s less boilerplate code to write and it’s harder to cause score corruption in your code.

For more information, see this blog post and the reference manual.

New built-in scores

There are new built-in score definitions, such as: HardMediumSoftScore (3 score levels), BendableScore (configurable number of score levels), HardSoftLongScore, HardSoftDoubleScore, HardSoftBigDecimalScore, …​

Planning Variable Listener (shadow variables)

A planning variable can now have a listener which updates a shadow planning variable.

A shadow planning variable is a variable that is never changed directly, but can be calculated based on the state of the genuine planning variables. For example: in VRP with time windows, the arrivalTime at a customer can be calculated based on the previous customers of that vehicle.

Bi-directional variable relationship for chained variables

A shadow planning variable can now be mappedBy a genuine variable. OptaPlanner will automatically update the shadow variable if the genuine variable is changed. Currently this is only supported for chained variables.

TSP and VRP: Chained variables are more scalable

Several improvements have made use cases like TSP and VRP more scalable. The code has been optimized to run significantly faster. Also, <subChainSelector> now supports <maximumSubChainSize> to scale out better.

New metaheuristic: Step Counting Hill Climbing

Step Counting Hill Climbing is easy to configure and has good results. Generally, it behaves and feels a lot like Late Acceptance. Try it out with the Benchmarker.

Benchmarker improvements

  • Best solution mutation statistic: shows for every new best solution found, how many variables needed to change to improve the last best solution.

  • Step score statistic: shows how the step score evolves over time.

  • The Benchmarker now highlights infeasible solutions with an orange exclamation mark.

  • The Benchmarker now shows standard deviation per solver configuration (thanks to Miroslav Svitok).

New examples

  • VRP with time windows: The VRP example can now also handle the capacitated vehicle routing problem with time windows.

  • Project job scheduling: A form of job shop scheduling, for example to schedule the production of diverse books, cars or other products to machines and employees (thanks to Lukáš Petrovický)

Example improvements

  • The GUIs of course scheduling, exam scheduling, hospital bed planning and sport scheduling have been improved.

  • The optaplanner examples Swing GUI has been redesigned to take up less space.

  • A webapp variant of the cloud balancing example has been added to optaplanner-webexamples.war (thanks to Frederic Hornain).

Other improvements

  • Domain classes that extend/implement a @PlanningEntity class or interface can now be used as planning entities.

  • Nullable variables support improved and fixed.

  • Late Acceptance improved.

  • Ratio based entity tabu (thanks to Lukáš Petrovický).

  • Drools properties can now be optionally specified in the solver configuration XML.

  • Mimic selection: useful to create a cartesian product selection of 2 change move selectors that move different variables of the same entity.

  • KieBase support, for example to integrate decision tables or scorecards.

  • OSGi support out-of-the-box in the optaplanner jars.

Upgrade your code to 6.0

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
  • 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