Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/20 17:09:10 (4 years ago)
Author:
abeham
Message:

#2521: worked on refactoring

  • add results to problem base classes
  • fix external evaluation problem
  • Add result descriptions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorProblem.cs

    r17745 r17747  
    3737    [Storable] public IResult<ISingleObjectiveSolutionContext<BinaryVector>> BestSolutionResult { get; private set; }
    3838
    39     private ISingleObjectiveSolutionContext<BinaryVector> BestSolution {
    40       get => BestSolutionResult.Value;
    41       set => BestSolutionResult.Value = value;
    42     }
    43 
    4439    public int Dimension {
    4540      get { return DimensionRefParameter.Value.Value; }
    4641      protected set { DimensionRefParameter.Value.Value = value; }
     42    }
     43
     44    protected ISingleObjectiveSolutionContext<BinaryVector> BestSolution {
     45      get => BestSolutionResult.Value;
     46      set => BestSolutionResult.Value = value;
    4747    }
    4848
     
    6666      EvaluatorParameter.ReadOnly = true;
    6767      Parameters.Add(DimensionRefParameter = new ReferenceParameter<IntValue>("Dimension", "The dimension of the binary vector problem.", Encoding.LengthParameter));
    68       Results.Add(BestSolutionResult = new Result<ISingleObjectiveSolutionContext<BinaryVector>>("Best Solution"));
     68      Results.Add(BestSolutionResult = new Result<ISingleObjectiveSolutionContext<BinaryVector>>("Best Solution", "The best solution found so far."));
    6969
    7070      Operators.Add(new HammingSimilarityCalculator());
Note: See TracChangeset for help on using the changeset viewer.