Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/21/16 15:08:21 (8 years ago)
Author:
gkronber
Message:

#1966: refactoring

Location:
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PermutationEncoding
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PermutationEncoding/PermutationProblem.cs

    r14153 r14154  
    2323
    2424using System.Linq;
     25using System.Windows.Forms;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    7273      Encoding.ConfigureOperators(Operators.OfType<IOperator>());
    7374
    74       // TODO: configure the move evaluators (add interface for my move evaluators)
     75      foreach (var op in Operators.OfType<IOperator<Permutation>>()) {
     76        op.BinShapeParameter.ActualName = BinShapeParameter.Name;
     77        op.ItemsParameter.ActualName = ItemsParameter.Name;
     78        op.SolutionEvaluatorParameter.ActualName = SolutionEvaluatorParameter.Name;
     79        op.DecoderParameter.ActualName = DecoderParameter.Name;
     80      }
    7581    }
    7682
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PermutationEncoding/Swap2MoveEvaluator.cs

    r14149 r14154  
    5050      // uses full evaluation
    5151      Swap2Manipulator.Apply(permutation, move.Index1, move.Index2);
    52       var solution = PackingSolutionDecoderParameter.ActualValue.Decode(permutation, binShape, items);
     52      var solution = DecoderParameter.ActualValue.Decode(permutation, binShape, items);
    5353
    54       return PackingPlanEvaluatorParameter.ActualValue.Evaluate(solution);
     54      return SolutionEvaluatorParameter.ActualValue.Evaluate(solution);
    5555    }
    5656  }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PermutationEncoding/TranslocationMoveEvaluator.cs

    r14149 r14154  
    5151      // uses full evaluation
    5252      TranslocationManipulator.Apply(permutation, move.Index1, move.Index2, move.Index3);
    53       var solution = PackingSolutionDecoderParameter.ActualValue.Decode(permutation, binShape, items);
     53      var solution = DecoderParameter.ActualValue.Decode(permutation, binShape, items);
    5454
    55       return PackingPlanEvaluatorParameter.ActualValue.Evaluate(solution);
     55      return SolutionEvaluatorParameter.ActualValue.Evaluate(solution);
    5656    }
    5757  }
Note: See TracChangeset for help on using the changeset viewer.