Timefold Solver 2.0.0
We are excited to announce Timefold Solver 2.0.0, the first major version bump in three years. There is a lot to unpack, let's get into it.
What's new in the Community Edition
The Neighborhoods API (Preview)
Custom moves just got a fresh look. The new Neighborhoods API is our vision for how move customization should work going forward, and it's cleaner and more expressive than the move selectors it will eventually replace.
We're releasing it in preview because we want your feedback before we finalize the API. Give it a try, see how it fits your use case, and let us know what you think. There are significant pieces of the API which have yet to be delivered, such as nearby selection or pillars, and we hope to do that with input from our community.
New Joiners for Constraint Streams
If your constraint streams use Joiners.filtering(… contains(…) …) on a collection, pay attention to this one. We've added new containing, containedIn and containingAnyOf joiners that handle this pattern natively. Depending on how often those constraints fire, you may see a significant performance improvement; in some of our testing, we've seen a 3x speedup (YMMV).
JDK 21 and Modularity (JPMS)
The solver now requires Java 21 (or later) to run. You can now also opt-in to use the solver on the modulepath. Don't worry though - if your project remains on the classpath, nothing changes for you.
Breaking Changes
For the first time since Timefold Solver was forked from OptaPlanner, we've removed previously deprecated APIs and introduced a small number of additional incompatible changes. This release is not backwards compatible with OptaPlanner.
We know "breaking changes" sounds scary, but here's the honest picture: if you've been keeping up with the 1.x releases and following the upgrade recipes, most of the deprecated code in your project is probably already gone, or close to it. Many of the changes are also fully automated via OpenRewrite, as described in the upgrade recipe. All in all, upgrading is more approachable than you might expect — don't let the major version number put you off.
Explainability changes
We've decided to move explainability features incl. score analysis to the Enterprise Edition. Find out more in a separate announcement.
What's new in the Enterprise Edition
Multi-threaded Solving Even Faster
Multi-threaded solving has been significantly improved. The algorithm now scales much better with fast moves, and blocking behavior has been improved in a way that lets you get more out of higher thread counts than before.
If you were previously running 4 move threads for optimal performance, we recommend re-testing with 8 or even 16 - provided your hardware allows for it. The sweet spot has shifted upward for most workloads.
Binaries on Maven Central
Enterprise binaries are no longer hosted in a separate Maven repository. They're available directly from Maven Central, which simplifies your build setup considerably.
Note that the Enterprise binaries are now protected by a license check, so you'll need to obtain a Timefold license before upgrading. Make sure you have your license in hand before you start the upgrade process. Find out more about the changes to Timefold's commercial offerings, including free access for non-profits and academic research.
How to Upgrade
We recommend reading through the upgrade recipe, which will guide you. Many of the changes are automated, and the ones that aren't are clearly documented. If you've been keeping up to date with the 1.x releases, you're already most of the way there.
As always, the quickstarts are a great place to see what Timefold Solver looks like in practice. Share your feedback with us in Github Discussions, on Timefold Discord, or through commercial support if you have it available.
We're grateful to have you with us for this next chapter. Here's to what comes next!