Upgrade to the latest Timefold Solver

Apache 2.0

Replace all your calls to deleted/deprecated types and methods of Timefold Solver with their proper alternatives.

ai.timefold.solver.migration.ToLatest
mod run . --recipe=ai.timefold.solver.migration.ToLatest

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate from OptaPlanner to Timefold Solver
  2. Change property key
  3. Change property key
  4. Change method name ai.timefold.solver.core.api.score.stream.ConstraintFactory from(Class) to forEach
  5. Change method name ai.timefold.solver.core.api.score.stream.ConstraintFactory fromUnfiltered(Class) to forEachIncludingUnassigned
  6. Change method name ai.timefold.solver.core.api.score.stream.ConstraintFactory fromUniquePair(..) to forEachUniquePair
  7. ScoreManager: explain(), update()
  8. Change type ScoreManager to SolutionManager
  9. Score: use shorter getters
  10. Replace getConstraint*() with getConstraintRef()
  11. SolverManager: use builder API
  12. PlanningVariable's nullable is newly called unassignedValues
  13. Use non-deprecated SingleConstraintAssertion methods
  14. ConstraintStreams: use asConstraint() methods to define constraints
  15. Constraint Streams: don't use package name in the asConstraint() method
  16. Recommended Fit API becomes Assignment Recommendation API
  17. Use non-deprecated related sorting fields and methods
  18. Use non-deprecated environment constants
  19. Remove unused imports
  20. Change the Timefold version