Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8474 for trunk/sources


Ignore:
Timestamp:
08/11/12 10:34:27 (12 years ago)
Author:
abeham
Message:

#1914:

  • Set name of batch run to "repetitions times optimizer name"
  • Added parent experiment for each instance when there are more than one instance and more than one variation per instance
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs

    r8188 r8474  
    473473    private void AddOptimizer(IOptimizer optimizer, Experiment experiment) {
    474474      if (createBatchRun) {
    475         var batchRun = new BatchRun();
    476         batchRun.Repetitions = repetitions;
    477         batchRun.Optimizer = optimizer;
     475        var batchRun = new BatchRun(repetitions.ToString() + "x " + optimizer.Name) {
     476          Repetitions = repetitions,
     477          Optimizer = optimizer
     478        };
    478479        experiment.Optimizers.Add(batchRun);
    479480      } else {
     
    708709
    709710      int counter = 0, totalVariations = GetNumberOfVariations();
    710       if (instances.Count == 0) {
     711      int totalInstances = instances.Values.SelectMany(x => x).Count();
     712      if (totalInstances == 0) {
    711713        try {
    712714          AddParameterVariations(Optimizer, localExperiment, ref counter, totalVariations);
     
    729731            if (!failed) {
    730732              try {
    731                 AddParameterVariations(algorithm, localExperiment, ref counter, totalVariations);
     733                if (totalInstances > 1 && totalVariations / totalInstances > 1) {
     734                  var experiment = new Experiment(descriptor.Name);
     735                  AddParameterVariations(algorithm, experiment, ref counter, totalVariations);
     736                  localExperiment.Optimizers.Add(experiment);
     737                } else {
     738                  AddParameterVariations(algorithm, localExperiment, ref counter, totalVariations);
     739                }
    732740              } catch (OperationCanceledException) {
    733741                e.Cancel = true;
Note: See TracChangeset for help on using the changeset viewer.