Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/23/20 16:21:55 (4 years ago)
Author:
abeham
Message:

#2521:

  • Moving solution creator parameter from problems to algorithms (breaking wiring in some HeuristicOptimizationProblems)
  • Disallowing evaluator or encoding changes in encoding-specific base problems (to avoid confusion in derived problems whether this needs to be handled or not)
  • Added private set to ReferenceParameter property (serialization)
File:
1 edited

Legend:

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

    r17620 r17695  
    2020#endregion
    2121
     22using System;
    2223using System.Linq;
    2324using HEAL.Attic;
     
    5758    protected BinaryVectorMultiObjectiveProblem(BinaryVectorEncoding encoding) : base(encoding) {
    5859      EncodingParameter.ReadOnly = true;
     60      EvaluatorParameter.ReadOnly = true;
    5961      Parameters.Add(BestResultParameter = new ResultParameter<ParetoFrontScatterPlot<BinaryVector>>("Best Pareto Front", "The best Pareto front found."));
    6062      Parameters.Add(DimensionRefParameter = new ReferenceParameter<IntValue>("Dimension", "The dimension of the binary vector problem.", Encoding.LengthParameter));
     
    7476
    7577      BestResultParameter.ActualValue = plot;
     78    }
     79
     80    protected override sealed void OnEvaluatorChanged() {
     81      throw new InvalidOperationException("Evaluator may not change!");
     82    }
     83
     84    protected override sealed void OnEncodingChanged() {
     85      throw new InvalidOperationException("Encoding may not change!");
    7686    }
    7787
Note: See TracChangeset for help on using the changeset viewer.