By

The work on Timefold Solver 1.0.0 is progressing well. We intend to release in early July. This post will give you a sneak peek of what’s coming.

Brand new benchmark report

The solver benchmark report has been completely redesigned and modernized. It now fits nicely on all kinds of screens, from mobile phones to desktops.

Importantly, every chart in the report is now interactive, allowing you to filter the data points to only show those you want to see.

Screenshot of the new charts

Static pictures don’t do it justice, you need to see it to believe it. Did you know you can build the solver locally to get access to the latest developments before they’re generally available?

Constraint Streams improvements

Constraint Streams are a powerful way to express constraints in a declarative way. In Timefold Solver 1.0.0, they will become even more powerful by introducing the expand() building block. Consider the following constraint:

Constraint speakerRequiredRoomTags(ConstraintFactory factory) {
    return factory.forEach(Talk.class)
        .filter(talk -> talk.missingSpeakerRequiredRoomTagCount() > 0)
        .penalizeConfigurable(talk -> talk.missingSpeakerRequiredRoomTagCount() * talk.getDurationInMinutes())
        .asConstraint(SPEAKER_REQUIRED_ROOM_TAGS);
}

Note that the method missingSpeakerRequiredRoomTagCount() is called twice; once to filter Talk instances and the second time to penalize every one of them. This is not ideal, and it becomes even worse when you realize that under the hood, this method does some heavy lifting to compute the missing tags. The end result is that this constraint is not very efficient. With the new expand() building block, we can rewrite it as follows:

Constraint speakerRequiredRoomTags(ConstraintFactory factory) {
    return factory.forEach(Talk.class)
            .expand(Talk::missingSpeakerRequiredRoomTagCount)
            .filter((talk, missingTagCount) -> missingTagCount > 0)
            .penalizeConfigurable((talk, missingTagCount) -> missingTagCount * talk.getDurationInMinutes())
            .indictWith((talk, missingTagCount) -> Collections.singleton(talk))
            .asConstraint(SPEAKER_REQUIRED_ROOM_TAGS);
}

Notice that the expand() building block caches the computation and propagate it downstream.

We use the not-so-well-known indictWith() building block, which allows us to indicate which facts are responsible for the constraint violation. Since missingTagCount is a plain integer without any semantics, it doesn’t help us to explain the score and therefore it is removed.

Performance improvements and bugfixes

Behind the scenes, we continue to work tirelessly to improve the performance of our solution. With Timefold Solver 1.0.0, users of Constraint Streams will see performance improvements of up to 15% in some cases. And that is on top of the significant speedup that Timefold already brings over OptaPlanner!

Comparison of OptaPlanner and Timefold performance

Conclusion

Timefold moves ahead at an ever increasing pace. Migrate to Timefold today, and enjoy the benefits of a modern, fast and powerful constraint solver.

Continue reading

  • Java versus Python performance benchmarks on PlanningAI models

    Discover the techniques Timefold Engineers deploy to make your Python code faster.

  • Simplify the Shadow Variable Listener Implementation

    Learn how to simplify creating listeners for planning list variables with the new shadow variable @CascadingUpdateShadowVariable.

  • Load balancing and fairness in constraints

    Discover how to bring fairness to your Timefold solution

  • Optimize routing and scheduling in Python: a new open source solver Timefold

    Automate and optimize your operations scheduling in Python with Timefold AI

  • Timefold Solver Python live in Alpha

    Empowering developers to solve planning problems

  • How to speed up Timefold Solver Startup Time by 20x with native images

    Discover how to build a Spring native image and the benefits from doing so.

Sign up for our newsletter

And stay up to date with announcements, the latest news, events, roadmap progress & product updates from Timefold!

We care about the protection of your data. Read our Privacy Policy.

Stay In-The-Know

Sign Up for Our Newsletter

We care about the protection of your data. Read our Privacy Policy.

Timefold

Timefold is an AI planning optimization platform, built on powerful open-source solver technology, enabling software builders to tackle real-world, complex and high-impact operational planning problems. It delivers significant economic value in optimization operations like extended VRP, maintenance scheduling, field service routing, task sequencing, etc.

© 2024 Timefold BV