Changes in branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/CreateExperimentDialogV2.cs [8535:8574]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding.Views/3.3/CreateExperimentDialogV2.cs
r8535 r8574 37 37 public partial class CreateExperimentDialogV2 : Form { 38 38 private readonly IAlgorithm algorithm; 39 private readonly ExperimentFactory experimentFactory; 39 40 private readonly Progress progress; 40 41 private ParameterConfigurationTree parameterConfigurationTree; … … 69 70 progress.CancelRequested += (sender, args) => cts.Cancel(); 70 71 progress.ProgressValueChanged += (sender, args) => progress.Status = string.Format("Generating experiment. Please be patient. ({0} %)", (int)(progress.ProgressValue * 100)); 72 experimentFactory = new ExperimentFactory(); 71 73 cts = new CancellationTokenSource(); 72 74 } … … 92 94 if (algorithm.Problem != null) { 93 95 parameterConfigurationTreeView.Content = parameterConfigurationTree = new ParameterConfigurationTree(algorithm, algorithm.Problem); 94 parameterConfigurationTree.ExperimentGenerationProgressChanged += (o, args) => progress.ProgressValue = parameterConfigurationTree.ExperimentGenerationProgress;95 96 parameterConfigurationTree.CombinationsCountChanged += (o, args) => UpdateCombinationsCount(); 97 experimentFactory.ExperimentGenerationProgressChanged += (o, args) => progress.ProgressValue = experimentFactory.ExperimentGenerationProgress; 96 98 new ProgressView(parameterConfigurationTreeView, progress) { CancelTimeoutMs = 10000 }; 97 99 } else { … … 172 174 if (engineAlgorithm != null) engineAlgorithm.Engine = engine; 173 175 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); 176 178 } 177 179 finally { FinishProgressView(); }
Note: See TracChangeset
for help on using the changeset viewer.