Upgrade from OptaPlanner to Timefold Solver Community Edition today. It only takes 2 minutes.
Run the command below to upgrade your code automatically. Do a test run of the solver and commit the changes. If it doesn’t work, just revert it instead and submit an issue. We’ll fix it with the highest priority.
Upgrade from OptaPlanner 8.x to Timefold Solver 0.8.x
mvn org.openrewrite.maven:rewrite-maven-plugin:4.46.0:run -Drewrite.recipeArtifactCoordinates=ai.timefold.solver:timefold-solver-migration:0.8.41 -Drewrite.activeRecipes=ai.timefold.solver.migration.ToLatest
curl https://timefold.ai/product/upgrade/upgrade-timefold08.gradle > upgrade-timefold08.gradle ; gradle -Dorg.gradle.jvmargs=-Xmx2G --init-script upgrade-timefold08.gradle rewriteRun -DtimefoldSolverVersion=0.8.41 ; rm upgrade-timefold08.gradle
Upgrade from OptaPlanner 8.x/9.x to Timefold Solver 1.x
mvn org.openrewrite.maven:rewrite-maven-plugin:5.10.0:run -Drewrite.recipeArtifactCoordinates=ai.timefold.solver:timefold-solver-migration:1.4.0 -Drewrite.activeRecipes=ai.timefold.solver.migration.ToLatest
curl https://timefold.ai/product/upgrade/upgrade-timefold.gradle > upgrade-timefold.gradle ; gradle -Dorg.gradle.jvmargs=-Xmx2G --init-script upgrade-timefold.gradle rewriteRun -DtimefoldSolverVersion=1.4.0 ; rm upgrade-timefold.gradle
Timefold Solver 1.x does not support
scoreDRL, nor is it upgraded automatically.
If you’re still using
scoreDRL from OptaPlanner 7.x,
please upgrade to ConstraintStreams first.
Why would I switch from OptaPlanner to Timefold?
Because it’s better:
Continuity, responsiveness, know-how and stability: The entire Timefold company is focused on building the best possible planning optimization software and helping you succeed with it. Timefold Solver has many bugfixes and security fixes since it forked from OptaPlanner. We also added powerful new features and enhancements.
Performance: Timefold is twice as fast as OptaPlanner out-of-the-box.
Distribution size: Cloud deployments love lightweight components. Timefold has all the features of OptaPlanner, but a
jar-with-dependenciesassembly of the same Hello World program is 41% smaller:
Timefold Solver has fewer dependencies. This also speeds up your Maven or Gradle build.
Documentation: We are constantly improving the documentation and fine-tuning the quickstarts. It’s easier to get started with Timefold than with OptaPlanner.
How do the OptaPlanner and Timefold versions relate?
Timefold 0.8.x is a replacement for OptaPlanner 8. It supports Java 11, Java 17, Spring Boot 2, Quarkus 2 and Java EE 8.
Timefold 1.x is a replacement for OptaPlanner 9. It supports Java 17+, Spring Boot 3, Quarkus 3 and Jakarta EE 10.
Is Timefold Backward Compatible with OptaPlanner?
Yes, except for the branding changes.
Run timefold-migration to automatically change all your code locally. It’s a quick, single command for Maven or Gradle. Then test those changes and commit them. Alternatively, apply the following changes manually.
Timefold Solver 0.8.x is backward compatible with OptaPlanner 8.x, except that:
The Maven/Gradle GAVs changed:
The groupId changed from
The artifactIds changed from
The import statements changed accordingly:
import org.optaplanner…;changed to
import org.optaplanner.persistence…;changed to
OptaPlannerJacksonModuleclass is now called
That’s all if you upgrade from OptaPlanner 8.x to Timefold Solver 0.8.x.
Timefold Solver 1.x has these additional changes:
Minimum Java 17 (LTS). The latest Java version works too. We intend to support Java 21 (LTS) when it’s available.
The JEE dependencies changed from
jakartato accommodate Spring 3 and Quarkus 3.
This is the same difference as between OptaPlanner 8.x and OptaPlanner 9.x.
scoreDRLsupport is removed, because Drools with its transitive dependencies have been removed entirely.
The unsecure module
persistence-xstreamis removed, because of old, unresolved CVEs in XStream.
The deprecated, undocumented
ScoreHibernateTypehas been removed because of Jakarta. Use JPA’s
All other deprecated code remains, to make upgrading easy.