Changeset 15315 for branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/SimulatedAnnealingMainLoop.cs
- Timestamp:
- 08/09/17 10:37:45 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/jschiess/HeuristicLab.Algorithms.SimulatedAnnealing/3.4/SimulatedAnnealingMainLoop.cs
r15001 r15315 49 49 private const string CoolingName = "Cooling"; 50 50 private const string InitialTemperatureName = "InitialTemperature"; 51 private const string InitialAcceptanceRateName = "InitialAcceptanceRate";52 51 private const string StartTemperatureName = "StartTemperature"; 53 52 private const string EndTemperatureName = "EndTemperature"; … … 65 64 private const string LastQualityName = "LastQuality"; 66 65 private const string UphillMovesMemoryName = "UphillMovesMemory"; 66 private const string TemperatureBeforeReheatName = "TemperatureBeforeReheat"; 67 private const string CurrentRandomWalkStepName = "CurrentRandomWalkStep"; 68 private const string QualitiesBeforeReheatingName = "QualitiesBeforeReheating"; 69 private const string LastAcceptedQualityName = "LastAcceptedQuality"; 70 private const string TemperatureInitializerName = "TemperatureInitializer"; 71 private const string TemperatureInitializedName = "TemperatureInitialized"; 72 67 73 #endregion 68 74 … … 91 97 { 92 98 get { return (ILookupParameter<DoubleValue>)Parameters[InitialTemperatureName]; } 93 }94 public ILookupParameter<DoubleValue> InitialAcceptanceRateParameter95 {96 get { return (ILookupParameter<DoubleValue>)Parameters[InitialAcceptanceRateName]; }97 99 } 98 100 public ILookupParameter<DoubleValue> MoveQualityParameter … … 200 202 Parameters.Add(new ValueLookupParameter<IOperator>(AnnealingOperatorName, "The operator that cools the temperature.")); 201 203 Parameters.Add(new ValueLookupParameter<IOperator>(ReheatingOperatorName, "The operator that reheats the temperature if necessary.")); 204 Parameters.Add(new ValueLookupParameter<IOperator>(TemperatureInitializerName, "The operator that initialized the temperature.")); 202 205 203 206 Parameters.Add(new ValueLookupParameter<IOperator>(AnalyzerName, "The operator used to analyze each generation.")); … … 206 209 207 210 Parameters.Add(new LookupParameter<DoubleValue>(InitialTemperatureName, "The initial temperature.")); 208 Parameters.Add(new LookupParameter<DoubleValue>(InitialAcceptanceRateName, "The initial acceptance rate of average-sized hills used to calculate the initial temperature."));209 211 Parameters.Add(new LookupParameter<IntValue>(TemperatureStartIndexName, "The index where the annealing or heating was last changed.")); 210 212 Parameters.Add(new LookupParameter<BoolValue>(CoolingName, "True when the temperature should be cooled, false otherwise.")); 211 213 Parameters.Add(new LookupParameter<DoubleValue>(StartTemperatureName, "The temperature from which cooling or reheating should occur.")); 212 214 Parameters.Add(new LookupParameter<DoubleValue>(EndTemperatureName, "The temperature to which should be cooled or heated.")); 215 213 216 214 217 #endregion … … 237 240 238 241 variableCreator.Name = "Initialize Memory"; 242 variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>(TemperatureInitializedName, new BoolValue(false))); 239 243 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>(AverageAcceptanceRatioName, new DoubleValue(0d))); 240 244 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>(ConsecutiveRejectedSolutionsCountName, new IntValue(0))); … … 242 246 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>(LastQualityName, new DoubleValue(-1))); 243 247 variableCreator.CollectedValues.Add(new ValueParameter<ItemList<DoubleValue>>(UphillMovesMemoryName, new ItemList<DoubleValue>())); 248 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 variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>(LastAcceptedQualityName, new DoubleValue(-1))); 244 252 245 253 analyzer1.Name = "Analyzer"; … … 267 275 268 276 269 270 277 subScopesRemover.RemoveAllSubScopes = true; 271 278
Note: See TracChangeset
for help on using the changeset viewer.