Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/30/10 22:50:59 (14 years ago)
Author:
cneumuel
Message:

#1215

  • enhanced combinations generator (now with batchruns!)
  • fixed ActualNames for metaopt-alg
  • added penalty for invalid solution-candidates (algs which throw exceptions)
  • migrated to .NET 4.0
File:
1 edited

Legend:

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

    r5144 r5184  
    300300    }
    301301
    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();
     302    public string ParameterInfoString {
     303      get {
     304        StringBuilder sb = new StringBuilder();
     305        if (this.Optimize) {
     306          sb.Append(string.Format("{0}: {1}", parameterName, this.ActualValue.Value != null ? this.ActualValue.Value.ToString() : "null"));
     307
     308          if (this.ActualValue.Value is IParameterizedItem) {
     309            string subParams = this.ValueConfigurations.CheckedItems.ElementAt(actualValueConfigurationIndex).ParameterInfoString;
     310            if (!string.IsNullOrEmpty(subParams)) {
     311              sb.Append(" (");
     312              sb.Append(subParams);
     313              sb.Append(")");
     314            }
     315          }
     316        }
     317        return sb.ToString();
     318      }
    315319    }
    316320
Note: See TracChangeset for help on using the changeset viewer.