Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/12 10:42:06 (12 years ago)
Author:
jkarder
Message:

#1331:

  • added Scatter Search algorithm
  • added problem specific operators for improvement, path relinking and similarity calculation
  • adjusted event handling
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs

    r7351 r7789  
    2828using HeuristicLab.Encodings.BinaryVectorEncoding;
    2929using HeuristicLab.Optimization;
     30using HeuristicLab.Optimization.Operators;
    3031using HeuristicLab.Parameters;
    3132using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    244245    }
    245246    private void InitializeOperators() {
     247      Operators.Add(new KnapsackImprovementOperator());
     248      Operators.Add(new KnapsackMultipleGuidesPathRelinker());
     249      Operators.Add(new KnapsackPathRelinker());
     250      Operators.Add(new KnapsackSimultaneousPathRelinker());
     251      Operators.Add(new KnapsackSimilarityCalculator());
     252
    246253      Operators.Add(new BestKnapsackSolutionAnalyzer());
    247254      ParameterizeAnalyzer();
     
    290297        op.BinaryVectorParameter.Hidden = true;
    291298      }
     299      foreach (IImprovementOperator op in Operators.OfType<IImprovementOperator>()) {
     300        op.TargetParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
     301        op.TargetParameter.Hidden = true;
     302      }
     303      foreach (IPathRelinker op in Operators.OfType<IPathRelinker>()) {
     304        op.ParentsParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
     305        op.ParentsParameter.Hidden = true;
     306      }
     307      foreach (ISimilarityCalculator op in Operators.OfType<ISimilarityCalculator>()) {
     308        op.TargetParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
     309        op.TargetParameter.Hidden = true;
     310      }
    292311    }
    293312    #endregion
Note: See TracChangeset for help on using the changeset viewer.