Ignore:
Timestamp:
07/20/16 14:02:36 (5 years ago)
Author:
gkronber
Message:

#1966: refactoring of bin packing implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceCrossover.cs

    r14046 r14128  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
     25using HeuristicLab.Encodings.PermutationEncoding;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2627using HeuristicLab.Problems.BinPacking;
     
    2930  [Item("PackingSequenceCrossover", "An operator which crosses two PackingSequence representations.")]
    3031  [StorableClass]
    31   public abstract class PackingSequenceCrossover : PackingSolutionCrossover, IPackingSequenceOperator {
     32  public abstract class PackingSequenceCrossover : PackingSolutionCrossover<Permutation>, IPackingSequenceOperator {
    3233
    3334    [StorableConstructor]
     
    3637    public PackingSequenceCrossover()
    3738      : base() {
    38         ParentsParameter.ActualName = "PackingSequence";
    39         ChildParameter.ActualName = "PackingSequence";
     39      ParentsParameter.ActualName = "PackingSequence";
     40      ChildParameter.ActualName = "PackingSequence";
    4041    }
    4142
    42     public abstract PackingSequenceEncoding Cross(IRandom random, PackingSequenceEncoding parent1, PackingSequenceEncoding parent2);
     43    public abstract Permutation Cross(IRandom random, Permutation parent1, Permutation parent2);
    4344
    4445    public override IOperation Apply() {
     
    4647
    4748      ChildParameter.ActualValue =
    48         Cross(RandomParameter.ActualValue, parents[0] as PackingSequenceEncoding, parents[1] as PackingSequenceEncoding);
     49        Cross(RandomParameter.ActualValue, parents[0], parents[1]);
    4950
    5051      return base.Apply();
Note: See TracChangeset for help on using the changeset viewer.