Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/02/15 16:11:20 (10 years ago)
Author:
jkarder
Message:

#2332: used ISolutionSimilarityCalculator instead of ISingleObjectiveSolutionSimilarityCalculator

  • changed interfaces
  • removed ISimilarityCalculatorView
  • renamed ISingleObjectiveSolutionSimilarityCalculatorView to ISolutionSimilarityCalculatorView
  • algorithms no longer add QualitySimilarityCalculator and NoSimilarityCalculator; problems do that now
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs

    r12087 r12102  
    2929using HeuristicLab.Data;
    3030using HeuristicLab.Optimization;
     31using HeuristicLab.Optimization.Operators;
    3132using HeuristicLab.Parameters;
    3233using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    253254          ApplicationManager.Manager.GetInstances<IGeneralVRPOperator>().Cast<IOperator>()).OrderBy(op => op.Name));
    254255        Operators.Add(new VRPSimilarityCalculator());
     256        Operators.Add(new QualitySimilarityCalculator());
     257        Operators.Add(new NoSimilarityCalculator());
    255258        Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
    256259
     
    284287          op.ParentsParameter.Hidden = true;
    285288        }
    286         foreach (VRPSimilarityCalculator op in Operators.OfType<VRPSimilarityCalculator>()) {
     289        foreach (ISolutionSimilarityCalculator op in Operators.OfType<ISolutionSimilarityCalculator>()) {
    287290          op.SolutionVariableName = SolutionCreator.VRPToursParameter.ActualName;
    288291          op.QualityVariableName = ProblemInstance.SolutionEvaluator.QualityParameter.ActualName;
    289           op.ProblemInstance = ProblemInstance;
     292          var calc = op as VRPSimilarityCalculator;
     293          if (calc != null) calc.ProblemInstance = ProblemInstance;
    290294        }
    291295      }
Note: See TracChangeset for help on using the changeset viewer.