Changeset 15333
- Timestamp:
- 08/21/17 11:17:24 (7 years ago)
- 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 39 39 private const string AverageAcceptanceRatioName = "AverageAcceptanceRatio"; 40 40 private const string ReheatWindowSizeName = "ReheatWindowSize"; 41 private const string LastAcceptedQualityName = "LastAcceptedQuality"; 42 private const string MoveQualityName = "MoveQuality"; 41 43 42 44 … … 67 69 get { return (ILookupParameter<IntValue>)Parameters[IterationsName]; } 68 70 } 69 public ILookupParameter<I Operator> AnnealingOperatorParameter70 { 71 get { return (ILookupParameter<I Operator>)Parameters[AnnealingOperatorName]; }71 public ILookupParameter<IDiscreteDoubleValueModifier> AnnealingOperatorParameter 72 { 73 get { return (ILookupParameter<IDiscreteDoubleValueModifier>)Parameters[AnnealingOperatorName]; } 72 74 } 73 75 public ILookupParameter<IntValue> MaximumIterationsParameter … … 110 112 { 111 113 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]; } 112 122 } 113 123 … … 120 130 Parameters.Add(new LookupParameter<DoubleValue>(LowerTemperatureName, "The lower bound of the temperature.")); 121 131 Parameters.Add(new LookupParameter<IntValue>(IterationsName, "The number of iterations.")); 122 Parameters.Add(new LookupParameter<I Operator>(AnnealingOperatorName, "The operator that cools the temperature."));132 Parameters.Add(new LookupParameter<IDiscreteDoubleValueModifier>(AnnealingOperatorName, "The operator that cools the temperature.")); 123 133 Parameters.Add(new LookupParameter<IntValue>(TemperatureStartIndexName, "The index where the annealing or heating was last changed.")); 124 134 Parameters.Add(new LookupParameter<DoubleValue>(StartTemperatureName, "The temperature from which cooling or reheating should occur.")); … … 134 144 Parameters.Add(new LookupParameter<DoubleValue>(AverageAcceptanceRatioName, "Average acceptance over full acceptance memory.")); 135 145 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.")); 136 148 #endregion 137 149 … … 173 185 public override IOperation Apply() 174 186 { 175 var isAccepted = IsAcceptedParameter.ActualValue ;187 var isAccepted = IsAcceptedParameter.ActualValue.Value && LastAcceptedQualityParameter.ActualValue.Value != MoveQualityParameter.ActualValue.Value; 176 188 var acceptances = AcceptanceMemoryParameter.ActualValue; 177 189 var cooling = CoolingParameter.ActualValue.Value; 178 190 var ratioAmount = AverageAcceptanceRatioParameter.ActualValue; 179 191 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; 184 194 185 195 if (acceptances.Count > MemorySizeParameter.Value.Value) { … … 216 226 CoolingParameter.ActualValue.Value = cooling; 217 227 } 228 229 if (isAccepted) 230 { 231 LastAcceptedQualityParameter.ActualValue.Value = MoveQualityParameter.ActualValue.Value; 232 } 233 218 234 return cooling ? Cool() : Heat(); 219 235 } -
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/ConsecutiveRejectionTemperatureResetOperator.cs
r15315 r15333 30 30 private const string MaximumIterationsName = "MaximumIterations"; 31 31 private const string InitialTemperatureName = "InitialTemperature"; 32 33 32 private const string ThresholdName = "Threshold"; 34 33 private const string IsAcceptedName = "IsAccepted"; 35 34 private const string ConsecutiveRejectedSolutionsCountName = "ConsecutiveRejectedSolutions"; 36 35 private const string ResetTemperatureName = "ResetTemperature"; 36 private const string LastAcceptedQualityName = "LastAcceptedQuality"; 37 private const string MoveQualityName = "MoveQuality"; 37 38 #endregion 38 39 … … 86 87 get { return (ILookupParameter<IntValue>)Parameters[ConsecutiveRejectedSolutionsCountName]; } 87 88 } 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 } 88 97 #endregion 89 98 … … 103 112 Parameters.Add(new ValueParameter<IntValue>(ThresholdName, "How many consecutive rejected solutions must occur to trigger a reheat.", new IntValue(10))); 104 113 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 106 117 #endregion 107 118 … … 125 136 public override IOperation Apply() 126 137 { 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 } 128 145 129 count.Value = !IsAcceptedParameter.ActualValue.Value ? count.Value + 1 : 0;130 146 131 var heating = count.Value == ThresholdParameter.Value.Value;147 var heating = ConsecutiveRejectedSolutionsCountParameter.ActualValue.Value >= ThresholdParameter.Value.Value; 132 148 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 } 134 158 135 159 return heating ? Heat() : Cool(); -
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/NoReheatingOperator.cs
r14555 r15333 22 22 #region Strings 23 23 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 32 24 33 25 #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 59 27 public ILookupParameter<IOperator> AnnealingOperatorParameter 60 28 { 61 29 get { return (ILookupParameter<IOperator>)Parameters[AnnealingOperatorName]; } 62 }63 public ILookupParameter<IntValue> MaximumIterationsParameter64 {65 get { return (ILookupParameter<IntValue>)Parameters[MaximumIterationsName]; }66 30 } 67 31 … … 71 35 { 72 36 #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."));80 37 Parameters.Add(new LookupParameter<IOperator>(AnnealingOperatorName, "The operator that cools the temperature.")); 81 38 #endregion … … 100 57 public override IOperation Apply() 101 58 { 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;105 59 return new OperationCollection { 106 60 ExecutionContext.CreateOperation(AnnealingOperatorParameter.ActualValue), -
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/RandomWalkReheatingOperator.cs
r15315 r15333 29 29 private const string TemperatureName = "Temperature"; 30 30 private const string MaximumIterationsName = "MaximumIterations"; 31 32 private const string TemperatureBeforeReheatName = "TemperatureBeforeReheat";33 31 private const string CurrentRandomWalkStepName = "CurrentRandomWalkStep"; 34 32 private const string RandomWalkLengthName = "RandomWalkLength"; … … 36 34 private const string IsAcceptedName = "IsAccepted"; 37 35 private const string ConsecutiveRejectedSolutionsCountName = "ConsecutiveRejectedSolutions"; 38 private const string QualitiesBeforeReheatingName = "QualitiesBeforeReheating";39 private const string AmountOfReheatsName = "AmountOfReheats";40 private const string RetrappedName = "Retrapped";41 36 private const string LastAcceptedQualityName = "LastAcceptedQuality"; 42 private const string ResultsName = "Results";43 37 private const string MoveQualityName = "MoveQuality"; 44 38 private const string CoolingName = "Cooling"; 45 private const string TabuListActiveName = "TabuListActive";46 39 47 40 … … 105 98 get { return (ILookupParameter<IntValue>)Parameters[CurrentRandomWalkStepName]; } 106 99 } 107 public ILookupParameter<DoubleValue> TemperatureBeforeReheatParameter108 {109 get { return (ILookupParameter<DoubleValue>)Parameters[TemperatureBeforeReheatName]; }110 }111 private LookupParameter<ItemList<DoubleValue>> QualitiesBeforeReheatingParameter112 {113 get { return (LookupParameter<ItemList<DoubleValue>>)Parameters[QualitiesBeforeReheatingName]; }114 }115 100 public ILookupParameter<BoolValue> CoolingParameter 116 101 { … … 124 109 { 125 110 get { return (ILookupParameter<DoubleValue>)Parameters[LastAcceptedQualityName]; } 126 }127 public IValueParameter<BoolValue> TabuListActiveParameter128 {129 get { return (IValueParameter<BoolValue>)Parameters[TabuListActiveName]; }130 111 } 131 112 … … 145 126 Parameters.Add(new LookupParameter<BoolValue>(IsAcceptedName, "Whether the move was accepted or not.")); 146 127 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))); 149 130 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."));152 131 Parameters.Add(new LookupParameter<DoubleValue>(MoveQualityName, "The value which represents the quality of a move.")); 153 132 Parameters.Add(new LookupParameter<BoolValue>(CoolingName, "True when the temperature should be cooled, false otherwise.")); 154 133 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 157 134 #endregion 158 135 … … 176 153 public override IOperation Apply() 177 154 { 178 var isAccepted = IsAcceptedParameter.ActualValue.Value;179 var consecutiveRejectedCount = ConsecutiveRejectedSolutionsCountParameter.ActualValue;180 155 var cooling = CoolingParameter.ActualValue.Value; 181 var frozenSolutions = QualitiesBeforeReheatingParameter.ActualValue;182 156 var quality = MoveQualityParameter.ActualValue; 183 157 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) 187 198 { 188 199 LastAcceptedQualityParameter.ActualValue.Value = quality.Value; 189 200 } 190 201 191 if (cooling)192 {193 // check if we are re-trapped194 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 else207 {208 retrapped.Value += 1;209 results.Add(new Result(RetrappedName, retrapped));210 }211 // remember local optimum212 frozenSolutions.Add(new DoubleValue(lastAcceptedQuality.Value));213 }214 else215 {216 // add acceptance value to consecutive rejected solutions count217 consecutiveRejectedCount.Value = !IsAcceptedParameter.ActualValue.Value ? consecutiveRejectedCount.Value + 1 : 0;218 219 // check if we are trapped in a new local optimum220 if (consecutiveRejectedCount.Value == ThresholdParameter.Value.Value)221 {222 cooling = false;223 consecutiveRejectedCount.Value = 0;224 // remember local optimum225 frozenSolutions.Add(new DoubleValue(lastAcceptedQuality.Value));226 }227 }228 }229 else230 {231 // random walk not yet finished232 if (RandomWalkLengthParameter.Value.Value != CurrentRandomWalkStepParameter.ActualValue.Value)233 {234 if (CurrentRandomWalkStepParameter.ActualValue.Value == 0)235 {236 DebugIncreaseReheatCounter();237 }238 CurrentRandomWalkStepParameter.ActualValue.Value++;239 }240 else241 {242 // random walk finished start cooling again243 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 }252 202 CoolingParameter.ActualValue.Value = cooling; 253 203 return cooling ? Cool() : Heat(); 254 204 } 255 205 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 else269 {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 else281 {282 frozen.Add(new DoubleValue(LastAcceptedQualityParameter.ActualValue.Value));283 results.Add(new Result(QualitiesBeforeReheatingName, frozen));284 }285 }286 287 206 private IOperation Heat() 288 207 { … … 293 212 private IOperation Cool() 294 213 { 295 TemperatureBeforeReheatParameter.ActualValue.Value = TemperatureParameter.ActualValue.Value;296 214 return new OperationCollection { 297 215 ExecutionContext.CreateOperation(AnnealingOperatorParameter.ActualValue), -
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/SimulatedAnnealingMainLoop.cs
r15315 r15333 64 64 private const string LastQualityName = "LastQuality"; 65 65 private const string UphillMovesMemoryName = "UphillMovesMemory"; 66 private const string TemperatureBeforeReheatName = "TemperatureBeforeReheat";67 66 private const string CurrentRandomWalkStepName = "CurrentRandomWalkStep"; 68 private const string QualitiesBeforeReheatingName = "QualitiesBeforeReheating";69 67 private const string LastAcceptedQualityName = "LastAcceptedQuality"; 70 68 private const string TemperatureInitializerName = "TemperatureInitializer"; … … 247 245 variableCreator.CollectedValues.Add(new ValueParameter<ItemList<DoubleValue>>(UphillMovesMemoryName, new ItemList<DoubleValue>())); 248 246 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>()));251 247 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>(LastAcceptedQualityName, new DoubleValue(-1))); 252 248 -
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/TemperatureController.cs
r15315 r15333 58 58 private const string MaximizationName = "Maximization"; 59 59 private const string MoveQualityName = "MoveQuality"; 60 private const string TemperatureBeforeReheatName = "TemperatureBeforeReheat";61 60 private const string CurrentRandomWalkStepName = "CurrentRandomWalkStep"; 62 private const string QualitiesBeforeReheatingName = "QualitiesBeforeReheating";63 61 private const string LastAcceptedQualityName = "LastAcceptedQuality"; 64 62 private const string TemperatureInitializerName = "TemperatureInitializer"; … … 92 90 Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsName, "The maximum number of iterations which should be processed.")); 93 91 Parameters.Add(new ValueLookupParameter<BoolValue>(MaximizationName, "True if the problem is a maximization problem, otherwise false.")); 94 Parameters.Add(new ValueLookupParameter<I Operator>(AnnealingOperatorName, "The operator that cools the temperature."));92 Parameters.Add(new ValueLookupParameter<IDiscreteDoubleValueModifier>(AnnealingOperatorName, "The operator that cools the temperature.")); 95 93 Parameters.Add(new ValueLookupParameter<IReheatingOperator>(ReheatingOperatorName, "The operator that reheats the temperature if necessary.")); 96 94 Parameters.Add(new LookupParameter<IntValue>(TemperatureStartIndexName, "The index where the annealing or heating was last changed.")); … … 108 106 Parameters.Add(new LookupParameter<DoubleValue>(AverageAcceptanceRatioName, "Average acceptance over full acceptance memory.")); 109 107 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."));112 108 Parameters.Add(new LookupParameter<DoubleValue>(LastAcceptedQualityName, "Quality of last accepted solution.")); 113 109 -
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/TemperatureInitializerBasedOnAverageHillsize.cs
r15315 r15333 110 110 Parameters.Add(new ValueLookupParameter<BoolValue>(MaximizationName, "True if the problem is a maximization problem, otherwise false.")); 111 111 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))); 113 113 Parameters.Add(new ValueParameter<IntValue>(UphillMovesMemorySizeName, "The amount of uphill moves necessary to compute the initial temperature.", new IntValue(100))); 114 114 Parameters.Add(new LookupParameter<ItemList<DoubleValue>>(UphillMovesMemoryName, "The field that stores the uphill moves."));
Note: See TracChangeset
for help on using the changeset viewer.