Search code examples
optaplannersimulated-annealing

Why does Optaplanner not allow configuring the decay rate in simulated annealing?


I want to use Simulated Annealing in OptaPlanner, but I am a little baffled by the fact that there is only a setting for the initial temperature and not one for the decay rate. What is the reason for this choice?


Solution

  • The cooldown rate is automatically derived from the timeGradient, which is simply put 0.0 at the start, 0.5 at half the spentTime and 1.0 at all of the spentTime.

    But yes, the classic Simulated Annealing method has 2 parameters (starting temperature and cooldown rate). One could implement such an SA pretty easily by copy-pasting the SimulatedAnnealingAcceptor and configuring it in the AcceptorConfig.

    That being said, tuning 2 parameters is a pain for users. That's why OptaPlanner default SA only has 1 parameter that - together with the termination - is translated into the 2 parameters that SA needs.