0

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?

Harvinder Singh
  • 681
  • 7
  • 20

1 Answers1

0

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.

  • Thanks for the possible solution, but I am more looking for a feature supported by Optaplanner itself. e.g. Provide a possible range of available virtual machine on each computer, then solver solves for computer 1 - 2 virtual machine, Computer 2 - 1 virtual machine and so on. – Harvinder Singh Jun 01 '15 at 13:06