Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/20/16 14:02:36 (8 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/Problem.cs

    r14054 r14128  
    2626using HeuristicLab.Parameters;
    2727using HeuristicLab.Data;
    28 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
    2928using HeuristicLab.PluginInfrastructure;
    3029using System.Linq;
    3130using System;
    32 using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
    33 using HeuristicLab.Encodings.PackingEncoding.GroupingVector;
    3431using HeuristicLab.Encodings.PackingEncoding;
    3532
     
    9794    }
    9895
    99     protected Problem(IDecodingEvaluator e) : this(e, new MultiComponentVectorRandomCreator()) { }
    100 
    101     protected Problem(IDecodingEvaluator e, IPackingSolutionCreator c) : base(e, c) {
     96    protected Problem(IDecodingEvaluator e) : this(e, new PackingSequenceRandomCreator()) { }
     97
     98    protected Problem(IDecodingEvaluator e, IPackingSolutionCreator c)
     99      : base(e, c) {
    102100      Parameters.Add(new OptionalValueParameter<PackingPlan<D, B, I>>("BestKnownSolution", "The best known solution of this bin-packing instance."));
    103101      Parameters.Add(new ValueParameter<ItemList<I>>("PackingItemMeasures", "Packing-item data defining the measures of the different items that need to be packed.", new ItemList<I>()));
     
    109107      Parameters.Add(new ConstrainedValueParameter<IPackingSolutionDecoder>("PackingSolutionDecoder", "The operator that decodes the representation and creates a packing plan."));
    110108      this.Maximization.Value = true;
    111       InitializeProblemInstance();
     109      InitializeProblemInstance(); // TODO
    112110      InitializeOperators();
    113111      InitializeEventHandlers();
     
    163161        Operators.AddRange(ApplicationManager.Manager.GetInstances<IPackingSequenceOperator>());
    164162        InitializeDecoder();
    165       } else if (SolutionCreator.GetType() == typeof(GroupingVectorRandomCreator)) {
     163      } /* else if (SolutionCreator.GetType() == typeof(GroupingVectorRandomCreator)) {
    166164        Operators.AddRange(ApplicationManager.Manager.GetInstances<IGroupingVectorOperator>());
    167165        InitializeDecoder();
     
    169167        Operators.AddRange(ApplicationManager.Manager.GetInstances<IMultiComponentVectorOperator>());
    170168        InitializeDecoder();
    171       }
     169      } */
    172170    }
    173171    private void ParameterizeOperators() {
     
    193191        PackingPlanEvaluator.PackingPlanParameter.Hidden = false;
    194192      }
     193      /*
    195194
    196195      foreach (var op in Operators.OfType<IPackingSolutionManipulator>()) {
     
    205204        op.ParentsParameter.Hidden = true;
    206205      }
    207 
     206      */
    208207      foreach (var op in Operators.OfType<BestBinPackingSolutionAnalyzer<D, B, I>>()) {
    209208        op.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
Note: See TracChangeset for help on using the changeset viewer.