- Timestamp:
- 09/15/20 13:53:11 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationProblem.cs
r17695 r17745 69 69 Parameters.Add(DimensionRefParameter = new ReferenceParameter<IntValue>("Dimension", "The dimension of the permutation problem.", Encoding.LengthParameter)); 70 70 Parameters.Add(PermutationTypeRefParameter = new ReferenceParameter<EnumValue<PermutationTypes>>("Type", "The type of the permutation.", Encoding.PermutationTypeParameter)); 71 71 72 72 Operators.Add(new HammingSimilarityCalculator()); 73 73 // TODO: These should be added in the SingleObjectiveProblem base class (if they were accessible from there) … … 79 79 } 80 80 81 public override void Analyze(Permutation[] permutations, double[] qualities, ResultCollection results, IRandom random) { 82 base.Analyze(permutations, qualities, results, random); 83 var best = GetBestSolution(permutations, qualities); 84 results.AddOrUpdateResult("Best Solution", (IItem)best.Item1.Clone()); 81 public override void Analyze(ISingleObjectiveSolutionContext<Permutation>[] solutionContexts, IRandom random) { 82 base.Analyze(solutionContexts, random); 83 84 //TODO reimplement code below using results directly solutionContexts 85 //var best = GetBestSolution(permutations, qualities); 86 //results.AddOrUpdateResult("Best Solution", (IItem)best.Item1.Clone()); 85 87 } 86 88
Note: See TracChangeset
for help on using the changeset viewer.