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/Encoding.cs

    r14064 r14128  
    66using HeuristicLab.Common;
    77using HeuristicLab.Core;
     8using HeuristicLab.Encodings.PermutationEncoding;
    89using HeuristicLab.Optimization;
    910using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    1314namespace HeuristicLab.Encodings.PackingEncoding.PackingSequence {
    1415  [StorableClass]
    15   internal class Encoding : HeuristicLab.Optimization.Encoding<PackingSolutionCreator> {
     16  public class Encoding : HeuristicLab.Optimization.Encoding<IPackingSolutionCreator> {
    1617    [StorableConstructor]
    1718    private Encoding(bool deserializing) : base(deserializing) { }
    18     public Encoding() : base("PackingSequence") {
     19    public Encoding()
     20      : base("PackingSequence") {
    1921      SolutionCreator = new PackingSequenceRandomCreator();
    2022      RegisterParameterEvents();
     
    6466
    6567  public static class IndividualExtensionMethods {
    66     public static PackingSequence PackingSequence(this Individual individual) {
     68    public static Permutation PackingSequence(this Individual individual) {
    6769      var encoding = individual.GetEncoding<Encoding>();
    6870      return individual.PackingSequence(encoding.Name);
    6971    }
    7072
    71     public static PackingSequence PackingSequence(this Individual individual, string name) {
    72       return (PackingSequence)individual[name];
     73    public static Permutation PackingSequence(this Individual individual, string name) {
     74      return (Permutation)individual[name];
    7375    }
    7476  }
Note: See TracChangeset for help on using the changeset viewer.