Changeset 14412
- Timestamp:
- 11/25/16 09:31:59 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/HeuristicLab.Encodings.BinaryVectorEncoding-3.3.csproj
r11961 r14412 126 126 <Compile Include="Crossovers\NPointCrossover.cs" /> 127 127 <Compile Include="BinaryVector.cs" /> 128 <Compile Include="HammingSimilarityCalculator.cs" /> 128 129 <Compile Include="Interfaces\IBinaryVectorMultiNeighborhoodShakingOperator.cs" /> 129 130 <Compile Include="Interfaces\IOneBitflipMoveOperator.cs" /> -
trunk/sources/HeuristicLab.Problems.Binary/3.3/BinaryProblem.cs
r14185 r14412 24 24 using System; 25 25 using System.Linq; 26 using HeuristicLab.Analysis; 26 27 using HeuristicLab.Common; 27 28 using HeuristicLab.Core; … … 29 30 using HeuristicLab.Encodings.BinaryVectorEncoding; 30 31 using HeuristicLab.Optimization; 32 using HeuristicLab.Optimization.Operators; 31 33 using HeuristicLab.Parameters; 32 34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 61 63 Parameters.Add(lengthParameter); 62 64 Encoding.LengthParameter = lengthParameter; 65 Operators.Add(new HammingSimilarityCalculator()); 66 Operators.Add(new QualitySimilarityCalculator()); 67 Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>())); 68 Parameterize(); 63 69 RegisterEventHandlers(); 64 70 } … … 87 93 base.OnEncodingChanged(); 88 94 Encoding.LengthParameter = LengthParameter; 95 Parameterize(); 89 96 } 90 97 98 private void Parameterize() { 99 foreach (var similarityCalculator in Operators.OfType<ISolutionSimilarityCalculator>()) { 100 similarityCalculator.SolutionVariableName = Encoding.SolutionCreator.BinaryVectorParameter.ActualName; 101 similarityCalculator.QualityVariableName = Evaluator.QualityParameter.ActualName; 102 } 103 } 91 104 92 105 private void RegisterEventHandlers() { -
trunk/sources/HeuristicLab.Problems.Binary/3.3/HeuristicLab.Problems.Binary-3.3.csproj
r11993 r14412 96 96 </ItemGroup> 97 97 <ItemGroup> 98 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj"> 99 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project> 100 <Name>HeuristicLab.Analysis-3.3</Name> 101 <Private>False</Private> 102 </ProjectReference> 98 103 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 99 104 <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project> … … 124 129 <Project>{23da7ff4-d5b8-41b6-aa96-f0561d24f3ee}</Project> 125 130 <Name>HeuristicLab.Operators-3.3</Name> 131 <Private>False</Private> 132 </ProjectReference> 133 <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj"> 134 <Project>{25087811-f74c-4128-bc86-8324271da13e}</Project> 135 <Name>HeuristicLab.Optimization.Operators-3.3</Name> 126 136 <Private>False</Private> 127 137 </ProjectReference> … … 163 173 $SolutionDir/PreBuildEvent.sh 164 174 </PreBuildEvent> 165 </PropertyGroup> 175 </PropertyGroup> 166 176 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 167 177 Other similar extension points exist, see Microsoft.Common.targets. -
trunk/sources/HeuristicLab.Problems.Binary/3.3/Plugin.cs.frame
r14195 r14412 28 28 [Plugin("HeuristicLab.Problems.Binary","Provides binary benchmark problems.", "3.3.14.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.Binary-3.3.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] 30 31 [PluginDependency("HeuristicLab.Collections", "3.3")] 31 32 [PluginDependency("HeuristicLab.Common", "3.3")] … … 34 35 [PluginDependency("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3")] 35 36 [PluginDependency("HeuristicLab.Optimization", "3.3")] 37 [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")] 36 38 [PluginDependency("HeuristicLab.Parameters", "3.3")] 37 39 [PluginDependency("HeuristicLab.Persistence", "3.3")] -
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs
r14185 r14412 251 251 Operators.Add(new KnapsackPathRelinker()); 252 252 Operators.Add(new KnapsackSimultaneousPathRelinker()); 253 Operators.Add(new KnapsackSimilarityCalculator());253 Operators.Add(new HammingSimilarityCalculator()); 254 254 Operators.Add(new QualitySimilarityCalculator()); 255 Operators.Add(new NoSimilarityCalculator());256 255 257 256 Operators.Add(new BestKnapsackSolutionAnalyzer()); -
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs
r14185 r14412 25 25 using HeuristicLab.Encodings.BinaryVectorEncoding; 26 26 using HeuristicLab.Optimization.Operators; 27 using HeuristicLab.PluginInfrastructure; 27 28 28 29 namespace HeuristicLab.Problems.Knapsack { … … 34 35 /// </remarks> 35 36 [Item("KnapsackSimilarityCalculator", "An operator that performs similarity calculation between two knapsack solutions. The operator calculates the similarity based on the number of elements the two solutions have in common.")] 36 public sealed class KnapsackSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator { 37 [NonDiscoverableType] 38 [Obsolete("Please use the HammingSimilarityCalculator in the HeuristicLab.Encodings.BinaryVector plugin.")] 39 internal sealed class KnapsackSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator { 37 40 protected override bool IsCommutative { get { return true; } } 38 41
Note: See TracChangeset
for help on using the changeset viewer.