Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/13/12 17:14:53 (12 years ago)
Author:
ascheibe
Message:

#1864

  • switched IOperators collection to IItems
  • adapted algorithms and problems
  • added AfterDeserialization hooks for problem, external evaluation problem and user-defined problem
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs

    r7516 r7999  
    230230      ParameterizeStochasticOperator(Problem.SolutionCreator);
    231231      ParameterizeStochasticOperator(Problem.Evaluator);
    232       foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     232      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
    233233      foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) {
    234234        op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
     
    270270    }
    271271    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
    272       foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
     272      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
    273273      // This may seem pointless, but some operators already have the eventhandler registered, others don't
    274274      // FIXME: Is there another way to solve this problem?
Note: See TracChangeset for help on using the changeset viewer.