OptaPlanner 9: Here’s Everything You Need To Know

ERP Solutions oodles
3 min readAug 24, 2023

--

One of the most popular software tools for creating unique, Java-based planning solutions to address various industry-specific difficulties is OptaPlanner. It assists enterprises in resolving a variety of optimisation issues using cutting-edge heuristic and metaheuristic algorithms as an AI constraint solver. This embeddable planning engine has gone through multiple iterations, the most recent being OptaPlanner 9. OptaPlanner’s ninth edition has a number of noteworthy improvements and aids users in migrating to Jakarta EE, Quarkus 3, and Spring Boot 3.

We’ll look at the key differences between OptaPlanner 8 and OptaPlanner 9 in this blog post. You will afterwards discover a straightforward method for migrating from OptaPlanner 8 to OptaPlanner 9.

Also, Read Upgrading Your OptaPlanner Project: A Step-by-Step Guide

What’s New In OptaPlanner 9?

The most recent version of OptaPlanner, version 9.37.0, has been available for a while. Although OptaPlanner’s core functionality is unchanged, it differs from earlier versions thanks to a few additions and exceptions. The OptaPlanner website offers an automatic script that can be used by anyone who want to upgrade from version 8 to version 9. OptaPlanner 8 will still be usable for the time being, so users are welcome to keep using it.

Notable Differences Between OptaPlanner 8 and 9

Both OptaPlanner 8 and OptaPlanner 9 have the same number of features and share numerous commonalities. Additionally, both editions work flawlessly with their respective APIs. However, there are a few significant variations between the two, as a result of the modifications made at the package level by Jakarta EE 10 that have an impact on the entire Java ecosystem.

The framework compatibility of OptaPlanner 8 vs. OptaPlanner 9 is outlined in the table below:

Framework OptaPlanner 8 OptaPlanner 9

Jakarta EE 8 (via Quarkus) 10 (via Quarkus)

Quarkus 2 3

Spring Boot 2 3

The ninth edition of OptaPlanner does not enable DRL score calculation when used with Quarkus because it has been outlawed. Therefore, if you wish to use DRL score calculation, you must switch to the constraint streams API. The AbstractScoreHibernateType and its subclasses are no longer supported by the most recent version (ver. 9.37.0).

Also, Read The Top Industrial Use Cases of OptaPlanner

Migrating To OptaPlanner 9

For customers who do not use Quarkus or Spring Boot, upgrading to OptaPlanner 9 will be a reasonably easy and uncomplicated process. These users only need to alter a single version of the optaplanner-bom in order to alter dependencies.

<dependency>

<groupId>org.optaplanner</groupId>

<artifactId>optaplanner-bom</artifactId>

<version>9.37.0.Final</version>

<type>pom</type>

<scope>import</scope>

</dependency>

However, users of Quarkus or Spring Boot may find the procedure to be a little more difficult. The steps listed below must be taken by these users:

  • First and foremost, we must swap out all javax. package imports for their jakarta. equivalents. As a result, we must modify dependencies appropriately.
  • We must switch the Quarkus 2 dependencies to the Quarkus 3 requirements.
  • Lastly, we must switch from relying on Spring Boot 2 to Spring Boot 3. However, in the case of Spring Boot 3, a move to Java 17 is also crucial.

You can issue the following commands in the root directory of your project for a quicker response.

mvn clean org.openrewrite.maven:rewrite-maven-plugin:4.43.0:run \

-Drewrite.recipeArtifactCoordinates=org.optaplanner:optaplanner-migration:9.37.0.Final \

-Drewrite.activeRecipes=org.optaplanner.migration.ToLatest9

Also, Read OptaPlanner Development Services For Improved Employee Roster Management

Closing Remarks

Since we’ve talked about the improvements and adjustments coming to OptaPlanner 9, you must be asking what the main motivating factors are as well. The transition of projects like Quarkus and Spring Boot from Java EE APIs to Jakarta EE was the primary driver behind the release of OptaPlanner 9. Nevertheless, OptaPlanner 9 was created to offer a practical means of effortlessly integrating these modifications without degrading the experience of its customers.

To streamline your business processes, use our OptaPlanner development services.

We, at Oodles, provide end-to-end enterprise solutions to steer clear of your routine operational challenges. Our seasoned developers specialize in using OptaPlanner to develop custom and feature-rich planning solutions for varying business needs. Our OptaPlanner development services are conducive to streamlining complex business processes and building resilience. Contact us at erp@oodles.io for more details.

--

--

ERP Solutions oodles
ERP Solutions oodles

Written by ERP Solutions oodles

We are a leading ERP development company in India offers a wide range of ERP software development services to help you grow your business exponentially.

No responses yet