Upgrade to the latest Timefold Solver
Apache 2.0Replace all your calls to deleted/deprecated types and methods of Timefold Solver with their proper alternatives.
ai. timefold. solver. migration. ToLatestmod run . --recipe= ai. timefold. solver. migration. ToLatestInstall 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.
- Migrate from OptaPlanner to Timefold Solver
- Change property key
- Change property key
- Change method name
ai.timefold.solver.core.api.score.stream.ConstraintFactory from(Class)toforEach - Change method name
ai.timefold.solver.core.api.score.stream.ConstraintFactory fromUnfiltered(Class)toforEachIncludingUnassigned - Change method name
ai.timefold.solver.core.api.score.stream.ConstraintFactory fromUniquePair(..)toforEachUniquePair - ScoreManager: explain(), update()
- Change type
ScoreManagertoSolutionManager - Score: use shorter getters
- Replace getConstraint*() with getConstraintRef()
- SolverManager: use builder API
- PlanningVariable's
nullableis newly calledunassignedValues - Use non-deprecated SingleConstraintAssertion methods
- ConstraintStreams: use asConstraint() methods to define constraints
- Constraint Streams: don't use package name in the asConstraint() method
- Recommended Fit API becomes Assignment Recommendation API
- Use non-deprecated related sorting fields and methods
- Use non-deprecated environment constants
- Remove unused imports
- Change the Timefold version