Changeset 12694 for branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman
- Timestamp:
- 07/09/15 13:07:30 (9 years ago)
- Location:
- branches/HeuristicLab.Problems.Orienteering
- Files:
-
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.Orienteering
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
-
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 36 36 [Item("BestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")] 37 37 [StorableClass] 38 public sealed class BestTSPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {38 public sealed class BestTSPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator { 39 39 public bool EnabledByDefault { 40 40 get { return true; } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPAlleleFrequencyAnalyzer.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalyzer.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/DistanceMatrix.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPDistanceMatrixEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEuclideanPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPGeoPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPRoundedEuclideanPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPUpperEuclideanPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj
r9848 r12694 18 18 <UpgradeBackupLocation> 19 19 </UpgradeBackupLocation> 20 <TargetFrameworkVersion>v4. 0</TargetFrameworkVersion>20 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 21 21 <TargetFrameworkProfile> 22 22 </TargetFrameworkProfile> … … 48 48 </DocumentationFile> 49 49 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 50 <Prefer32Bit>false</Prefer32Bit> 50 51 </PropertyGroup> 51 52 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> … … 60 61 <TreatWarningsAsErrors>false</TreatWarningsAsErrors> 61 62 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 63 <Prefer32Bit>false</Prefer32Bit> 62 64 </PropertyGroup> 63 65 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> … … 69 71 <ErrorReport>prompt</ErrorReport> 70 72 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 73 <Prefer32Bit>false</Prefer32Bit> 71 74 </PropertyGroup> 72 75 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> … … 80 83 <ErrorReport>prompt</ErrorReport> 81 84 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 85 <Prefer32Bit>false</Prefer32Bit> 82 86 </PropertyGroup> 83 87 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> … … 89 93 <ErrorReport>prompt</ErrorReport> 90 94 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 95 <Prefer32Bit>false</Prefer32Bit> 91 96 </PropertyGroup> 92 97 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> … … 100 105 <ErrorReport>prompt</ErrorReport> 101 106 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 107 <Prefer32Bit>false</Prefer32Bit> 102 108 </PropertyGroup> 103 109 <ItemGroup> … … 251 257 --> 252 258 <PropertyGroup> 253 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)259 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 254 260 set ProjectDir=$(ProjectDir) 255 261 set SolutionDir=$(SolutionDir) … … 258 264 call PreBuildEvent.cmd 259 265 </PreBuildEvent> 260 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">266 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 261 267 export ProjectDir=$(ProjectDir) 262 268 export SolutionDir=$(SolutionDir) -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Improvers/TSPImprovementOperator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 95 95 96 96 public override IOperation Apply() { 97 Permutation currSol= CurrentScope.Variables[SolutionParameter.ActualName].Value as Permutation;98 if ( currSol== null)97 var solution = CurrentScope.Variables[SolutionParameter.ActualName].Value as Permutation; 98 if (solution == null) 99 99 throw new ArgumentException("Cannot improve solution because it has the wrong type."); 100 if ( currSol.PermutationType != PermutationTypes.RelativeUndirected)100 if (solution.PermutationType != PermutationTypes.RelativeUndirected) 101 101 throw new ArgumentException("Cannot improve solution because the permutation type is not supported."); 102 102 103 103 for (int i = 0; i < ImprovementAttempts.Value; i++) { 104 int a = Random.Next(currSol.Length); 105 int b = Random.Next(currSol.Length); 106 double oldFirstEdgeLength = DistanceMatrix[currSol[a], currSol[(a - 1 + currSol.Length) % currSol.Length]]; 107 double oldSecondEdgeLength = DistanceMatrix[currSol[b], currSol[(b + 1) % currSol.Length]]; 108 double newFirstEdgeLength = DistanceMatrix[currSol[b], currSol[(a - 1 + currSol.Length) % currSol.Length]]; 109 double newSecondEdgeLength = DistanceMatrix[currSol[a], currSol[(b + 1 + currSol.Length) % currSol.Length]]; 110 if (newFirstEdgeLength + newSecondEdgeLength < oldFirstEdgeLength + oldSecondEdgeLength) 111 Invert(currSol, a, b); 104 var move = StochasticInversionSingleMoveGenerator.Apply(solution, Random); 105 double moveQualtiy = TSPInversionMovePathEvaluator.EvaluateByDistanceMatrix(solution, move, DistanceMatrix); 106 if (moveQualtiy < 0) 107 InversionManipulator.Apply(solution, move.Index1, move.Index2); 112 108 } 113 109 … … 116 112 return base.Apply(); 117 113 } 118 119 private void Invert(Permutation sol, int i, int j) {120 if (i != j)121 for (int a = 0; a < Math.Abs(i - j) / 2; a++)122 if (sol[(i + a) % sol.Length] != sol[(j - a + sol.Length) % sol.Length]) {123 // XOR swap124 sol[(i + a) % sol.Length] ^= sol[(j - a + sol.Length) % sol.Length];125 sol[(j - a + sol.Length) % sol.Length] ^= sol[(i + a) % sol.Length];126 sol[(i + a) % sol.Length] ^= sol[(j - a + sol.Length) % sol.Length];127 }128 }129 114 } 130 115 } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPCoordinatesPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPDistanceMatrixEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPMoveEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathMoveEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPMoveEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveEuclideanPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveGeoPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveEuclideanPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveGeoPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveRoundedEuclideanPathEvaluator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/PathRelinkers/TSPMultipleGuidesPathRelinker.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/PathRelinkers/TSPPathRelinker.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/PathRelinkers/TSPSimultaneousPathRelinker.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/PathTSPTour.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Plugin.cs.frame
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 /// Plugin class for HeuristicLab.Problems.TravelingSalesman plugin 27 27 /// </summary> 28 [Plugin("HeuristicLab.Problems.TravelingSalesman", "3.3.1 0.$WCREV$")]28 [Plugin("HeuristicLab.Problems.TravelingSalesman", "3.3.11.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.TravelingSalesman-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/Properties/AssemblyInfo.cs.frame
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [assembly: AssemblyCompany("")] 32 32 [assembly: AssemblyProduct("HeuristicLab")] 33 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]33 [assembly: AssemblyCopyright("(c) 2002-2015 HEAL")] 34 34 [assembly: AssemblyTrademark("")] 35 35 [assembly: AssemblyCulture("")] … … 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.3.0.0")] 55 [assembly: AssemblyFileVersion("3.3.1 0.$WCREV$")]55 [assembly: AssemblyFileVersion("3.3.11.$WCREV$")] -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/SimilarityCalculators/TSPSimilarityCalculator.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 35 35 [Item("TSPSimilarityCalculator", "An operator that performs similarity calculation between two traveling salesman solutions. The operator calculates the similarity based on the number of edges the two solutions have in common.")] 36 36 public sealed class TSPSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator { 37 protected override bool IsCommutative { get { return true; } } 38 37 39 private TSPSimilarityCalculator(bool deserializing) : base(deserializing) { } 38 40 private TSPSimilarityCalculator(TSPSimilarityCalculator original, Cloner cloner) : base(original, cloner) { } -
branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
r11185 r12694 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 30 30 using HeuristicLab.Encodings.PermutationEncoding; 31 31 using HeuristicLab.Optimization; 32 using HeuristicLab.Optimization.Operators; 32 33 using HeuristicLab.Parameters; 33 34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 37 38 namespace HeuristicLab.Problems.TravelingSalesman { 38 39 [Item("Traveling Salesman Problem", "Represents a symmetric Traveling Salesman Problem.")] 39 [Creatable( "Problems")]40 [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 100)] 40 41 [StorableClass] 41 42 public sealed class TravelingSalesmanProblem : SingleObjectiveHeuristicOptimizationProblem<ITSPEvaluator, IPermutationCreator>, IStorableContent, … … 81 82 private TSPAlleleFrequencyAnalyzer TSPAlleleFrequencyAnalyzer { 82 83 get { return Operators.OfType<TSPAlleleFrequencyAnalyzer>().FirstOrDefault(); } 83 }84 private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer {85 get { return Operators.OfType<SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); }86 84 } 87 85 #endregion … … 236 234 Operators.Add(new TSPSimultaneousPathRelinker()); 237 235 Operators.Add(new TSPSimilarityCalculator()); 236 Operators.Add(new QualitySimilarityCalculator()); 237 Operators.Add(new NoSimilarityCalculator()); 238 238 239 239 Operators.Add(new BestTSPSolutionAnalyzer()); 240 240 Operators.Add(new TSPAlleleFrequencyAnalyzer()); 241 Operators.Add(new SingleObjectivePopulationDiversityAnalyzer());241 Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>())); 242 242 ParameterizeAnalyzers(); 243 243 var operators = new HashSet<IPermutationOperator>(new IPermutationOperator[] { … … 319 319 TSPAlleleFrequencyAnalyzer.ResultsParameter.ActualName = "Results"; 320 320 } 321 322 if (SingleObjectivePopulationDiversityAnalyzer != null) {323 SingleObjectivePopulationDiversityAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;324 SingleObjectivePopulationDiversityAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;325 SingleObjectivePopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results";326 SingleObjectivePopulationDiversityAnalyzer.SimilarityCalculator = Operators.OfType<TSPSimilarityCalculator>().SingleOrDefault();327 }328 321 } 329 322 private void ParameterizeOperators() { … … 366 359 op.ParentsParameter.Hidden = true; 367 360 } 368 foreach ( TSPSimilarityCalculator op in Operators.OfType<TSPSimilarityCalculator>()) {361 foreach (ISolutionSimilarityCalculator op in Operators.OfType<ISolutionSimilarityCalculator>()) { 369 362 op.SolutionVariableName = SolutionCreator.PermutationParameter.ActualName; 370 363 op.QualityVariableName = Evaluator.QualityParameter.ActualName;
Note: See TracChangeset
for help on using the changeset viewer.