Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15333 for branches/jschiess


Ignore:
Timestamp:
08/21/17 11:17:24 (7 years ago)
Author:
jschiess
Message:

#1836 SA reheating strategies
+ added an adaptive temperature control strategy
+ some refactorings

Location:
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/AcceptanceRatioReheatingOperator.cs

    r15315 r15333  
    3939        private const string AverageAcceptanceRatioName = "AverageAcceptanceRatio";
    4040        private const string ReheatWindowSizeName = "ReheatWindowSize";
     41        private const string LastAcceptedQualityName = "LastAcceptedQuality";
     42        private const string MoveQualityName = "MoveQuality";
    4143
    4244
     
    6769            get { return (ILookupParameter<IntValue>)Parameters[IterationsName]; }
    6870        }
    69         public ILookupParameter<IOperator> AnnealingOperatorParameter
    70         {
    71             get { return (ILookupParameter<IOperator>)Parameters[AnnealingOperatorName]; }
     71        public ILookupParameter<IDiscreteDoubleValueModifier> AnnealingOperatorParameter
     72        {
     73            get { return (ILookupParameter<IDiscreteDoubleValueModifier>)Parameters[AnnealingOperatorName]; }
    7274        }
    7375        public ILookupParameter<IntValue> MaximumIterationsParameter
     
    110112        {
    111113            get { return (IValueParameter<IntValue>)Parameters[ReheatWindowSizeName]; }
     114        }
     115        public ILookupParameter<DoubleValue> MoveQualityParameter
     116        {
     117            get { return (ILookupParameter<DoubleValue>)Parameters[MoveQualityName]; }
     118        }
     119        public ILookupParameter<DoubleValue> LastAcceptedQualityParameter
     120        {
     121            get { return (ILookupParameter<DoubleValue>)Parameters[LastAcceptedQualityName]; }
    112122        }
    113123
     
    120130            Parameters.Add(new LookupParameter<DoubleValue>(LowerTemperatureName, "The lower bound of the temperature."));
    121131            Parameters.Add(new LookupParameter<IntValue>(IterationsName, "The number of iterations."));
    122             Parameters.Add(new LookupParameter<IOperator>(AnnealingOperatorName, "The operator that cools the temperature."));
     132            Parameters.Add(new LookupParameter<IDiscreteDoubleValueModifier>(AnnealingOperatorName, "The operator that cools the temperature."));
    123133            Parameters.Add(new LookupParameter<IntValue>(TemperatureStartIndexName, "The index where the annealing or heating was last changed."));
    124134            Parameters.Add(new LookupParameter<DoubleValue>(StartTemperatureName, "The temperature from which cooling or reheating should occur."));
     
    134144            Parameters.Add(new LookupParameter<DoubleValue>(AverageAcceptanceRatioName, "Average acceptance over full acceptance memory."));
    135145            Parameters.Add(new ValueParameter<IntValue>(ReheatWindowSizeName, "The amount of iterations each reheat needs to heat the current temperature to upper temperature.", new IntValue(10000)));
     146            Parameters.Add(new LookupParameter<DoubleValue>(LastAcceptedQualityName, "Quality of last accepted solution."));
     147            Parameters.Add(new LookupParameter<DoubleValue>(MoveQualityName, "The value which represents the quality of a move."));
    136148            #endregion
    137149
     
    173185        public override IOperation Apply()
    174186        {
    175             var isAccepted = IsAcceptedParameter.ActualValue;
     187            var isAccepted = IsAcceptedParameter.ActualValue.Value && LastAcceptedQualityParameter.ActualValue.Value != MoveQualityParameter.ActualValue.Value;
    176188            var acceptances = AcceptanceMemoryParameter.ActualValue;
    177189            var cooling = CoolingParameter.ActualValue.Value;
    178190            var ratioAmount = AverageAcceptanceRatioParameter.ActualValue;
    179191
    180             acceptances.Add(isAccepted);
    181 
    182             ratioAmount.Value += isAccepted.Value ? 1 : 0;
    183 
     192            acceptances.Add(new BoolValue(isAccepted));
     193            ratioAmount.Value += isAccepted ? 1 : 0;
    184194
    185195            if (acceptances.Count > MemorySizeParameter.Value.Value) {
     
    216226                CoolingParameter.ActualValue.Value = cooling;
    217227            }
     228
     229            if (isAccepted)
     230            {
     231                LastAcceptedQualityParameter.ActualValue.Value = MoveQualityParameter.ActualValue.Value;
     232            }
     233
    218234            return cooling ? Cool() : Heat();
    219235        }
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/ConsecutiveRejectionTemperatureResetOperator.cs

    r15315 r15333  
    3030        private const string MaximumIterationsName = "MaximumIterations";
    3131        private const string InitialTemperatureName = "InitialTemperature";
    32 
    3332        private const string ThresholdName = "Threshold";
    3433        private const string IsAcceptedName = "IsAccepted";
    3534        private const string ConsecutiveRejectedSolutionsCountName = "ConsecutiveRejectedSolutions";
    3635        private const string ResetTemperatureName = "ResetTemperature";
     36        private const string LastAcceptedQualityName = "LastAcceptedQuality";
     37        private const string MoveQualityName = "MoveQuality";
    3738        #endregion
    3839
     
    8687            get { return (ILookupParameter<IntValue>)Parameters[ConsecutiveRejectedSolutionsCountName]; }
    8788        }
     89        public ILookupParameter<DoubleValue> MoveQualityParameter
     90        {
     91            get { return (ILookupParameter<DoubleValue>)Parameters[MoveQualityName]; }
     92        }
     93        public ILookupParameter<DoubleValue> LastAcceptedQualityParameter
     94        {
     95            get { return (ILookupParameter<DoubleValue>)Parameters[LastAcceptedQualityName]; }
     96        }
    8897        #endregion
    8998
     
    103112            Parameters.Add(new ValueParameter<IntValue>(ThresholdName, "How many consecutive rejected solutions must occur to trigger a reheat.", new IntValue(10)));
    104113            Parameters.Add(new ValueLookupParameter<DoubleValue>(ResetTemperatureName, "The base reset temperature.", InitialTemperatureName));
    105          
     114            Parameters.Add(new LookupParameter<DoubleValue>(LastAcceptedQualityName, "Quality of last accepted solution."));
     115            Parameters.Add(new LookupParameter<DoubleValue>(MoveQualityName, "The value which represents the quality of a move."));
     116
    106117            #endregion
    107118
     
    125136        public override IOperation Apply()
    126137        {
    127             var count = ConsecutiveRejectedSolutionsCountParameter.ActualValue;
     138            if(!IsAcceptedParameter.ActualValue.Value || LastAcceptedQualityParameter.ActualValue.Value.Equals(MoveQualityParameter.ActualValue.Value))
     139            {
     140                ConsecutiveRejectedSolutionsCountParameter.ActualValue.Value++;
     141            }else
     142            {
     143                ConsecutiveRejectedSolutionsCountParameter.ActualValue.Value = 0;
     144            }
    128145
    129             count.Value = !IsAcceptedParameter.ActualValue.Value ? count.Value + 1 : 0;
    130146
    131             var heating = count.Value == ThresholdParameter.Value.Value;
     147            var heating = ConsecutiveRejectedSolutionsCountParameter.ActualValue.Value >= ThresholdParameter.Value.Value;
    132148
    133             if(heating) count.Value = 0;
     149            if (heating)
     150            {
     151                ConsecutiveRejectedSolutionsCountParameter.ActualValue.Value = 0;
     152            }
     153
     154            if (IsAcceptedParameter.ActualValue.Value)
     155            {
     156                LastAcceptedQualityParameter.ActualValue.Value = MoveQualityParameter.ActualValue.Value;
     157            }
    134158
    135159            return heating ? Heat() : Cool();
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/NoReheatingOperator.cs

    r14555 r15333  
    2222        #region Strings
    2323        private const string AnnealingOperatorName = "AnnealingOperator";
    24         private const string LowerTemperatureName = "LowerTemperature";
    25         private const string IterationsName = "Iterations";
    26         private const string TemperatureStartIndexName = "TemperatureStartIndex";
    27         private const string StartTemperatureName = "StartTemperature";
    28         private const string EndTemperatureName = "EndTemperature";
    29         private const string TemperatureName = "Temperature";
    30         private const string MaximumIterationsName = "MaximumIterations";
    31 
    3224
    3325        #endregion
    34         #region Parameters
    35         public ILookupParameter<DoubleValue> TemperatureParameter
    36         {
    37             get { return (ILookupParameter<DoubleValue>)Parameters[TemperatureName]; }
    38         }
    39         public ILookupParameter<DoubleValue> LowerTemperatureParameter
    40         {
    41             get { return (ILookupParameter<DoubleValue>)Parameters[LowerTemperatureName]; }
    42         }
    43         public ILookupParameter<DoubleValue> StartTemperatureParameter
    44         {
    45             get { return (ILookupParameter<DoubleValue>)Parameters[StartTemperatureName]; }
    46         }
    47         public ILookupParameter<DoubleValue> EndTemperatureParameter
    48         {
    49             get { return (ILookupParameter<DoubleValue>)Parameters[EndTemperatureName]; }
    50         }
    51         public ILookupParameter<IntValue> TemperatureStartIndexParameter
    52         {
    53             get { return (ILookupParameter<IntValue>)Parameters[TemperatureStartIndexName]; }
    54         }
    55         public ILookupParameter<IntValue> IterationsParameter
    56         {
    57             get { return (ILookupParameter<IntValue>)Parameters[IterationsName]; }
    58         }
     26        #region Parameters     
    5927        public ILookupParameter<IOperator> AnnealingOperatorParameter
    6028        {
    6129            get { return (ILookupParameter<IOperator>)Parameters[AnnealingOperatorName]; }
    62         }
    63         public ILookupParameter<IntValue> MaximumIterationsParameter
    64         {
    65             get { return (ILookupParameter<IntValue>)Parameters[MaximumIterationsName]; }
    6630        }
    6731
     
    7135        {
    7236            #region Create parameters
    73             Parameters.Add(new LookupParameter<DoubleValue>(TemperatureName, "The current temperature."));
    74             Parameters.Add(new LookupParameter<DoubleValue>(LowerTemperatureName, "The lower bound of the temperature."));
    75             Parameters.Add(new LookupParameter<IntValue>(IterationsName, "The number of iterations."));
    76             Parameters.Add(new LookupParameter<IntValue>(TemperatureStartIndexName, "The index where the annealing or heating was last changed."));
    77             Parameters.Add(new LookupParameter<DoubleValue>(StartTemperatureName, "The temperature from which cooling or reheating should occur."));
    78             Parameters.Add(new LookupParameter<DoubleValue>(EndTemperatureName, "The temperature to which should be cooled or heated."));
    79             Parameters.Add(new LookupParameter<IntValue>(MaximumIterationsName, "The maximum number of iterations which should be processed."));
    8037            Parameters.Add(new LookupParameter<IOperator>(AnnealingOperatorName, "The operator that cools the temperature."));
    8138            #endregion
     
    10057        public override IOperation Apply()
    10158        {
    102             TemperatureStartIndexParameter.ActualValue.Value = Math.Max(0, IterationsParameter.ActualValue.Value - 1);
    103             StartTemperatureParameter.ActualValue.Value = TemperatureParameter.ActualValue.Value;
    104             EndTemperatureParameter.ActualValue.Value = LowerTemperatureParameter.ActualValue.Value;
    10559            return new OperationCollection {
    10660                    ExecutionContext.CreateOperation(AnnealingOperatorParameter.ActualValue),
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/RandomWalkReheatingOperator.cs

    r15315 r15333  
    2929        private const string TemperatureName = "Temperature";
    3030        private const string MaximumIterationsName = "MaximumIterations";
    31 
    32         private const string TemperatureBeforeReheatName = "TemperatureBeforeReheat";
    3331        private const string CurrentRandomWalkStepName = "CurrentRandomWalkStep";
    3432        private const string RandomWalkLengthName = "RandomWalkLength";
     
    3634        private const string IsAcceptedName = "IsAccepted";
    3735        private const string ConsecutiveRejectedSolutionsCountName = "ConsecutiveRejectedSolutions";
    38         private const string QualitiesBeforeReheatingName = "QualitiesBeforeReheating";
    39         private const string AmountOfReheatsName = "AmountOfReheats";
    40         private const string RetrappedName = "Retrapped";
    4136        private const string LastAcceptedQualityName = "LastAcceptedQuality";
    42         private const string ResultsName = "Results";
    4337        private const string MoveQualityName = "MoveQuality";
    4438        private const string CoolingName = "Cooling";
    45         private const string TabuListActiveName = "TabuListActive";
    4639
    4740
     
    10598            get { return (ILookupParameter<IntValue>)Parameters[CurrentRandomWalkStepName]; }
    10699        }
    107         public ILookupParameter<DoubleValue> TemperatureBeforeReheatParameter
    108         {
    109             get { return (ILookupParameter<DoubleValue>)Parameters[TemperatureBeforeReheatName]; }
    110         }
    111         private LookupParameter<ItemList<DoubleValue>> QualitiesBeforeReheatingParameter
    112         {
    113             get { return (LookupParameter<ItemList<DoubleValue>>)Parameters[QualitiesBeforeReheatingName]; }
    114         }
    115100        public ILookupParameter<BoolValue> CoolingParameter
    116101        {
     
    124109        {
    125110            get { return (ILookupParameter<DoubleValue>)Parameters[LastAcceptedQualityName]; }
    126         }
    127         public IValueParameter<BoolValue> TabuListActiveParameter
    128         {
    129             get { return (IValueParameter<BoolValue>)Parameters[TabuListActiveName];  }
    130111        }
    131112
     
    145126            Parameters.Add(new LookupParameter<BoolValue>(IsAcceptedName, "Whether the move was accepted or not."));
    146127            Parameters.Add(new LookupParameter<IntValue>(ConsecutiveRejectedSolutionsCountName, "Amount of consecutive rejected solutions."));
    147             Parameters.Add(new ValueParameter<IntValue>(ThresholdName, "How many consecutive rejected solutions must occur to trigger a reheat.", new IntValue(10)));
    148             Parameters.Add(new ValueParameter<IntValue>(RandomWalkLengthName, "Amount of randomly accepted moves upon reheat.", new IntValue(2)));
     128            Parameters.Add(new ValueParameter<IntValue>(ThresholdName, "How many consecutive rejected solutions must occur to trigger a reheat.", new IntValue(10000)));
     129            Parameters.Add(new ValueParameter<IntValue>(RandomWalkLengthName, "Amount of randomly accepted moves upon reheat.", new IntValue(1)));
    149130            Parameters.Add(new LookupParameter<IntValue>(CurrentRandomWalkStepName, "Current random walk step."));
    150             Parameters.Add(new LookupParameter<DoubleValue>(TemperatureBeforeReheatName, "Temperature before the reheat occured."));
    151             Parameters.Add(new LookupParameter<ItemList<DoubleValue>>(QualitiesBeforeReheatingName, "Quality of last optimum."));
    152131            Parameters.Add(new LookupParameter<DoubleValue>(MoveQualityName, "The value which represents the quality of a move."));
    153132            Parameters.Add(new LookupParameter<BoolValue>(CoolingName, "True when the temperature should be cooled, false otherwise."));
    154133            Parameters.Add(new LookupParameter<DoubleValue>(LastAcceptedQualityName, "Quality of last accepted solution."));
    155             Parameters.Add(new ValueParameter<BoolValue>(TabuListActiveName, "Determines whether visiting a 'frozen' quality instantly triggers a reheat or not", new BoolValue(true)));
    156 
    157134            #endregion
    158135
     
    176153        public override IOperation Apply()
    177154        {
    178             var isAccepted = IsAcceptedParameter.ActualValue.Value;
    179             var consecutiveRejectedCount = ConsecutiveRejectedSolutionsCountParameter.ActualValue;
    180155            var cooling = CoolingParameter.ActualValue.Value;
    181             var frozenSolutions = QualitiesBeforeReheatingParameter.ActualValue;
    182156            var quality = MoveQualityParameter.ActualValue;
    183157            var lastAcceptedQuality = LastAcceptedQualityParameter.ActualValue;
    184             var tabuListActive = TabuListActiveParameter.Value.Value;
    185 
    186             if(isAccepted)
     158            var isAccepted = IsAcceptedParameter.ActualValue.Value;
     159            var consecutiveRejectedSolutionsCount = ConsecutiveRejectedSolutionsCountParameter.ActualValue;
     160
     161            if (cooling)
     162            {
     163                // add acceptance value to consecutive rejected solutions count
     164                // if quality hasnt changed, we might be stuck on a plateau
     165                if (!isAccepted || quality.Value.Equals(lastAcceptedQuality.Value))
     166                {
     167                    consecutiveRejectedSolutionsCount.Value++;
     168                }
     169                else
     170                {
     171                    consecutiveRejectedSolutionsCount.Value = 0;
     172                }
     173
     174                // check if we are trapped in a local optimum
     175                if (consecutiveRejectedSolutionsCount.Value >= ThresholdParameter.Value.Value)
     176                {
     177                    cooling = false;
     178                    consecutiveRejectedSolutionsCount.Value = 0;
     179                }
     180            }
     181
     182
     183            if (!cooling)
     184            {
     185                // random walk finished, start cooling again
     186                if (RandomWalkLengthParameter.Value.Value <= CurrentRandomWalkStepParameter.ActualValue.Value)
     187                {
     188                    cooling = true;
     189                    CurrentRandomWalkStepParameter.ActualValue.Value = 0;
     190                }
     191                else
     192                {
     193                    CurrentRandomWalkStepParameter.ActualValue.Value++;
     194                }
     195            }
     196
     197            if (isAccepted)
    187198            {
    188199                LastAcceptedQualityParameter.ActualValue.Value = quality.Value;
    189200            }
    190201
    191             if (cooling)
    192             {
    193                 // check if we are re-trapped
    194                 if (isAccepted && frozenSolutions.Any(frozen => frozen.Value.Equals(quality.Value)) && tabuListActive)
    195                 {
    196                    cooling = false;
    197 
    198                     IntValue retrapped = new IntValue(0);
    199                     IResult retrappedAmount;
    200                     var results = (ResultCollection)ExecutionContext.Parent.Parent.Scope.Variables[ResultsName].Value;
    201                     if (results.TryGetValue(RetrappedName, out retrappedAmount))
    202                     {
    203                         retrapped = (IntValue)retrappedAmount.Value;
    204                         retrapped.Value += 1;
    205                     }
    206                     else
    207                     {
    208                         retrapped.Value += 1;
    209                         results.Add(new Result(RetrappedName, retrapped));
    210                     }
    211                     // remember local optimum
    212                     frozenSolutions.Add(new DoubleValue(lastAcceptedQuality.Value));
    213                 }
    214                 else
    215                 {
    216                     // add acceptance value to consecutive rejected solutions count
    217                     consecutiveRejectedCount.Value = !IsAcceptedParameter.ActualValue.Value ? consecutiveRejectedCount.Value + 1 : 0;
    218 
    219                     // check if we are trapped in a new local optimum
    220                     if (consecutiveRejectedCount.Value == ThresholdParameter.Value.Value)
    221                     {
    222                         cooling = false;
    223                         consecutiveRejectedCount.Value = 0;
    224                         // remember local optimum
    225                         frozenSolutions.Add(new DoubleValue(lastAcceptedQuality.Value));
    226                     }
    227                 }
    228             }
    229             else
    230             {
    231                 // random walk not yet finished
    232                 if (RandomWalkLengthParameter.Value.Value != CurrentRandomWalkStepParameter.ActualValue.Value)
    233                 {
    234                     if (CurrentRandomWalkStepParameter.ActualValue.Value == 0)
    235                     {
    236                         DebugIncreaseReheatCounter();
    237                     }
    238                     CurrentRandomWalkStepParameter.ActualValue.Value++;
    239                 }
    240                 else
    241                 {
    242                     // random walk finished start cooling again
    243                     cooling = true;
    244                     TemperatureStartIndexParameter.ActualValue.Value = Math.Max(0, IterationsParameter.ActualValue.Value - 1);
    245                     StartTemperatureParameter.ActualValue.Value = TemperatureBeforeReheatParameter.ActualValue.Value;
    246                     EndTemperatureParameter.ActualValue.Value = LowerTemperatureParameter.ActualValue.Value;
    247                     consecutiveRejectedCount.Value = isAccepted ? 0 : 1;
    248                     CurrentRandomWalkStepParameter.ActualValue.Value = 0;
    249 
    250                 }
    251             }
    252202            CoolingParameter.ActualValue.Value = cooling;
    253203            return cooling ? Cool() : Heat();
    254204        }
    255205
    256         private void DebugIncreaseReheatCounter()
    257         {
    258             var reheats = new IntValue(0);
    259             var frozen = new ItemList<DoubleValue>();
    260             var results = (ResultCollection)ExecutionContext.Parent.Parent.Scope.Variables[ResultsName].Value;
    261             IResult amountOfReheats;
    262             IResult frozenSolutions;
    263             if (results.TryGetValue(AmountOfReheatsName, out amountOfReheats))
    264             {
    265                 reheats = (IntValue)amountOfReheats.Value;
    266                 reheats.Value += 1;
    267             }
    268             else
    269             {
    270                 reheats.Value += 1;
    271                 results.Add(new Result(AmountOfReheatsName, reheats));
    272             }
    273 
    274             if (results.TryGetValue(QualitiesBeforeReheatingName, out frozenSolutions))
    275             {
    276                
    277                 frozen = (ItemList<DoubleValue>) frozenSolutions.Value;
    278                 frozen.Add(new DoubleValue(LastAcceptedQualityParameter.ActualValue.Value));
    279             }
    280             else
    281             {
    282                 frozen.Add(new DoubleValue(LastAcceptedQualityParameter.ActualValue.Value));
    283                 results.Add(new Result(QualitiesBeforeReheatingName, frozen));
    284             }
    285         }
    286 
    287206        private IOperation Heat()
    288207        {
     
    293212        private IOperation Cool()
    294213        {
    295             TemperatureBeforeReheatParameter.ActualValue.Value = TemperatureParameter.ActualValue.Value;
    296214            return new OperationCollection {
    297215                    ExecutionContext.CreateOperation(AnnealingOperatorParameter.ActualValue),
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/SimulatedAnnealingMainLoop.cs

    r15315 r15333  
    6464        private const string LastQualityName = "LastQuality";
    6565        private const string UphillMovesMemoryName = "UphillMovesMemory";
    66         private const string TemperatureBeforeReheatName = "TemperatureBeforeReheat";
    6766        private const string CurrentRandomWalkStepName = "CurrentRandomWalkStep";
    68         private const string QualitiesBeforeReheatingName = "QualitiesBeforeReheating";
    6967        private const string LastAcceptedQualityName = "LastAcceptedQuality";
    7068        private const string TemperatureInitializerName = "TemperatureInitializer";
     
    247245            variableCreator.CollectedValues.Add(new ValueParameter<ItemList<DoubleValue>>(UphillMovesMemoryName, new ItemList<DoubleValue>()));
    248246            variableCreator.CollectedValues.Add(new ValueParameter<IntValue>(CurrentRandomWalkStepName, new IntValue(0)));
    249             variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>(TemperatureBeforeReheatName, new DoubleValue(0)));
    250             variableCreator.CollectedValues.Add(new ValueParameter<ItemList<DoubleValue>>(QualitiesBeforeReheatingName, new ItemList<DoubleValue>()));
    251247            variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>(LastAcceptedQualityName, new DoubleValue(-1)));
    252248
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/TemperatureController.cs

    r15315 r15333  
    5858        private const string MaximizationName = "Maximization";
    5959        private const string MoveQualityName = "MoveQuality";
    60         private const string TemperatureBeforeReheatName = "TemperatureBeforeReheat";
    6160        private const string CurrentRandomWalkStepName = "CurrentRandomWalkStep";
    62         private const string QualitiesBeforeReheatingName = "QualitiesBeforeReheating";
    6361        private const string LastAcceptedQualityName = "LastAcceptedQuality";
    6462        private const string TemperatureInitializerName = "TemperatureInitializer";
     
    9290            Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsName, "The maximum number of iterations which should be processed."));
    9391            Parameters.Add(new ValueLookupParameter<BoolValue>(MaximizationName, "True if the problem is a maximization problem, otherwise false."));
    94             Parameters.Add(new ValueLookupParameter<IOperator>(AnnealingOperatorName, "The operator that cools the temperature."));
     92            Parameters.Add(new ValueLookupParameter<IDiscreteDoubleValueModifier>(AnnealingOperatorName, "The operator that cools the temperature."));
    9593            Parameters.Add(new ValueLookupParameter<IReheatingOperator>(ReheatingOperatorName, "The operator that reheats the temperature if necessary."));
    9694            Parameters.Add(new LookupParameter<IntValue>(TemperatureStartIndexName, "The index where the annealing or heating was last changed."));
     
    108106            Parameters.Add(new LookupParameter<DoubleValue>(AverageAcceptanceRatioName, "Average acceptance over full acceptance memory."));
    109107            Parameters.Add(new LookupParameter<IntValue>(CurrentRandomWalkStepName, "Current random walk step."));
    110             Parameters.Add(new LookupParameter<DoubleValue>(TemperatureBeforeReheatName, "Temperature before the reheat occured."));
    111             Parameters.Add(new LookupParameter<ItemList<DoubleValue>>(QualitiesBeforeReheatingName, "List of qualities where the algorithm has been stuck."));
    112108            Parameters.Add(new LookupParameter<DoubleValue>(LastAcceptedQualityName, "Quality of last accepted solution."));
    113109
  • branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/TemperatureInitializerBasedOnAverageHillsize.cs

    r15315 r15333  
    110110            Parameters.Add(new ValueLookupParameter<BoolValue>(MaximizationName, "True if the problem is a maximization problem, otherwise false."));
    111111            Parameters.Add(new LookupParameter<IntValue>(IterationsName, "The number of iterations."));
    112             Parameters.Add(new ValueParameter<DoubleValue>(InitialAcceptanceRateName, "The initial acceptance rate of average-sized hills used to calculate the initial temperature.", new DoubleValue(0.001)));
     112            Parameters.Add(new ValueParameter<DoubleValue>(InitialAcceptanceRateName, "The initial acceptance rate of average-sized hills used to calculate the initial temperature.", new DoubleValue(0.1)));
    113113            Parameters.Add(new ValueParameter<IntValue>(UphillMovesMemorySizeName, "The amount of uphill moves necessary to compute the initial temperature.", new IntValue(100)));
    114114            Parameters.Add(new LookupParameter<ItemList<DoubleValue>>(UphillMovesMemoryName, "The field that stores the uphill moves."));
Note: See TracChangeset for help on using the changeset viewer.