I am planning to use optplanner to optimize the server usage and if required add additional hardware on demand.
My questions is: How to auto increment one variable if system is not able to find a optimal solution after a certain fixed time?
I am planning to use optplanner to optimize the server usage and if required add additional hardware on demand.
My questions is: How to auto increment one variable if system is not able to find a optimal solution after a certain fixed time?
I don't know if it would work for your specific use case but you could define a custom phase where you modify your Problem Entity.
If you need to modify a Problem Fact then I would set a time on a thread separate from the one where you called solve(). Once the timer hits 0 you can introduce a ProblemFactChange to the solver.