Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/20/12 22:51:59 (11 years ago)
Author:
abeham
Message:

#1836: Changed reheating strategy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/SimulatedAnnealing.cs

    r9085 r9086  
    6262    private const string TemperatureChartName = "Temperature Chart";
    6363    private const string TemperatureAnalyzerName = "Temperature Analyzer";
    64     private const string ChangeInertiaName = "ChangeInertia";
     64    private const string ThresholdName = "Threshold";
     65    private const string MemorySizeName = "MemorySize";
    6566    #endregion
    6667
     
    99100      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters[HeatingOperatorName]; }
    100101    }
    101     private ValueParameter<IntValue> ChangeInertiaParameter {
    102       get { return (ValueParameter<IntValue>) Parameters[ChangeInertiaName]; }
     102    private ValueParameter<DoubleRange> ThresholdParameter {
     103      get { return (ValueParameter<DoubleRange>) Parameters[ThresholdName]; }
     104    }
     105    private ValueParameter<IntValue> MemorySizeParameter {
     106      get { return (ValueParameter<IntValue>) Parameters[MemorySizeName]; }
    103107    }
    104108    private ValueParameter<IntValue> MaximumIterationsParameter {
     
    161165      set { AnalyzerParameter.Value = value; }
    162166    }
    163     public IntValue ChangeInertia {
    164       get { return ChangeInertiaParameter.Value; }
    165       set { ChangeInertiaParameter.Value = value; }
     167    public DoubleRange AcceptanceThreshold {
     168      get { return ThresholdParameter.Value; }
     169      set { ThresholdParameter.Value = value; }
     170    }
     171    public IntValue AcceptanceMemorySize {
     172      get { return MemorySizeParameter.Value; }
     173      set { MemorySizeParameter.Value = value; }
    166174    }
    167175    private RandomCreator RandomCreator {
     
    195203      Parameters.Add(new ValueParameter<DoubleValue>(LowerTemperatureName, "The lower bound for the temperature.", new DoubleValue(1e-6)));
    196204      Parameters.Add(new ValueParameter<MultiAnalyzer>(AnalyzerName, "The operator used to analyze each iteration.", new MultiAnalyzer()));
    197       Parameters.Add(new ValueParameter<IntValue>(ChangeInertiaName, "The inertia (= number of iterations) that the process spends before switching between heating and cooling.", new IntValue(10)));
     205      Parameters.Add(new ValueParameter<IntValue>(MemorySizeName, "The maximum size of the acceptance memory.", new IntValue(100)));
     206      Parameters.Add(new ValueParameter<DoubleRange>(ThresholdName, "The threshold controls the temperature in case a heating operator is specified. If the average ratio of accepted moves goes below the start of the range the temperature is heated. If the the average ratio of accepted moves goes beyond the end of the range the temperature is cooled again.", new DoubleRange(0.05, 0.2)));
    198207
    199208      var randomCreator = new RandomCreator();
     
    247256      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
    248257      mainLoop.AnnealingOperatorParameter.ActualName = AnnealingOperatorParameter.Name;
    249       mainLoop.ChangeInertiaParameter.ActualName = ChangeInertiaParameter.Name;
     258      mainLoop.MemorySizeParameter.ActualName = MemorySizeParameter.Name;
     259      mainLoop.ThresholdParameter.ActualName = ThresholdParameter.Name;
    250260      mainLoop.CoolingParameter.ActualName = CoolingName;
    251261      mainLoop.EndTemperatureParameter.ActualName = EndTemperatureName;
Note: See TracChangeset for help on using the changeset viewer.