Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/20 13:53:11 (4 years ago)
Author:
mkommend
Message:

#2971: Added first draft of results implementation and problem adaptation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationProblem.cs

    r17695 r17745  
    6969      Parameters.Add(DimensionRefParameter = new ReferenceParameter<IntValue>("Dimension", "The dimension of the permutation problem.", Encoding.LengthParameter));
    7070      Parameters.Add(PermutationTypeRefParameter = new ReferenceParameter<EnumValue<PermutationTypes>>("Type", "The type of the permutation.", Encoding.PermutationTypeParameter));
    71      
     71
    7272      Operators.Add(new HammingSimilarityCalculator());
    7373      // TODO: These should be added in the SingleObjectiveProblem base class (if they were accessible from there)
     
    7979    }
    8080
    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());
    8587    }
    8688
Note: See TracChangeset for help on using the changeset viewer.