Changeset 3145 for trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing
- Timestamp:
- 03/20/10 20:16:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
r3131 r3145 35 35 [Item("Simulated Annealing", "A simulated annealing algorithm.")] 36 36 [Creatable("Algorithms")] 37 public class SimulatedAnnealing : EngineAlgorithm {37 public sealed class SimulatedAnnealing : EngineAlgorithm { 38 38 #region Problem Properties 39 39 public override Type ProblemType { … … 132 132 #endregion 133 133 134 [StorableConstructor] 135 private SimulatedAnnealing(bool deserializing) : base() { } 134 136 public SimulatedAnnealing() 135 137 : base() { … … 173 175 } 174 176 175 [StorableConstructor]176 private SimulatedAnnealing(bool deserializing) : base() { }177 178 177 public override IDeepCloneable Clone(Cloner cloner) { 179 178 SimulatedAnnealing clone = (SimulatedAnnealing)base.Clone(cloner); … … 213 212 base.Problem_EvaluatorChanged(sender, e); 214 213 } 214 protected override void Problem_VisualizerChanged(object sender, EventArgs e) { 215 ParameterizeStochasticOperator(Problem.Visualizer); 216 ParameterizeMainLoop(); 217 if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_ActualNameChanged); 218 base.Problem_VisualizerChanged(sender, e); 219 } 215 220 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 216 221 foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op); … … 248 253 ParameterizeMoveEvaluators(); 249 254 ParameterizeMoveMakers(); 255 } 256 private void Visualizer_VisualizationParameter_ActualNameChanged(object sender, EventArgs e) { 257 ParameterizeMainLoop(); 250 258 } 251 259 #endregion … … 325 333 } 326 334 private void ParameterizeMainLoop() { 335 MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 327 336 MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 328 337 MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 329 338 if (MoveEvaluator != null) 330 339 MainLoop.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName; 340 MainLoop.VisualizerParameter.ActualName = Problem.VisualizerParameter.Name; 341 if (Problem.Visualizer != null) 342 MainLoop.VisualizationParameter.ActualName = Problem.Visualizer.VisualizationParameter.ActualName; 331 343 } 332 344 private void ParameterizeStochasticOperator(IOperator op) {
Note: See TracChangeset
for help on using the changeset viewer.