Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/02/12 18:59:15 (12 years ago)
Author:
jkarder
Message:

#1899: applied the changes suggested by ascheibe in comment:6:ticket:1899

Location:
trunk/sources/HeuristicLab.Problems.Knapsack/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj

    r8600 r8720  
    129129  </ItemGroup>
    130130  <ItemGroup>
     131    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
     132      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
     133      <Name>HeuristicLab.Analysis-3.3</Name>
     134    </ProjectReference>
    131135    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    132136      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
     
    216220  -->
    217221  <PropertyGroup>
    218    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     222    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    219223set ProjectDir=$(ProjectDir)
    220224set SolutionDir=$(SolutionDir)
     
    223227call PreBuildEvent.cmd
    224228</PreBuildEvent>
    225 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     229    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    226230export ProjectDir=$(ProjectDir)
    227231export SolutionDir=$(SolutionDir)
  • trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs

    r8334 r8720  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    8081    private BestKnapsackSolutionAnalyzer BestKnapsackSolutionAnalyzer {
    8182      get { return Operators.OfType<BestKnapsackSolutionAnalyzer>().FirstOrDefault(); }
     83    }
     84    private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer {
     85      get { return Operators.OfType<SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); }
    8286    }
    8387    #endregion
     
    228232    }
    229233    private void ParameterizeAnalyzer() {
    230       BestKnapsackSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    231       BestKnapsackSolutionAnalyzer.MaximizationParameter.Hidden = true;
    232       BestKnapsackSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
    233       BestKnapsackSolutionAnalyzer.BestKnownQualityParameter.Hidden = true;
    234       BestKnapsackSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    235       BestKnapsackSolutionAnalyzer.BestKnownSolutionParameter.Hidden = true;
    236       BestKnapsackSolutionAnalyzer.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
    237       BestKnapsackSolutionAnalyzer.BinaryVectorParameter.Hidden = true;
    238       BestKnapsackSolutionAnalyzer.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
    239       BestKnapsackSolutionAnalyzer.KnapsackCapacityParameter.Hidden = true;
    240       BestKnapsackSolutionAnalyzer.WeightsParameter.ActualName = WeightsParameter.Name;
    241       BestKnapsackSolutionAnalyzer.WeightsParameter.Hidden = true;
    242       BestKnapsackSolutionAnalyzer.ValuesParameter.ActualName = ValuesParameter.Name;
    243       BestKnapsackSolutionAnalyzer.ValuesParameter.Hidden = true;
     234      if (BestKnapsackSolutionAnalyzer != null) {
     235        BestKnapsackSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
     236        BestKnapsackSolutionAnalyzer.MaximizationParameter.Hidden = true;
     237        BestKnapsackSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
     238        BestKnapsackSolutionAnalyzer.BestKnownQualityParameter.Hidden = true;
     239        BestKnapsackSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
     240        BestKnapsackSolutionAnalyzer.BestKnownSolutionParameter.Hidden = true;
     241        BestKnapsackSolutionAnalyzer.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
     242        BestKnapsackSolutionAnalyzer.BinaryVectorParameter.Hidden = true;
     243        BestKnapsackSolutionAnalyzer.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
     244        BestKnapsackSolutionAnalyzer.KnapsackCapacityParameter.Hidden = true;
     245        BestKnapsackSolutionAnalyzer.WeightsParameter.ActualName = WeightsParameter.Name;
     246        BestKnapsackSolutionAnalyzer.WeightsParameter.Hidden = true;
     247        BestKnapsackSolutionAnalyzer.ValuesParameter.ActualName = ValuesParameter.Name;
     248        BestKnapsackSolutionAnalyzer.ValuesParameter.Hidden = true;
     249      }
     250
     251      if (SingleObjectivePopulationDiversityAnalyzer != null) {
     252        SingleObjectivePopulationDiversityAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
     253        SingleObjectivePopulationDiversityAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     254        SingleObjectivePopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results";
     255        SingleObjectivePopulationDiversityAnalyzer.SimilarityCalculator = Operators.OfType<KnapsackSimilarityCalculator>().SingleOrDefault();
     256      }
    244257    }
    245258    private void InitializeOperators() {
     
    250263
    251264      Operators.Add(new BestKnapsackSolutionAnalyzer());
     265      Operators.Add(new SingleObjectivePopulationDiversityAnalyzer());
    252266      ParameterizeAnalyzer();
    253267      foreach (IBinaryVectorOperator op in ApplicationManager.Manager.GetInstances<IBinaryVectorOperator>()) {
  • trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Plugin.cs.frame

    r8334 r8720  
    2828  [Plugin("HeuristicLab.Problems.Knapsack", "3.3.7.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Problems.Knapsack-3.3.dll", PluginFileType.Assembly)]
     30  [PluginDependency("HeuristicLab.Analysis", "3.3")]
    3031  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3132  [PluginDependency("HeuristicLab.Common", "3.3")]
Note: See TracChangeset for help on using the changeset viewer.