Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/21/10 01:13:49 (13 years ago)
Author:
cneumuel
Message:

#1215

  • added possibility to create all parameter combinations from a ParameterConfigurationTree and generate an experiment from them
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurations/ParameterConfiguration.cs

    r5112 r5144  
    99using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    1010using HeuristicLab.PluginInfrastructure;
     11using System.Text;
    1112
    1213namespace HeuristicLab.Problems.MetaOptimization {
     
    299300    }
    300301
     302    public string ToParameterInfoString() {
     303      StringBuilder sb = new StringBuilder();
     304      if (this.Optimize) {
     305        sb.Append(string.Format("{0}: {1}", parameterName, this.ActualValue.Value));
     306        //sb.Append(" (");
     307        //var subParams = new List<string>();
     308        //if (this.ActualValue.Value is IParameterizedItem) {
     309        //  subParams.Add(this.ValueConfigurations.CheckedItems.ElementAt(actualValueConfigurationIndex).ToParameterInfoString());
     310        //}
     311        //sb.Append(string.Join(", ", subParams.ToArray()));
     312        //sb.Append(")");
     313      }
     314      return sb.ToString();
     315    }
     316
    301317    public static IParameterConfiguration Create(IParameterizedNamedItem parent, IParameter parameter) {
    302318      if (parameter is IValueParameter) {
     
    348364      }
    349365    }
     366
     367    public void UpdateActualValueIndexToItem(IValueConfiguration vc) {
     368      for (int i = 0; i < this.ValueConfigurations.CheckedItems.Count(); i++) {
     369        if (this.ValueConfigurations.CheckedItems.ElementAt(i) == vc) {
     370          this.actualValueConfigurationIndex = i;
     371          return;
     372        }
     373      }
     374    }
     375
    350376  }
    351377}
Note: See TracChangeset for help on using the changeset viewer.