Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/CreateExperimentDialogV2.cs

    r8535 r8574  
    3737  public partial class CreateExperimentDialogV2 : Form {
    3838    private readonly IAlgorithm algorithm;
     39    private readonly ExperimentFactory experimentFactory;
    3940    private readonly Progress progress;
    4041    private ParameterConfigurationTree parameterConfigurationTree;
     
    6970      progress.CancelRequested += (sender, args) => cts.Cancel();
    7071      progress.ProgressValueChanged += (sender, args) => progress.Status = string.Format("Generating experiment. Please be patient. ({0} %)", (int)(progress.ProgressValue * 100));
     72      experimentFactory = new ExperimentFactory();
    7173      cts = new CancellationTokenSource();
    7274    }
     
    9294      if (algorithm.Problem != null) {
    9395        parameterConfigurationTreeView.Content = parameterConfigurationTree = new ParameterConfigurationTree(algorithm, algorithm.Problem);
    94         parameterConfigurationTree.ExperimentGenerationProgressChanged += (o, args) => progress.ProgressValue = parameterConfigurationTree.ExperimentGenerationProgress;
    9596        parameterConfigurationTree.CombinationsCountChanged += (o, args) => UpdateCombinationsCount();
     97        experimentFactory.ExperimentGenerationProgressChanged += (o, args) => progress.ProgressValue = experimentFactory.ExperimentGenerationProgress;
    9698        new ProgressView(parameterConfigurationTreeView, progress) { CancelTimeoutMs = 10000 };
    9799      } else {
     
    172174        if (engineAlgorithm != null) engineAlgorithm.Engine = engine;
    173175        try {
    174           Experiment = createBatchRun ? parameterConfigurationTree.GenerateExperiment(engineAlgorithm, true, repetitions, selectedProblemInstanceProviders, cts.Token)
    175                                       : parameterConfigurationTree.GenerateExperiment(engineAlgorithm, false, 0, selectedProblemInstanceProviders, cts.Token);
     176          Experiment = createBatchRun ? experimentFactory.GenerateExperiment(engineAlgorithm, parameterConfigurationTree, true, repetitions, selectedProblemInstanceProviders, cts.Token)
     177                                      : experimentFactory.GenerateExperiment(engineAlgorithm, parameterConfigurationTree, false, 0, selectedProblemInstanceProviders, cts.Token);
    176178        }
    177179        finally { FinishProgressView(); }
Note: See TracChangeset for help on using the changeset viewer.