Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/19 15:43:42 (5 years ago)
Author:
abeham
Message:

#2855: merged to stable (16860)

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Optimization

  • stable/HeuristicLab.Optimization/3.3/BasicProblems/BasicProblem.cs

    r17097 r17116  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     28using HeuristicLab.Data;
    2729using HeuristicLab.Parameters;
    28 using HEAL.Attic;
    2930
    3031namespace HeuristicLab.Optimization {
     
    157158      OnOperatorsChanged();
    158159    }
     160
     161    protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IValueParameter param) {
     162      if (param.Value == null) yield break;
     163      if (param.GetsCollected) {
     164        if (param == EncodingParameter) // store only the name of the encoding
     165          yield return new KeyValuePair<string, IItem>(String.Empty, new StringValue(EncodingParameter.Value.Name));
     166        else yield return new KeyValuePair<string, IItem>(String.Empty, param.Value);
     167      }
     168      var parameterizedItem = param.Value as IParameterizedItem;
     169      if (parameterizedItem != null) {
     170        var children = new Dictionary<string, IItem>();
     171        parameterizedItem.CollectParameterValues(children);
     172        foreach (var child in children) yield return child;
     173      }
     174    }
    159175  }
    160176}
  • stable/HeuristicLab.Optimization/3.3/BasicProblems/Encoding.cs

    r17097 r17116  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
    2728using HeuristicLab.Parameters;
    28 using HEAL.Attic;
    2929
    3030namespace HeuristicLab.Optimization {
     
    9292    protected Encoding(string name)
    9393      : base(name) {
    94       Parameters.Add(new FixedValueParameter<ReadOnlyItemSet<IOperator>>(name + ".Operators", "The operators that the encoding specifies.", encodingOperators.AsReadOnly()));
     94      Parameters.Add(new FixedValueParameter<ReadOnlyItemSet<IOperator>>(name + ".Operators", "The operators that the encoding specifies.", encodingOperators.AsReadOnly()) {
     95        GetsCollected = false
     96      });
    9597    }
    9698
Note: See TracChangeset for help on using the changeset viewer.