Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5951


Ignore:
Timestamp:
04/05/11 10:00:04 (14 years ago)
Author:
abeham
Message:

#1462

  • Fixed wiring code, some intermediate algorithm classes were missing the base call so that several events did not get registered
Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationAlgorithm.cs

    r5809 r5951  
    5151      Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
    5252      Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
     53      base.DeregisterProblemEvents();
    5354    }
    5455    protected override void RegisterProblemEvents() {
     56      base.RegisterProblemEvents();
    5557      Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
    5658      Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
  • trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationEngineAlgorithm.cs

    r5809 r5951  
    5151      Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
    5252      Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
     53      base.DeregisterProblemEvents();
    5354    }
    5455    protected override void RegisterProblemEvents() {
     56      base.RegisterProblemEvents();
    5557      Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
    5658      Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r5809 r5951  
    240240        ProblemSize.Value = Evaluator.MaximumProblemSize;
    241241      BestKnownQuality = new DoubleValue(Evaluator.BestKnownQuality);
     242      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
    242243      Evaluator_QualityParameter_ActualNameChanged(null, EventArgs.Empty);
    243244      OnEvaluatorChanged();
     
    406407        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    407408        op.BoundsParameter.ActualName = BoundsParameter.Name;
    408         op.ProblemSizeParameter.ActualName = ProblemSizeParameter.Name; 
     409        op.ProblemSizeParameter.ActualName = ProblemSizeParameter.Name;
    409410      }
    410411      foreach (IRealVectorParticleUpdater op in Operators.OfType<IRealVectorParticleUpdater>()) {
    411412        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    412         op.BoundsParameter.ActualName = BoundsParameter.Name; 
     413        op.BoundsParameter.ActualName = BoundsParameter.Name;
    413414      }
    414415      foreach (IRealVectorSwarmUpdater op in Operators.OfType<IRealVectorSwarmUpdater>()) {
    415416        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
    416         op.MaximizationParameter.ActualName = MaximizationParameter.Name; 
     417        op.MaximizationParameter.ActualName = MaximizationParameter.Name;
    417418      }
    418419    }
Note: See TracChangeset for help on using the changeset viewer.