'Implement problem change on solver instance created from solverManager.solveAndListen() [Optaplanner version 8.14]

If I'm using the 8.14 version of Optaplanner, not considering the option to move to a later version. Is there a way for me to implement problem change(real-time planning) using the solver instance created from solverManager.solveAndlisten() not the solver.solve()?



Solution 1:[1]

No, in 8.14 it's not possible to do problem fact changes on the SolverManager.

Either upgrade to 8.17 or use the workaround suggested in this answer: How to implement a problemFactChange while using optaplanner-spring-boot-starter?.

The workaround injects SolverFactory, builds a Solver instance and uses solver.solve().

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 yurloc