Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/03/15 14:00:38 (10 years ago)
Author:
bburlacu
Message:

#2276: Merged trunk changes.

Location:
branches/HeuristicLab.DatasetRefactor/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources

  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs

    r12105 r12109  
    163163      #region Backwards compatible code, remove with 3.4
    164164      if (Parameters.ContainsKey("SimilarityCalculator")) {
     165#pragma warning disable 0618
    165166        var oldParameter = (IConstrainedValueParameter<ISingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"];
     167#pragma warning restore 0618
    166168        Parameters.Remove(oldParameter);
    167169        var newParameter = new ConstrainedValueParameter<ISolutionSimilarityCalculator>("SimilarityCalculator", "The operator used to calculate the similarity between two solutions.", new ItemSet<ISolutionSimilarityCalculator>(oldParameter.ValidValues));
     
    408410        SimilarityCalculatorParameter.ValidValues.Add(similarityCalculator);
    409411
     412      if (!SimilarityCalculatorParameter.ValidValues.Any()) {
     413        SimilarityCalculatorParameter.ValidValues.Add(new QualitySimilarityCalculator { QualityVariableName = Problem.Evaluator.QualityParameter.ActualName });
     414        SimilarityCalculatorParameter.ValidValues.Add(new NoSimilarityCalculator());
     415      }
     416
    410417      if (oldSimilarityCalculator != null) {
    411418        ISolutionSimilarityCalculator similarityCalculator = SimilarityCalculatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSimilarityCalculator.GetType());
Note: See TracChangeset for help on using the changeset viewer.