Search code examples
optaplanner

Optaplanner termination strategy based on dynamic score


We are not only using penalties but also rewards in our case. We have to use rewards as we don't find a way to convert the non-rewards to penalties. And we want to have a termination strategy based on best score. If we only have penalties, that will be easy by just setting optaplanner.solver.termination.best-score-limit=0hard/0medium/0softin the application properties, which is static. However, if we have rewards and the maximum rewards are unknown when starting up the service and are determined by each request and that means it differs per request. Is there a way to set the termination strategy per request? Thanks!


Solution

  • In OptaPlanner, no. In Timefold Solver, see SolverConfigOverride.