Changeset 12105 for branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.VehicleRouting
- Timestamp:
- 03/03/15 11:18:07 (10 years ago)
- Location:
- branches/HeuristicLab.DatasetRefactor/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DatasetRefactor/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 12037,12041,12057,12059-12060,12067,12069-12070,12072,12074,12076-12078,12085,12087-12091,12093,12095-12096,12100-12104
- Property svn:mergeinfo changed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting merged: 12069-12070,12087,12102
- Property svn:mergeinfo changed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.VehicleRouting/3.4/SimilarityCalculators/VRPSimilarityCalculator.cs
r12031 r12105 40 40 [StorableClass] 41 41 public sealed class VRPSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator { 42 #region Properties 42 protected override bool IsCommutative { get { return true; } } 43 43 44 [Storable] 44 45 public IVRPProblemInstance ProblemInstance { get; set; } 45 #endregion46 46 47 47 private VRPSimilarityCalculator(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs
r12031 r12105 29 29 using HeuristicLab.Data; 30 30 using HeuristicLab.Optimization; 31 using HeuristicLab.Optimization.Operators; 31 32 using HeuristicLab.Parameters; 32 33 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 114 115 set { SolutionCreatorParameter.Value = value; } 115 116 } 116 private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer {117 get { return Operators.OfType<SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); }118 }119 117 #endregion 120 118 … … 256 254 ApplicationManager.Manager.GetInstances<IGeneralVRPOperator>().Cast<IOperator>()).OrderBy(op => op.Name)); 257 255 Operators.Add(new VRPSimilarityCalculator()); 258 Operators.Add(new SingleObjectivePopulationDiversityAnalyzer()); 256 Operators.Add(new QualitySimilarityCalculator()); 257 Operators.Add(new NoSimilarityCalculator()); 258 Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>())); 259 259 260 260 IVRPCreator defaultCreator = null; … … 287 287 op.ParentsParameter.Hidden = true; 288 288 } 289 foreach ( VRPSimilarityCalculator op in Operators.OfType<VRPSimilarityCalculator>()) {289 foreach (ISolutionSimilarityCalculator op in Operators.OfType<ISolutionSimilarityCalculator>()) { 290 290 op.SolutionVariableName = SolutionCreator.VRPToursParameter.ActualName; 291 291 op.QualityVariableName = ProblemInstance.SolutionEvaluator.QualityParameter.ActualName; 292 op.ProblemInstance = ProblemInstance; 293 } 294 if (SingleObjectivePopulationDiversityAnalyzer != null) { 295 SingleObjectivePopulationDiversityAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name; 296 SingleObjectivePopulationDiversityAnalyzer.QualityParameter.ActualName = ProblemInstance.SolutionEvaluator.QualityParameter.ActualName; 297 SingleObjectivePopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results"; 298 SingleObjectivePopulationDiversityAnalyzer.SimilarityCalculator = Operators.OfType<VRPSimilarityCalculator>().SingleOrDefault(); 292 var calc = op as VRPSimilarityCalculator; 293 if (calc != null) calc.ProblemInstance = ProblemInstance; 299 294 } 300 295 }
Note: See TracChangeset
for help on using the changeset viewer.