Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17570


Ignore:
Timestamp:
05/28/20 16:26:46 (4 years ago)
Author:
abeham
Message:

#2521: adapted knapsack, added base call to symbolic expression tree encoding, changed parameterization operators in base classes

Location:
branches/2521_ProblemRefactoring
Files:
1 deleted
14 edited

Legend:

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

    r17567 r17570  
    3838    public int Dimension {
    3939      get { return DimensionRefParameter.Value.Value; }
     40      protected set { DimensionRefParameter.Value.Value = value; }
    4041    }
    4142
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorProblem.cs

    r17567 r17570  
    3939    public int Dimension {
    4040      get { return DimensionRefParameter.Value.Value; }
     41      protected set { DimensionRefParameter.Value.Value = value; }
    4142    }
    4243
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeEncoding.cs

    r17226 r17570  
    284284
    285285    public override void ConfigureOperators(IEnumerable<IItem> operators) {
     286      base.ConfigureOperators(operators);
    286287      ConfigureTreeOperators(operators.OfType<ISymbolicExpressionTreeOperator>());
    287288      ConfigureSizeConstraintOperators(operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>());
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Encoding.cs

    r17567 r17570  
    118118    public virtual void ConfigureOperators(IEnumerable<IItem> operators) {
    119119      ConfigureSingleObjectiveImprovementOperators(operators.OfType<ISingleObjectiveImprovementOperator>());
     120      ConfigureSingleObjectivePathRelinker(operators.OfType<ISingleObjectivePathRelinker>());
    120121    }
    121122
     
    123124      foreach (var op in operators) {
    124125        op.SolutionParameter.ActualName = Name;
     126        op.SolutionParameter.Hidden = true;
     127      }
     128    }
     129
     130    protected virtual void ConfigureSingleObjectivePathRelinker(IEnumerable<ISingleObjectivePathRelinker> operators) {
     131      foreach (var op in operators.OfType<ISingleObjectivePathRelinker>()) {
     132        op.ParentsParameter.ActualName = Name;
     133        op.ParentsParameter.Hidden = true;
    125134      }
    126135    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Problem.cs

    r17513 r17570  
    138138
    139139    private void RegisterEvents() {
    140       EncodingParameter.ValueChanged += (o, e) => OnEncodingChanged();
    141       EvaluatorParameter.ValueChanged += (o, e) => OnEvaluatorChanged();
     140      EncodingParameter.ValueChanged += (o, e) => { ParameterizeOperators(); OnEncodingChanged(); };
     141      EvaluatorParameter.ValueChanged += (o, e) => { ParameterizeOperators(); OnEvaluatorChanged(); };
    142142      //var multiEncoding = Encoding as MultiEncoding;
    143143      //if (multiEncoding != null) multiEncoding.EncodingsChanged += MultiEncodingOnEncodingsChanged;
    144144    }
    145145
     146    protected override void ParameterizeOperators() {
     147      base.ParameterizeOperators();
     148      Parameterize();
     149    }
     150
    146151    protected virtual void OnEncodingChanged() {
    147       Parameterize();
    148 
    149152      OnOperatorsChanged();
    150153      OnReset();
     
    163166        op.EncodingParameter.ActualName = EncodingParameter.Name;
    164167
     168      Encoding.ConfigureOperators(Operators);
    165169      //var multiEncoding = Encoding as MultiEncoding;
    166170      //if (multiEncoding != null) multiEncoding.EncodingsChanged += MultiEncodingOnEncodingsChanged;
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveProblem.cs

    r17567 r17570  
    7272      BestKnownQualityParameter = cloner.Clone(original.BestKnownQualityParameter);
    7373      MaximizationParameter = cloner.Clone(original.MaximizationParameter);
    74       ParameterizeOperators();
     74      Parameterize();
    7575      RegisterEventHandlers();
    7676    }
     
    9090      Operators.Add(new SingleObjectiveMoveMaker<TEncodedSolution>());
    9191
    92       ParameterizeOperators();
     92      Parameterize();
    9393      RegisterEventHandlers();
    9494    }
     
    105105      Operators.Add(new SingleObjectiveMoveMaker<TEncodedSolution>());
    106106
    107       ParameterizeOperators();
     107      Parameterize();
    108108      RegisterEventHandlers();
    109109    }
     
    111111    [StorableHook(HookType.AfterDeserialization)]
    112112    private void AfterDeserialization() {
    113       ParameterizeOperators();
     113      Parameterize();
    114114      RegisterEventHandlers();
    115115    }
     
    190190    protected override void OnEvaluatorChanged() {
    191191      base.OnEvaluatorChanged();
     192      Evaluator.QualityParameter.ActualNameChanged += QualityParameterOnActualNameChanged;
     193    }
     194
     195    protected virtual void QualityParameterOnActualNameChanged(object sender, EventArgs e) {
    192196      ParameterizeOperators();
    193197    }
    194198
    195     private void ParameterizeOperators() {
     199    protected override void ParameterizeOperators() {
     200      base.ParameterizeOperators();
     201      Parameterize();
     202    }
     203
     204    private void Parameterize() {
    196205      foreach (var op in Operators.OfType<ISingleObjectiveEvaluationOperator<TEncodedSolution>>())
    197206        op.Evaluate = Evaluate;
     
    200209      foreach (var op in Operators.OfType<INeighborBasedOperator<TEncodedSolution>>())
    201210        op.GetNeighbors = GetNeighbors;
     211      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
     212        op.SolutionVariableName = Encoding.Name;
     213        op.QualityVariableName = Evaluator.QualityParameter.ActualName;
     214      }
    202215    }
    203216
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/Problems/Problem.cs

    r17513 r17570  
    157157
    158158
     159    protected virtual void ParameterizeOperators() {
     160
     161    }
     162
    159163
    160164    #region events
    161165    private void Operators_Changed(object sender, EventArgs e) {
    162166      OnOperatorsChanged();
     167      ParameterizeOperators();
    163168    }
    164169    public event EventHandler OperatorsChanged;
  • branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs

    r17567 r17570  
    4545      get { return this.value; }
    4646      set {
    47         if (ReadOnly) throw new InvalidOperationException("Cannot set the value of a readonly parameter.");
    4847        DoSetValue(value);
    4948      }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Binary/3.3/DeceptiveTrapProblem.cs

    r17567 r17570  
    3939    [Storable] public IFixedValueParameter<IntValue> TrapSizeParameter { get; private set; }
    4040    [Storable] public IFixedValueParameter<IntValue> NumberOfTrapsParameter { get; private set; }
    41 
    42     public new int Dimension {
    43       get { return base.Dimension; }
    44       set { DimensionRefParameter.Value.Value = value; }
    45     }
    46 
     41   
    4742    public int TrapSize {
    4843      get { return TrapSizeParameter.Value.Value; }
     
    6358      Parameters.Add(TrapSizeParameter = new FixedValueParameter<IntValue>("Trap Size", "", new IntValue(7)));
    6459      Parameters.Add(NumberOfTrapsParameter = new FixedValueParameter<IntValue>("Number of Traps", "", new IntValue(7)));
    65       DimensionRefParameter.Value = new IntValue(TrapSize * NumberOfTraps);
     60      DimensionRefParameter.ReadOnly = true;
     61      Dimension = TrapSize * NumberOfTraps;
    6662
    6763      RegisterEventHandlers();
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Binary/3.3/HIFFProblem.cs

    r17567 r17570  
    3838    public new int Dimension {
    3939      get { return base.Dimension; }
    40       set { DimensionRefParameter.Value.Value = value; }
     40      set { base.Dimension = value; }
    4141    }
    4242
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Binary/3.3/OneMaxProblem.cs

    r17567 r17570  
    3636    public new int Dimension {
    3737      get { return base.Dimension; }
    38       set { DimensionRefParameter.Value.Value = value; }
     38      set { base.Dimension = value; }
    3939    }
    4040
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/ExternalEvaluationProblemInstances.cs

    r17567 r17570  
    4545
    4646    public int Dimension {
    47       get => Encoding.Length;
    48       set => Encoding.Length = value;
     47      get => DimensionRefParameter.Value.Value;
     48      set => DimensionRefParameter.Value.Value = value;
    4949    }
    5050
     
    5959      : base(new BinaryVectorEncoding()) {
    6060      Parameters.Add(DimensionRefParameter = new ReferenceParameter<IntValue>("Dimension", "The dimension of the vector.", Encoding.LengthParameter));
    61       DimensionRefParameter.Value = new IntValue(Dimension, @readonly: false);
    6261      // TODO: Add and parameterize additional operators,
    6362    }
     
    263262
    264263    public int Dimension {
    265       get => Encoding.Length;
    266       set => Encoding.Length = value;
     264      get => DimensionRefParameter.Value.Value;
     265      set => DimensionRefParameter.Value.Value = value;
    267266    }
    268267
     
    277276      : base(new BinaryVectorEncoding()) {
    278277      Parameters.Add(DimensionRefParameter = new ReferenceParameter<IntValue>("Dimension", "The dimension of the vector.", Encoding.LengthParameter));
    279       DimensionRefParameter.Value = new IntValue(Dimension, @readonly: false);
    280278      // TODO: Add and parameterize additional operators,
    281279    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj

    r16723 r17570  
    126126    <Compile Include="Plugin.cs" />
    127127    <Compile Include="Properties\AssemblyInfo.cs" />
    128     <Compile Include="Analyzers\BestKnapsackSolutionAnalyzer.cs" />
    129128    <Compile Include="SimilarityCalculators\KnapsackSimilarityCalculator.cs" />
    130129  </ItemGroup>
     
    223222    </Reference>
    224223  </ItemGroup>
     224  <ItemGroup />
    225225  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    226226  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs

    r17567 r17570  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Linq;
    2524using System.Threading;
     
    4140
    4241    #region Parameter Properties
    43     public ValueParameter<IntValue> KnapsackCapacityParameter {
    44       get { return (ValueParameter<IntValue>)Parameters["KnapsackCapacity"]; }
    45     }
    46     public ValueParameter<IntArray> WeightsParameter {
    47       get { return (ValueParameter<IntArray>)Parameters["Weights"]; }
    48     }
    49     public ValueParameter<IntArray> ValuesParameter {
    50       get { return (ValueParameter<IntArray>)Parameters["Values"]; }
    51     }
    52     public OptionalValueParameter<BinaryVector> BestKnownSolutionParameter {
    53       get { return (OptionalValueParameter<BinaryVector>)Parameters["BestKnownSolution"]; }
    54     }
     42    [Storable] public ValueParameter<IntValue> KnapsackCapacityParameter { get; private set; }
     43    [Storable] public ValueParameter<IntArray> WeightsParameter { get; private set; }
     44    [Storable] public ValueParameter<IntArray> ValuesParameter { get; private set; }
     45    [Storable] public OptionalValueParameter<BinaryVector> BestKnownSolutionParameter { get; private set; }
    5546    #endregion
    5647
    5748    #region Properties
    58     public new int Dimension {
    59       get { return base.Dimension; }
    60       set { DimensionRefParameter.Value.Value = value; }
    61     }
    6249    public int KnapsackCapacity {
    6350      get { return KnapsackCapacityParameter.Value.Value; }
     
    7562      get { return BestKnownSolutionParameter.Value; }
    7663      set { BestKnownSolutionParameter.Value = value; }
    77     }
    78     private BestKnapsackSolutionAnalyzer BestKnapsackSolutionAnalyzer {
    79       get { return Operators.OfType<BestKnapsackSolutionAnalyzer>().FirstOrDefault(); }
    8064    }
    8165    #endregion
     
    8569    private KnapsackProblem(KnapsackProblem original, Cloner cloner)
    8670      : base(original, cloner) {
     71      KnapsackCapacityParameter = cloner.Clone(original.KnapsackCapacityParameter);
     72      WeightsParameter = cloner.Clone(original.WeightsParameter);
     73      ValuesParameter = cloner.Clone(original.ValuesParameter);
     74      BestKnownSolutionParameter = cloner.Clone(original.BestKnownSolutionParameter);
    8775      RegisterEventHandlers();
    8876    }
    8977    public KnapsackProblem()
    9078      : base(new BinaryVectorEncoding("Selection")) {
     79      DimensionRefParameter.ReadOnly = true;
    9180      Maximization = true;
    92       Parameters.Add(new ValueParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack.", new IntValue(1)));
    93       Parameters.Add(new ValueParameter<IntArray>("Weights", "The weights of the items.", new IntArray(5)));
    94       Parameters.Add(new ValueParameter<IntArray>("Values", "The values of the items.", new IntArray(5)));
    95       Parameters.Add(new OptionalValueParameter<BinaryVector>("BestKnownSolution", "The best known solution of this Knapsack instance."));
    96 
    97       DimensionRefParameter.Value = new IntValue(Weights.Length, @readonly: true);
     81      Parameters.Add(KnapsackCapacityParameter = new ValueParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack.", new IntValue(1)));
     82      Parameters.Add(WeightsParameter = new ValueParameter<IntArray>("Weights", "The weights of the items.", new IntArray(5)));
     83      Parameters.Add(ValuesParameter = new ValueParameter<IntArray>("Values", "The values of the items.", new IntArray(5)));
     84      Parameters.Add(BestKnownSolutionParameter = new OptionalValueParameter<BinaryVector>("BestKnownSolution", "The best known solution of this Knapsack instance."));
     85      Dimension = Weights.Length;
     86
    9887      InitializeRandomKnapsackInstance();
    9988
     
    114103    }
    115104
     105    public override void Analyze(BinaryVector[] solutions, double[] qualities, ResultCollection results, IRandom random) {
     106      base.Analyze(solutions, qualities, results, random);
     107
     108      var best = GetBestSolution(solutions, qualities);
     109
     110      if (double.IsNaN(BestKnownQuality) || IsBetter(best.Item2, BestKnownQuality)) {
     111        BestKnownQuality = best.Item2;
     112        BestKnownSolution = (BinaryVector)best.Item1.Clone();
     113      }
     114
     115      IResult result;
     116      if (!results.TryGetValue("Best Knapsack Solution", out result)) {
     117        results.Add(result = new Result("Best Knapsack Solution", typeof(KnapsackSolution)));
     118      }
     119      var solution = (KnapsackSolution)result.Value;
     120      if (solution == null) {
     121        solution = new KnapsackSolution((BinaryVector)best.Item1.Clone(), new DoubleValue(best.Item2),
     122          KnapsackCapacityParameter.Value, WeightsParameter.Value, ValuesParameter.Value);
     123        result.Value = solution;
     124      } else {
     125        if (IsBetter(best.Item2, solution.Quality.Value)) {
     126          solution.BinaryVector = (BinaryVector)best.Item1.Clone();
     127          solution.Quality = new DoubleValue(best.Item2);
     128          solution.Capacity = KnapsackCapacityParameter.Value;
     129          solution.Weights = WeightsParameter.Value;
     130          solution.Values = ValuesParameter.Value;
     131        }
     132      }
     133    }
     134
    116135    public override IDeepCloneable Clone(Cloner cloner) {
    117136      return new KnapsackProblem(this, cloner);
     
    124143
    125144    private void RegisterEventHandlers() {
    126       Evaluator.QualityParameter.ActualNameChanged += Evaluator_QualityParameter_ActualNameChanged;
    127       KnapsackCapacityParameter.ValueChanged += KnapsackCapacityParameter_ValueChanged;
    128145      WeightsParameter.ValueChanged += WeightsParameter_ValueChanged;
    129       WeightsParameter.Value.Reset += WeightsValue_Reset;
     146      WeightsParameter.Value.Reset += (_, __) => SyncValuesToWeights();
    130147      ValuesParameter.ValueChanged += ValuesParameter_ValueChanged;
    131       ValuesParameter.Value.Reset += ValuesValue_Reset;
     148      ValuesParameter.Value.Reset += (_, __) => SyncWeightsToValues();
    132149    }
    133150
    134151    #region Events
    135     protected override void OnEncodingChanged() {
    136       base.OnEncodingChanged();
    137       Parameterize();
    138     }
    139     //TODO check with abeham if this is really necessary
    140     //protected override void OnSolutionCreatorChanged() {
    141     //  base.OnSolutionCreatorChanged();
    142     //  Parameterize();
    143     //}
    144     protected override void OnEvaluatorChanged() {
    145       base.OnEvaluatorChanged();
    146       Evaluator.QualityParameter.ActualNameChanged += Evaluator_QualityParameter_ActualNameChanged;
    147       Parameterize();
    148     }
    149152    protected override void DimensionOnChanged() {
    150153      base.DimensionOnChanged();
     
    155158        ((IStringConvertibleArray)ValuesParameter.Value).Length = Dimension;
    156159      }
    157       Parameterize();
    158     }
    159     private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
    160       Parameterize();
    161     }
    162     private void KnapsackCapacityParameter_ValueChanged(object sender, EventArgs e) {
    163       Parameterize();
    164160    }
    165161    private void WeightsParameter_ValueChanged(object sender, EventArgs e) {
    166       Parameterize();
    167       WeightsParameter.Value.Reset += WeightsValue_Reset;
    168     }
    169     private void WeightsValue_Reset(object sender, EventArgs e) {
     162      WeightsParameter.Value.Reset += (_, __) => SyncValuesToWeights();
     163      SyncValuesToWeights();
     164    }
     165    private void ValuesParameter_ValueChanged(object sender, EventArgs e) {
     166      ValuesParameter.Value.Reset += (_, __) => SyncWeightsToValues();
     167      SyncWeightsToValues();
     168    }
     169    private void SyncWeightsToValues() {
     170      if (WeightsParameter.Value != null && ValuesParameter.Value != null) {
     171        ((IStringConvertibleArray)WeightsParameter.Value).Length = Values.Length;
     172        Dimension = Values.Length;
     173      }
     174    }
     175    private void SyncValuesToWeights() {
    170176      if (WeightsParameter.Value != null && ValuesParameter.Value != null) {
    171177        ((IStringConvertibleArray)ValuesParameter.Value).Length = Weights.Length;
    172178        Dimension = Weights.Length;
    173179      }
    174       Parameterize();
    175     }
    176     private void ValuesParameter_ValueChanged(object sender, EventArgs e) {
    177       Parameterize();
    178       ValuesParameter.Value.Reset += ValuesValue_Reset;
    179     }
    180     private void ValuesValue_Reset(object sender, EventArgs e) {
    181       if (WeightsParameter.Value != null && ValuesParameter.Value != null) {
    182         ((IStringConvertibleArray)WeightsParameter.Value).Length = Values.Length;
    183         Dimension = Values.Length;
    184       }
    185       Parameterize();
    186180    }
    187181    #endregion
     
    189183    #region Helpers
    190184    private void InitializeOperators() {
    191       Operators.Add(new KnapsackImprovementOperator());
    192       Operators.Add(new KnapsackPathRelinker());
    193       Operators.Add(new KnapsackSimultaneousPathRelinker());
    194       Operators.Add(new QualitySimilarityCalculator());
    195       Operators.Add(new NoSimilarityCalculator());
    196 
    197       Operators.Add(new BestKnapsackSolutionAnalyzer());
     185      Operators.AddRange(new IItem[] { new KnapsackImprovementOperator(),
     186      new KnapsackPathRelinker(), new KnapsackSimultaneousPathRelinker(),
     187      new QualitySimilarityCalculator(), new NoSimilarityCalculator(),
     188      new KnapsackOneBitflipMoveEvaluator()});
    198189      Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
    199190
    200       Operators.Add(new KnapsackOneBitflipMoveEvaluator());
     191      ParameterizeOperators();
     192    }
     193
     194    protected override void ParameterizeOperators() {
     195      base.ParameterizeOperators();
    201196      Parameterize();
    202197    }
     198
    203199    private void Parameterize() {
    204       var operators = new List<IItem>();
    205 
    206       if (BestKnapsackSolutionAnalyzer != null) {
    207         operators.Add(BestKnapsackSolutionAnalyzer);
    208         BestKnapsackSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    209         BestKnapsackSolutionAnalyzer.MaximizationParameter.Hidden = true;
    210         BestKnapsackSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
    211         BestKnapsackSolutionAnalyzer.BestKnownQualityParameter.Hidden = true;
    212         BestKnapsackSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    213         BestKnapsackSolutionAnalyzer.BestKnownSolutionParameter.Hidden = true;
    214         BestKnapsackSolutionAnalyzer.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
    215         BestKnapsackSolutionAnalyzer.KnapsackCapacityParameter.Hidden = true;
    216         BestKnapsackSolutionAnalyzer.WeightsParameter.ActualName = WeightsParameter.Name;
    217         BestKnapsackSolutionAnalyzer.WeightsParameter.Hidden = true;
    218         BestKnapsackSolutionAnalyzer.ValuesParameter.ActualName = ValuesParameter.Name;
    219         BestKnapsackSolutionAnalyzer.ValuesParameter.Hidden = true;
    220       }
    221200      foreach (var op in Operators.OfType<IKnapsackMoveEvaluator>()) {
    222         operators.Add(op);
    223201        op.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
    224202        op.KnapsackCapacityParameter.Hidden = true;
     
    227205        op.ValuesParameter.ActualName = ValuesParameter.Name;
    228206        op.ValuesParameter.Hidden = true;
    229 
    230         var bitflipMoveEval = op as IKnapsackOneBitflipMoveEvaluator;
    231         if (bitflipMoveEval != null) {
    232           foreach (var moveOp in Encoding.Operators.OfType<IOneBitflipMoveQualityOperator>()) {
    233             moveOp.MoveQualityParameter.ActualName = bitflipMoveEval.MoveQualityParameter.ActualName;
    234             moveOp.MoveQualityParameter.Hidden = true;
    235           }
    236         }
    237       }
    238       foreach (var op in Operators.OfType<ISingleObjectiveImprovementOperator>()) {
    239         operators.Add(op);
    240         op.SolutionParameter.ActualName = Encoding.Name;
    241         op.SolutionParameter.Hidden = true;
    242       }
    243       foreach (var op in Operators.OfType<ISingleObjectivePathRelinker>()) {
    244         operators.Add(op);
    245         op.ParentsParameter.ActualName = Encoding.Name;
    246         op.ParentsParameter.Hidden = true;
    247       }
    248       foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
    249         operators.Add(op);
    250         op.SolutionVariableName = Encoding.Name;
    251         op.QualityVariableName = Evaluator.QualityParameter.ActualName;
    252       }
    253 
    254       if (operators.Count > 0) Encoding.ConfigureOperators(Operators);
     207      }
    255208    }
    256209    #endregion
Note: See TracChangeset for help on using the changeset viewer.