Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11987


Ignore:
Timestamp:
02/12/15 15:39:28 (9 years ago)
Author:
abeham
Message:

#2282:

  • Renamed BinaryVectorProblem to BinaryProblem
  • Removed IBinaryVectorProblem interface
  • Derived BinaryProblem from SingleObjectiveBasicProblem
  • Changed bool[] datatype to BinaryVector
Location:
trunk/sources
Files:
3 deleted
17 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab 3.3.sln

    r11961 r11987  
    420420Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3", "HeuristicLab.Algorithms.ParameterlessPopulationPyramid\3.3\HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3.csproj", "{9319C447-8183-4DBC-8145-0E3CF98084CC}"
    421421EndProject
    422 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.BinaryVector-3.3", "HeuristicLab.Problems.BinaryVector\3.3\HeuristicLab.Problems.BinaryVector-3.3.csproj", "{FC627BE5-0F93-47D8-BD2E-530EA2B8AA5F}"
     422Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Binary-3.3", "HeuristicLab.Problems.Binary\3.3\HeuristicLab.Problems.Binary-3.3.csproj", "{FC627BE5-0F93-47D8-BD2E-530EA2B8AA5F}"
    423423EndProject
    424424Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Programmable-3.3", "HeuristicLab.Problems.Programmable\3.3\HeuristicLab.Problems.Programmable-3.3.csproj", "{EE07BFF8-B23D-41F5-8AD7-AC9598D7A2C9}"
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/EvaluationTracker.cs

    r11956 r11987  
    2222
    2323using System;
    24 using HeuristicLab.Problems.BinaryVector;
     24using HeuristicLab.Common;
     25using HeuristicLab.Core;
     26using HeuristicLab.Encodings.BinaryVectorEncoding;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Problems.Binary;
    2529
    2630namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid {
     
    2832  // B. W. Goldman and W. F. Punch, "Parameter-less Population Pyramid," GECCO, pp. 785–792, 2014
    2933  // and the original source code in C++11 available from: https://github.com/brianwgoldman/Parameter-less_Population_Pyramid
    30   public class EvaluationTracker : IBinaryVectorProblem {
    31     private readonly IBinaryVectorProblem problem;
     34  internal sealed class EvaluationTracker : BinaryProblem {
     35    private readonly BinaryProblem problem;
    3236
    3337    private int maxEvaluations;
     
    4953    }
    5054
    51     public bool[] BestSolution {
     55    public BinaryVector BestSolution {
    5256      get;
    5357      private set;
     
    5559    #endregion
    5660
    57     public EvaluationTracker(IBinaryVectorProblem problem, int maxEvaluations) {
     61    [StorableConstructor]
     62    private EvaluationTracker(bool deserializing) : base(deserializing) { }
     63    private EvaluationTracker(EvaluationTracker original, Cloner cloner)
     64      : base(original, cloner) {
     65      problem = cloner.Clone(original.problem);
     66      maxEvaluations = original.maxEvaluations;
     67      BestQuality = original.BestQuality;
     68      Evaluations = original.Evaluations;
     69      BestFoundOnEvaluation = original.BestFoundOnEvaluation;
     70      BestSolution = cloner.Clone(BestSolution);
     71    }
     72    public override IDeepCloneable Clone(Cloner cloner) {
     73      return new EvaluationTracker(this, cloner);
     74    }
     75    public EvaluationTracker(BinaryProblem problem, int maxEvaluations) {
    5876      this.problem = problem;
    5977      this.maxEvaluations = maxEvaluations;
    60       BestSolution = new bool[0];
     78      BestSolution = new BinaryVector(Length);
    6179      BestQuality = double.NaN;
    6280      Evaluations = 0;
     
    6482    }
    6583
    66     public double Evaluate(bool[] individual) {
     84
     85
     86    public override double Evaluate(BinaryVector vector, IRandom random) {
    6787      if (Evaluations >= maxEvaluations) throw new OperationCanceledException("Maximum Evaluation Limit Reached");
    6888      Evaluations++;
    69       double fitness = problem.Evaluate(individual);
     89      double fitness = problem.Evaluate(vector, random);
    7090      if (double.IsNaN(BestQuality) || problem.IsBetter(fitness, BestQuality)) {
    7191        BestQuality = fitness;
    72         BestSolution = (bool[])individual.Clone();
     92        BestSolution = (BinaryVector)vector.Clone();
    7393        BestFoundOnEvaluation = Evaluations;
    7494      }
     
    7696    }
    7797
    78     #region ForwardedInteraface
    79     public int Length {
     98    public override int Length {
    8099      get { return problem.Length; }
     100      set { problem.Length = value; }
    81101    }
    82     public bool Maximization {
     102
     103    public override bool Maximization {
    83104      get { return problem.Maximization; }
    84105    }
     106
    85107    public bool IsBetter(double quality, double bestQuality) {
    86108      return problem.IsBetter(quality, bestQuality);
    87109    }
    88     #endregion
     110
    89111  }
    90112}
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3.csproj

    r11961 r11987  
    148148      <Private>False</Private>
    149149    </ProjectReference>
    150     <ProjectReference Include="..\..\HeuristicLab.Problems.BinaryVector\3.3\HeuristicLab.Problems.BinaryVector-3.3.csproj">
     150    <ProjectReference Include="..\..\HeuristicLab.Problems.Binary\3.3\HeuristicLab.Problems.Binary-3.3.csproj">
    151151      <Project>{fc627be5-0f93-47d8-bd2e-530ea2b8aa5f}</Project>
    152152      <Name>HeuristicLab.Problems.BinaryVector-3.3</Name>
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs

    r11960 r11987  
    2828using HeuristicLab.Core;
    2929using HeuristicLab.Data;
     30using HeuristicLab.Encodings.BinaryVectorEncoding;
    3031using HeuristicLab.Optimization;
    3132using HeuristicLab.Parameters;
    3233using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    33 using HeuristicLab.Problems.BinaryVector;
     34using HeuristicLab.Problems.Binary;
    3435using HeuristicLab.Random;
    3536
     
    4950
    5051    public override Type ProblemType {
    51       get { return typeof(BinaryVectorProblem); }
     52      get { return typeof(BinaryProblem); }
    5253    }
    53     public new BinaryVectorProblem Problem {
    54       get { return (BinaryVectorProblem)base.Problem; }
     54    public new BinaryProblem Problem {
     55      get { return (BinaryProblem)base.Problem; }
    5556      set { base.Problem = value; }
    5657    }
     
    8384      Results.Add(new Result("Best quality", BestQuality));
    8485      for (int iteration = 0; iteration < Iterations; iteration++) {
    85         bool[] solution = new bool[Problem.Length];
     86        var solution = new BinaryVector(Problem.Length);
    8687        for (int i = 0; i < solution.Length; i++) {
    8788          solution[i] = random.Next(2) == 1;
    8889        }
    8990
    90         var fitness = Problem.Evaluate(solution);
     91        var fitness = Problem.Evaluate(solution, random);
    9192
    9293        fitness = ImproveToLocalOptimum(Problem, solution, fitness, random);
     
    9798    }
    9899    // In the GECCO paper, Section 2.1
    99     public static double ImproveToLocalOptimum(IBinaryVectorProblem problem, bool[] solution, double fitness, IRandom rand) {
     100    public static double ImproveToLocalOptimum(BinaryProblem problem, BinaryVector solution, double fitness, IRandom rand) {
    100101      var tried = new HashSet<int>();
    101102      do {
     
    104105          if (tried.Contains(option)) continue;
    105106          solution[option] = !solution[option];
    106           double newFitness = problem.Evaluate(solution);
     107          double newFitness = problem.Evaluate(solution, rand);
    107108          if (problem.IsBetter(newFitness, fitness)) {
    108109            fitness = newFitness;
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageCrossover.cs

    r11956 r11987  
    2323using System.Linq;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Problems.BinaryVector;
     25using HeuristicLab.Encodings.BinaryVectorEncoding;
     26using HeuristicLab.Problems.Binary;
    2627using HeuristicLab.Random;
    2728
     
    3233  public static class LinkageCrossover {
    3334    // In the GECCO paper, Figure 3
    34     public static double ImproveUsingTree(LinkageTree tree, IList<bool[]> donors, bool[] solution, double fitness, IBinaryVectorProblem problem, IRandom rand) {
     35    public static double ImproveUsingTree(LinkageTree tree, IList<BinaryVector> donors, BinaryVector solution, double fitness, BinaryProblem problem, IRandom rand) {
    3536      var options = Enumerable.Range(0, donors.Count).ToArray();
    3637      foreach (var cluster in tree.Clusters) {
     
    4041        foreach (var donorIndex in options.ShuffleList(rand)) {
    4142          // Attempt the donation
    42           fitness = Donate(solution, fitness, donors[donorIndex], cluster, problem, out donorFound);
     43          fitness = Donate(solution, fitness, donors[donorIndex], cluster, problem, rand, out donorFound);
    4344          if (donorFound) break;
    4445        }
     
    4748    }
    4849
    49     private static double Donate(bool[] solution, double fitness, bool[] source, IEnumerable<int> cluster, IBinaryVectorProblem problem, out bool changed) {
     50    private static double Donate(BinaryVector solution, double fitness, BinaryVector source, IEnumerable<int> cluster, BinaryProblem problem, IRandom rand, out bool changed) {
    5051      // keep track of which bits flipped to make the donation
    5152      List<int> flipped = new List<int>();
     
    5859      changed = flipped.Count > 0;
    5960      if (changed) {
    60         double newFitness = problem.Evaluate(solution);
     61        double newFitness = problem.Evaluate(solution, rand);
    6162        // if the original is strictly better, revert the change
    6263        if (problem.IsBetter(fitness, newFitness)) {
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageTree.cs

    r11939 r11987  
    2626using HeuristicLab.Common;
    2727using HeuristicLab.Core;
     28using HeuristicLab.Encodings.BinaryVectorEncoding;
    2829using HeuristicLab.Random;
    2930
     
    6465    }
    6566
    66     public void Add(bool[] solution) {
     67    public void Add(BinaryVector solution) {
    6768      if (solution.Length != length) throw new ArgumentException("The individual has not the correct length.");
    6869      for (int i = 1; i < solution.Length; i++) {
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs

    r11960 r11987  
    3232using HeuristicLab.Parameters;
    3333using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    34 using HeuristicLab.Problems.BinaryVector;
     34using HeuristicLab.Problems.Binary;
    3535using HeuristicLab.Random;
    3636
     
    4444  public class ParameterlessPopulationPyramid : BasicAlgorithm {
    4545    public override Type ProblemType {
    46       get { return typeof(BinaryVectorProblem); }
    47     }
    48     public new BinaryVectorProblem Problem {
    49       get { return (BinaryVectorProblem)base.Problem; }
     46      get { return typeof(BinaryProblem); }
     47    }
     48    public new BinaryProblem Problem {
     49      get { return (BinaryProblem)base.Problem; }
    5050      set { base.Problem = value; }
    5151    }
     
    5656
    5757    // Tracks all solutions in Pyramid for quick membership checks
    58     private HashSet<bool[]> seen = new HashSet<bool[]>(new EnumerableBoolEqualityComparer());
     58    private HashSet<BinaryVector> seen = new HashSet<BinaryVector>(new EnumerableBoolEqualityComparer());
    5959
    6060    #region ParameterNames
     
    179179    }
    180180
    181     private void AddIfUnique(bool[] solution, int level) {
     181    private void AddIfUnique(BinaryVector solution, int level) {
    182182      // Don't add things you have seen
    183183      if (seen.Contains(solution)) return;
     
    185185        pyramid.Add(new Population(tracker.Length, random));
    186186      }
    187       var copied = (bool[])solution.Clone();
     187      var copied = (BinaryVector)solution.Clone();
    188188      pyramid[level].Add(copied);
    189189      seen.Add(copied);
     
    193193    private double iterate() {
    194194      // Create a random solution
    195       bool[] solution = new bool[tracker.Length];
     195      BinaryVector solution = new BinaryVector(tracker.Length);
    196196      for (int i = 0; i < solution.Length; i++) {
    197197        solution[i] = random.Next(2) == 1;
    198198      }
    199       double fitness = tracker.Evaluate(solution);
     199      double fitness = tracker.Evaluate(solution, random);
    200200      fitness = HillClimber.ImproveToLocalOptimum(tracker, solution, fitness, random);
    201201      AddIfUnique(solution, 0);
     
    249249          fitness = iterate();
    250250          cancellationToken.ThrowIfCancellationRequested();
    251         }
    252         finally {
     251        } finally {
    253252          ResultsEvaluations = tracker.Evaluations;
    254253          ResultsBestSolution = new BinaryVector(tracker.BestSolution);
  • trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Population.cs

    r11838 r11987  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Core;
     25using HeuristicLab.Encodings.BinaryVectorEncoding;
    2526
    2627namespace HeuristicLab.Algorithms.ParameterlessPopulationPyramid {
     
    2930  // and the original source code in C++11 available from: https://github.com/brianwgoldman/Parameter-less_Population_Pyramid
    3031  public class Population {
    31     public List<bool[]> Solutions {
     32    public List<BinaryVector> Solutions {
    3233      get;
    3334      private set;
     
    4041
    4142    public Population(int length, IRandom rand) {
    42       Solutions = new List<bool[]>();
     43      Solutions = new List<BinaryVector>();
    4344      Tree = new LinkageTree(length, rand);
    4445    }
    45     public void Add(bool[] solution) {
     46    public void Add(BinaryVector solution) {
    4647      Solutions.Add(solution);
    4748      Tree.Add(solution);
  • trunk/sources/HeuristicLab.Problems.Binary/3.3/BinaryProblem.cs

    r11983 r11987  
    2525using HeuristicLab.Core;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Encodings.BinaryVectorEncoding;
    2728using HeuristicLab.Optimization;
    2829using HeuristicLab.Parameters;
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3031
    31 namespace HeuristicLab.Problems.BinaryVector {
     32namespace HeuristicLab.Problems.Binary {
    3233  [StorableClass]
    33   public abstract class BinaryVectorProblem : Problem, IBinaryVectorProblem {
    34     private const string LengthParameterName = "Length";
     34  public abstract class BinaryProblem : SingleObjectiveBasicProblem<BinaryVectorEncoding> {
    3535
    36     public IFixedValueParameter<IntValue> LengthParameter {
    37       get { return (IFixedValueParameter<IntValue>)Parameters[LengthParameterName]; }
    38     }
    39 
    40     public int Length {
    41       get { return LengthParameter.Value.Value; }
    42       set { LengthParameter.Value.Value = value; }
    43     }
    44 
    45     public abstract bool Maximization {
    46       get;
     36    public virtual int Length {
     37      get { return Encoding.Length; }
     38      set { Encoding.Length = value; }
    4739    }
    4840
    4941    [StorableConstructor]
    50     protected BinaryVectorProblem(bool deserializing) : base(deserializing) { }
    51     protected BinaryVectorProblem(BinaryVectorProblem original, Cloner cloner) : base(original, cloner) { }
    52     public bool IsBetter(double quality, double bestQuality) {
     42    protected BinaryProblem(bool deserializing) : base(deserializing) { }
     43    protected BinaryProblem(BinaryProblem original, Cloner cloner) : base(original, cloner) { }
     44    protected BinaryProblem() : base() { }
     45
     46    public virtual bool IsBetter(double quality, double bestQuality) {
    5347      return (Maximization && quality > bestQuality || !Maximization && quality < bestQuality);
    5448    }
    5549
    56     public BinaryVectorProblem()
    57       : base() {
    58       Parameters.Add(new FixedValueParameter<IntValue>(LengthParameterName, "", new IntValue(20)));
     50    public sealed override double Evaluate(Individual individual, IRandom random) {
     51      return Evaluate(individual.BinaryVector(), random);
    5952    }
    6053
    61     public abstract double Evaluate(bool[] individual);
    62 
    63 
     54    public abstract double Evaluate(BinaryVector vector, IRandom random);
    6455  }
    6556}
  • trunk/sources/HeuristicLab.Problems.Binary/3.3/DeceptiveStepTrapProblem.cs

    r11960 r11987  
    2525using HeuristicLab.Core;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Encodings.BinaryVectorEncoding;
    2728using HeuristicLab.Parameters;
    2829using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2930
    30 namespace HeuristicLab.Problems.BinaryVector {
     31namespace HeuristicLab.Problems.Binary {
    3132  [Item("Deceptive Step Trap Problem", "Genome encodes completely separable blocks, where each block deceptive with fitness plateaus.")]
    3233  [StorableClass]
     
    8384    }
    8485
    85     protected override int Score(bool[] individual, int trapIndex, int trapSize) {
     86    protected override int Score(BinaryVector individual, int trapIndex, int trapSize) {
    8687      int partial = base.Score(individual, trapIndex, trapSize);
    8788      // introduce plateaus using integer division
  • trunk/sources/HeuristicLab.Problems.Binary/3.3/DeceptiveTrapProblem.cs

    r11960 r11987  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Encodings.BinaryVectorEncoding;
    2829using HeuristicLab.Parameters;
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3031
    31 namespace HeuristicLab.Problems.BinaryVector {
     32namespace HeuristicLab.Problems.Binary {
    3233  [Item("Deceptive Trap Problem", "Genome encodes completely separable blocks, where each block is fully deceptive.")]
    3334  [StorableClass]
    3435  [Creatable("Problems")]
    35   public class DeceptiveTrapProblem : BinaryVectorProblem {
     36  public class DeceptiveTrapProblem : BinaryProblem {
    3637    [StorableConstructor]
    3738    protected DeceptiveTrapProblem(bool deserializing) : base(deserializing) { }
     
    6970
    7071    // In the GECCO paper, calculates Equation 3
    71     protected virtual int Score(bool[] individual, int trapIndex, int trapSize) {
     72    protected virtual int Score(BinaryVector individual, int trapIndex, int trapSize) {
    7273      int result = 0;
    7374      // count number of bits in trap set to 1
     
    8384    }
    8485
    85     public override double Evaluate(bool[] individual) {
     86    public override double Evaluate(BinaryVector individual, IRandom random) {
    8687      if (individual.Length != Length) throw new ArgumentException("The individual has not the correct length.");
    8788      int total = 0;
  • trunk/sources/HeuristicLab.Problems.Binary/3.3/HIFFProblem.cs

    r11960 r11987  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
     27using HeuristicLab.Encodings.BinaryVectorEncoding;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    29 namespace HeuristicLab.Problems.BinaryVector {
     30namespace HeuristicLab.Problems.Binary {
    3031  [Item("Hierararchical If and only If problem", "Genome evaluated in nested subsets to see if each subset contains either all 0s or all 1s.")]
    3132  [StorableClass]
    3233  [Creatable("Problems")]
    33   public class HIFFProblem : BinaryVectorProblem {
     34  public class HIFFProblem : BinaryProblem {
    3435    [StorableConstructor]
    3536    protected HIFFProblem(bool deserializing) : base(deserializing) { }
     
    5051    }
    5152    // In the GECCO paper, Section 4.1
    52     public override double Evaluate(bool[] individual) {
     53    public override double Evaluate(BinaryVector individual, IRandom random) {
    5354      int[] level = new int[individual.Length];
    5455      int levelLength = individual.Length;
  • trunk/sources/HeuristicLab.Problems.Binary/3.3/HeuristicLab.Problems.Binary-3.3.csproj

    r11983 r11987  
    88    <OutputType>Library</OutputType>
    99    <AppDesignerFolder>Properties</AppDesignerFolder>
    10     <RootNamespace>HeuristicLab.Problems.BinaryVector</RootNamespace>
    11     <AssemblyName>HeuristicLab.Problems.BinaryVector-3.3</AssemblyName>
     10    <RootNamespace>HeuristicLab.Problems.Binary</RootNamespace>
     11    <AssemblyName>HeuristicLab.Problems.Binary-3.3</AssemblyName>
    1212    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
     
    8282  </ItemGroup>
    8383  <ItemGroup>
    84     <Compile Include="BinaryVectorProblem.cs" />
     84    <Compile Include="BinaryProblem.cs" />
    8585    <Compile Include="DeceptiveStepTrapProblem.cs" />
    8686    <Compile Include="DeceptiveTrapProblem.cs" />
    8787    <Compile Include="HIFFProblem.cs" />
    88     <Compile Include="IBinaryVectorProblem.cs" />
    8988    <Compile Include="Plugin.cs" />
    9089    <Compile Include="Properties\AssemblyInfo.cs" />
     
    9998      <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
    10099      <Name>HeuristicLab.Collections-3.3</Name>
     100      <Private>False</Private>
    101101    </ProjectReference>
    102102    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    103103      <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
    104104      <Name>HeuristicLab.Common-3.3</Name>
     105      <Private>False</Private>
    105106    </ProjectReference>
    106107    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    107108      <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
    108109      <Name>HeuristicLab.Core-3.3</Name>
     110      <Private>False</Private>
    109111    </ProjectReference>
    110112    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    111113      <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
    112114      <Name>HeuristicLab.Data-3.3</Name>
     115      <Private>False</Private>
     116    </ProjectReference>
     117    <ProjectReference Include="..\..\HeuristicLab.Encodings.BinaryVectorEncoding\3.3\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.csproj">
     118      <Project>{66d249c3-a01d-42a8-82a2-919bc8ec3d83}</Project>
     119      <Name>HeuristicLab.Encodings.BinaryVectorEncoding-3.3</Name>
     120      <Private>False</Private>
     121    </ProjectReference>
     122    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
     123      <Project>{23da7ff4-d5b8-41b6-aa96-f0561d24f3ee}</Project>
     124      <Name>HeuristicLab.Operators-3.3</Name>
     125      <Private>False</Private>
    113126    </ProjectReference>
    114127    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    115128      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
    116129      <Name>HeuristicLab.Optimization-3.3</Name>
     130      <Private>False</Private>
    117131    </ProjectReference>
    118132    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    119133      <Project>{56f9106a-079f-4c61-92f6-86a84c2d84b7}</Project>
    120134      <Name>HeuristicLab.Parameters-3.3</Name>
     135      <Private>False</Private>
    121136    </ProjectReference>
    122137    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    123138      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
    124139      <Name>HeuristicLab.Persistence-3.3</Name>
     140      <Private>False</Private>
    125141    </ProjectReference>
    126142    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    127143      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
    128144      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
     145      <Private>False</Private>
    129146    </ProjectReference>
    130147  </ItemGroup>
  • trunk/sources/HeuristicLab.Problems.Binary/3.3/Plugin.cs.frame

    r11956 r11987  
    2525using HeuristicLab.PluginInfrastructure;
    2626
    27 namespace HeuristicLab.Problems.BinaryVector {
    28   [Plugin("HeuristicLab.Problems.BinaryVector","Provides binary benchmark problems.", "3.3.10.$WCREV$")]
    29   [PluginFile("HeuristicLab.Problems.BinaryVector-3.3.dll", PluginFileType.Assembly)]
     27namespace HeuristicLab.Problems.Binary {
     28  [Plugin("HeuristicLab.Problems.Binary","Provides binary benchmark problems.", "3.3.10.$WCREV$")]
     29  [PluginFile("HeuristicLab.Problems.Binary-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3131  [PluginDependency("HeuristicLab.Common", "3.3")]
     
    3535  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    3636  [PluginDependency("HeuristicLab.Persistence", "3.3")]
    37   public class Plugin : PluginBase {
     37  public class HeuristicLabProblemsBinaryPlugin : PluginBase {
    3838  }
    3939}
  • trunk/sources/HeuristicLab.Problems.Binary/3.3/Properties/AssemblyInfo.cs.frame

    r11956 r11987  
    2626// set of attributes. Change these attribute values to modify the information
    2727// associated with an assembly.
    28 [assembly: AssemblyTitle("HeuristicLab.Problems.BinaryVector")]
     28[assembly: AssemblyTitle("HeuristicLab.Problems.Binary")]
    2929[assembly: AssemblyDescription("Provides binary benchmark problems.")]
    3030[assembly: AssemblyConfiguration("")]
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.4/HeuristicLab.Problems.ExternalEvaluation.Views-3.4.csproj

    r11961 r11987  
    208208      <Private>False</Private>
    209209    </ProjectReference>
    210     <ProjectReference Include="..\..\HeuristicLab.Problems.ExternalEvaluation\3.4\HeuristicLab.Problems.ExternalEvaluation-3.4.csproj">
     210    <ProjectReference Include="..\..\HeuristicLab.Problems.ExternalEvaluation\3.3\HeuristicLab.Problems.ExternalEvaluation-3.3.csproj">
    211211      <Project>{25735db4-8e54-4a2c-83e3-a60c76565e55}</Project>
    212       <Name>HeuristicLab.Problems.ExternalEvaluation-3.4</Name>
     212      <Name>HeuristicLab.Problems.ExternalEvaluation-3.3</Name>
    213213      <Private>False</Private>
    214214    </ProjectReference>
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/LinkageTreeTest.cs

    r11939 r11987  
    2222using System.Linq;
    2323using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
     24using HeuristicLab.Encodings.BinaryVectorEncoding;
    2425using HeuristicLab.Random;
    2526using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    2930  public class LinkageTreeTest {
    3031    private static int Length = 9;
    31     private static bool[][] solutions = new bool[][] {
    32     new bool[] { true, true, false, false, false, false, false, false, false }, // 110000000
    33     new bool[] { false, false, true, true, false, false, false, false, false }, // 001100000
    34     new bool[] { false, false, false, false, true, true, false, false, false }, // 000011000
    35     new bool[] { false, false, false, false, false, false, true, true, true },  // 000000111
    36     new bool[] { true, true, true, true, false, false, false, false, false },   // 111100000
    37     new bool[] { true, true, true, true, true, true, true, true, true },        // 111111111
     32    private static BinaryVector[] solutions = {
     33    new BinaryVector(new [] { true, true, false, false, false, false, false, false, false }), // 110000000
     34    new BinaryVector(new [] { false, false, true, true, false, false, false, false, false }), // 001100000
     35    new BinaryVector(new [] { false, false, false, false, true, true, false, false, false }), // 000011000
     36    new BinaryVector(new [] { false, false, false, false, false, false, true, true, true }),  // 000000111
     37    new BinaryVector(new [] { true, true, true, true, false, false, false, false, false }),   // 111100000
     38    new BinaryVector(new [] { true, true, true, true, true, true, true, true, true }),        // 111111111
    3839    };
    3940
    4041    // These are the clusters that should be built using "solutions" and the seed 123
    41     private static int[][] correctClusters = new int[][] {
     42    private static int[][] correctClusters = {
    4243      new int[] { 4, 5 },
    4344      new int[] { 2, 3 },
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs

    r11983 r11987  
    2222using System;
    2323using System.Threading;
    24 using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
    2524using HeuristicLab.Common;
    26 using HeuristicLab.Problems.BinaryVector;
     25using HeuristicLab.Problems.Binary;
    2726using Microsoft.VisualStudio.TestTools.UnitTesting;
    2827
     
    3231
    3332    // Utility function that sets up and executes the run, then asserts the results
    34     private PrivateObject DoRun(BinaryVectorProblem problem, int maximumEvaluations, int seed, double bestQuality, int foundOn) {
     33    private PrivateObject DoRun(BinaryProblem problem, int maximumEvaluations, int seed, double bestQuality, int foundOn) {
    3534      var solver = new HeuristicLab.Algorithms.ParameterlessPopulationPyramid.ParameterlessPopulationPyramid();
    3635      solver.Problem = problem;
     
    4140      try {
    4241        hidden.Invoke("Run", new CancellationToken());
    43       }
    44       catch (OperationCanceledException) {
     42      } catch (OperationCanceledException) {
    4543        // Ignore
    4644      }
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r11961 r11987  
    254254      <Private>False</Private>
    255255    </Reference>
    256     <Reference Include="HeuristicLab.Problems.BinaryVector-3.3">
     256    <Reference Include="HeuristicLab.Problems.Binary-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    257257      <SpecificVersion>False</SpecificVersion>
    258       <HintPath>..\bin\HeuristicLab.Problems.BinaryVector-3.3.dll</HintPath>
     258      <HintPath>..\bin\HeuristicLab.Problems.Binary-3.3.dll</HintPath>
    259259      <Private>False</Private>
    260260    </Reference>
Note: See TracChangeset for help on using the changeset viewer.