Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/11 10:25:48 (14 years ago)
Author:
cneumuel
Message:

#1215

  • implemented best solution history analyzer
  • implemented quality analyzer for each base-level problem
Location:
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Analyzers/BestParameterConfigurationAnalyzer.cs

    r5359 r5576  
    9797      RunCollection rc = new RunCollection();
    9898      foreach (ParameterConfigurationTree pt in parameterTrees.OrderBy(x => x.AverageQualityNormalized)) { // todo: respect Maximization:true/false
    99         IRun run = new Run();
    100         run.Name = string.Format("Individual {0} ({1})", i, pt.ParameterInfoString);
    101         pt.CollectResultValues(run.Results);
    102         pt.CollectParameterValues(run.Parameters);
    103         MetaOptimizationUtil.ClearParameters(run, pt.GetOptimizedParameterNames());
    104         rc.Add(run);
     99        rc.Add(pt.ToRun(string.Format("Individual {0} ({1})", i, pt.ParameterInfoString)));
    105100        i++;
    106101      }
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurationTree.cs

    r5359 r5576  
    240240      return this.Name;
    241241    }
     242
     243    public IRun ToRun() {
     244      return ToRun(this.ParameterInfoString);
     245    }
     246
     247    public IRun ToRun(string name) {
     248      IRun run = new Run();
     249      run.Name = name;
     250      this.CollectResultValues(run.Results);
     251      this.CollectParameterValues(run.Parameters);
     252      MetaOptimizationUtil.ClearParameters(run, this.GetOptimizedParameterNames());
     253      return run;
     254    }
    242255  }
    243256}
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/Range.cs

    r5522 r5576  
    5353        if (stepSize != value) {
    5454          if (stepSize != null) {
    55             stepSize.ValueChanged -= new EventHandler(upperBound_ToStringChanged);
     55            stepSize.ValueChanged -= new EventHandler(stepSize_ToStringChanged);
    5656          }
    5757          stepSize = value;
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/HeuristicLab.Problems.MetaOptimization-3.3.csproj

    r5522 r5576  
    139139  <ItemGroup>
    140140    <Compile Include="Analyzers\BestParameterConfigurationAnalyzer.cs" />
     141    <Compile Include="Analyzers\PMOBestSolutionHistoryAnalyzer.cs" />
     142    <Compile Include="Analyzers\PMOProblemQualitiesAnalyzer.cs" />
    141143    <Compile Include="Analyzers\PMOPopulationDiversityAnalyzer.cs" />
    142144    <Compile Include="ConstrainedTypeValue.cs" />
    143145    <Compile Include="MetaOptimizationUtil.cs" />
     146    <Compile Include="Operators\Crossovers\MultiIntValueCrossover.cs" />
    144147    <Compile Include="TypeValue.cs" />
    145148    <None Include="Properties\AssemblyInfo.cs.frame" />
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/MetaOptimizationProblem.cs

    r5522 r5576  
    109109    private PMOPopulationDiversityAnalyzer PMOPopulationDiversityAnalyzer {
    110110      get { return Operators.OfType<PMOPopulationDiversityAnalyzer>().FirstOrDefault(); }
    111     }   
     111    }
     112    private PMOProblemQualitiesAnalyzer PMOProblemQualitiesAnalyzer {
     113      get { return Operators.OfType<PMOProblemQualitiesAnalyzer>().FirstOrDefault(); }
     114    }
     115    private PMOBestSolutionHistoryAnalyzer PMOBestSolutionHistoryAnalyzer {
     116      get { return Operators.OfType<PMOBestSolutionHistoryAnalyzer>().FirstOrDefault(); }
     117    }
    112118    #endregion
    113119
     
    174180      Operators.Add(new SolutionCacheAnalyzer());
    175181      Operators.Add(new PMOPopulationDiversityAnalyzer());
     182      Operators.Add(new PMOProblemQualitiesAnalyzer());
     183      Operators.Add(new PMOBestSolutionHistoryAnalyzer());
    176184    }
    177185    private void ParameterizeSolutionCreator() {
     
    193201        PMOPopulationDiversityAnalyzer.SolutionParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName;
    194202        PMOPopulationDiversityAnalyzer.StoreHistoryParameter.Value.Value = true;
     203      }
     204      if (PMOProblemQualitiesAnalyzer != null) {
     205        PMOProblemQualitiesAnalyzer.ParameterConfigurationParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName;
     206      }
     207      if (PMOBestSolutionHistoryAnalyzer != null) {
     208        PMOBestSolutionHistoryAnalyzer.ParameterConfigurationParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName;
    195209      }
    196210    }
Note: See TracChangeset for help on using the changeset viewer.