Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1294

Simulated Annealing: the startingTemperature parameter should have a good default

    XMLWordPrintable

Details

    • NEW
    • NEW

    Description

      In the meeting we just discussed this idea:

      Proposal A) Sample a number of moves at the beginning of the SA phase and use the higher score difference as the startingTemperature.

      In SimulatedAnnealingAcceptor.java, we can add this HACK to run a benchmark to see if this approach makes any sense:

          protected int count = 0;
          protected int maxCount = 10_000;
      
      ...
          public boolean isAccepted(LocalSearchMoveScope moveScope) {
              if (count < maxCount) {
                  startingTemperatureLevels = Math.max(startingTemperatureLevels, lastStepScore.subtract(moveScore));
                  count++;
                  if (count == maxCount) {
                      temperatureLevels = ;
                  }
                  return false;
              }
             ... // Rest of the method that is there currenlty.
      
      

      Pitfall: if a sample move has -9hard/-1soft and another has -2hard/-8soft, what is the maximum? Well, "-9hard/-1soft " is, but we probably want to do a Score.joinedMaximumPerLevel() (method does not exist yet) to get -9hard/-8soft.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gdesmet@redhat.com Geoffrey De Smet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: